summaryrefslogtreecommitdiff
path: root/net/tipc/core.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-04-19 16:17:34 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-19 16:17:34 (GMT)
commitcf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch)
tree1b7705db288ae2917105e624b01fdf81e0882bf1 /net/tipc/core.h
parentadf6d34e460387ee3e8f1e1875d52bff51212c7d (diff)
parent15f7d677ccff6f0f5de8a1ee43a792567e9f9de9 (diff)
downloadlinux-fsl-qoriq-cf816ecb533ab96b883dfdc0db174598b5b5c4d2.tar.xz
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r--net/tipc/core.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h
index feabca5..325404f 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -180,6 +180,12 @@ extern int tipc_core_start(void);
extern void tipc_core_stop(void);
extern int tipc_core_start_net(void);
extern void tipc_core_stop_net(void);
+extern int tipc_handler_start(void);
+extern void tipc_handler_stop(void);
+extern int tipc_netlink_start(void);
+extern void tipc_netlink_stop(void);
+extern int tipc_socket_init(void);
+extern void tipc_socket_stop(void);
static inline int delimit(int val, int min, int max)
{
@@ -310,7 +316,7 @@ static inline struct sk_buff *buf_acquire(u32 size)
struct sk_buff *skb;
unsigned int buf_size = (BUF_HEADROOM + size + 3) & ~3u;
- skb = alloc_skb(buf_size, GFP_ATOMIC);
+ skb = alloc_skb_fclone(buf_size, GFP_ATOMIC);
if (skb) {
skb_reserve(skb, BUF_HEADROOM);
skb_put(skb, size);
@@ -328,8 +334,19 @@ static inline struct sk_buff *buf_acquire(u32 size)
static inline void buf_discard(struct sk_buff *skb)
{
- if (likely(skb != NULL))
- kfree_skb(skb);
+ kfree_skb(skb);
+}
+
+/**
+ * buf_linearize - convert a TIPC message buffer into a single contiguous piece
+ * @skb: message buffer
+ *
+ * Returns 0 on success.
+ */
+
+static inline int buf_linearize(struct sk_buff *skb)
+{
+ return skb_linearize(skb);
}
#endif