diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 21:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 21:02:35 -0400 |
commit | 334d094504c2fe1c44211ecb49146ae6bca8c321 (patch) | |
tree | d3c0f68e4b9f8e3d2ccc39e7dfe5de0534a5fad9 /net/tipc/core.h | |
parent | d1a4be630fb068f251d64b62919f143c49ca8057 (diff) | |
parent | d1643d24c61b725bef399cc1cf2944b4c9c23177 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26: (1090 commits)
[NET]: Fix and allocate less memory for ->priv'less netdevices
[IPV6]: Fix dangling references on error in fib6_add().
[NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
[PKT_SCHED]: Fix datalen check in tcf_simp_init().
[INET]: Uninline the __inet_inherit_port call.
[INET]: Drop the inet_inherit_port() call.
SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
[netdrvr] forcedeth: internal simplifications; changelog removal
phylib: factor out get_phy_id from within get_phy_device
PHY: add BCM5464 support to broadcom PHY driver
cxgb3: Fix __must_check warning with dev_dbg.
tc35815: Statistics cleanup
natsemi: fix MMIO for PPC 44x platforms
[TIPC]: Cleanup of TIPC reference table code
[TIPC]: Optimized initialization of TIPC reference table
[TIPC]: Remove inlining of reference table locking routines
e1000: convert uint16_t style integers to u16
ixgb: convert uint16_t style integers to u16
sb1000.c: make const arrays static
sb1000.c: stop inlining largish static functions
...
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r-- | net/tipc/core.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h index feabca580820..325404fd4eb5 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
@@ -180,6 +180,12 @@ extern int tipc_core_start(void); | |||
180 | extern void tipc_core_stop(void); | 180 | extern void tipc_core_stop(void); |
181 | extern int tipc_core_start_net(void); | 181 | extern int tipc_core_start_net(void); |
182 | extern void tipc_core_stop_net(void); | 182 | extern void tipc_core_stop_net(void); |
183 | extern int tipc_handler_start(void); | ||
184 | extern void tipc_handler_stop(void); | ||
185 | extern int tipc_netlink_start(void); | ||
186 | extern void tipc_netlink_stop(void); | ||
187 | extern int tipc_socket_init(void); | ||
188 | extern void tipc_socket_stop(void); | ||
183 | 189 | ||
184 | static inline int delimit(int val, int min, int max) | 190 | static inline int delimit(int val, int min, int max) |
185 | { | 191 | { |
@@ -310,7 +316,7 @@ static inline struct sk_buff *buf_acquire(u32 size) | |||
310 | struct sk_buff *skb; | 316 | struct sk_buff *skb; |
311 | unsigned int buf_size = (BUF_HEADROOM + size + 3) & ~3u; | 317 | unsigned int buf_size = (BUF_HEADROOM + size + 3) & ~3u; |
312 | 318 | ||
313 | skb = alloc_skb(buf_size, GFP_ATOMIC); | 319 | skb = alloc_skb_fclone(buf_size, GFP_ATOMIC); |
314 | if (skb) { | 320 | if (skb) { |
315 | skb_reserve(skb, BUF_HEADROOM); | 321 | skb_reserve(skb, BUF_HEADROOM); |
316 | skb_put(skb, size); | 322 | skb_put(skb, size); |
@@ -328,8 +334,19 @@ static inline struct sk_buff *buf_acquire(u32 size) | |||
328 | 334 | ||
329 | static inline void buf_discard(struct sk_buff *skb) | 335 | static inline void buf_discard(struct sk_buff *skb) |
330 | { | 336 | { |
331 | if (likely(skb != NULL)) | 337 | kfree_skb(skb); |
332 | kfree_skb(skb); | 338 | } |
339 | |||
340 | /** | ||
341 | * buf_linearize - convert a TIPC message buffer into a single contiguous piece | ||
342 | * @skb: message buffer | ||
343 | * | ||
344 | * Returns 0 on success. | ||
345 | */ | ||
346 | |||
347 | static inline int buf_linearize(struct sk_buff *skb) | ||
348 | { | ||
349 | return skb_linearize(skb); | ||
333 | } | 350 | } |
334 | 351 | ||
335 | #endif | 352 | #endif |