diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-04-15 22:03:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-15 22:03:23 -0400 |
commit | fe13dda2d24eca2ee8a6bb8a0af88ab84d589fd6 (patch) | |
tree | 3f4a5cc599f45c6523fed71814cd7a571e049023 /net/tipc/core.h | |
parent | bdc82bee43d11c093ff0378acef2a9550891cbb9 (diff) |
[TIPC]: Force linearization of non-linear sk_buffs
This patch allows TIPC to process incoming messages that are
stored in a fragmented sk_buff, by forcing the linearization
of any such messages it receives.
Note: This is an interim solution to allow TIPC to operate with
Ethernet devices that generate non-linear buffers (such as the
gianfar driver), until such time as the rest of TIPC is enhanced
to handle sk_buffs with multiple data areas.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r-- | net/tipc/core.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h index b3c9df385bbc..325404fd4eb5 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
@@ -337,4 +337,16 @@ static inline void buf_discard(struct sk_buff *skb) | |||
337 | kfree_skb(skb); | 337 | kfree_skb(skb); |
338 | } | 338 | } |
339 | 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); | ||
350 | } | ||
351 | |||
340 | #endif | 352 | #endif |