From: Allan Stephens Date: Wed, 16 Apr 2008 02:03:23 +0000 (-0700) Subject: [TIPC]: Force linearization of non-linear sk_buffs X-Git-Tag: v2.6.26-rc1~1138^2~71 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fe13dda2d24eca2ee8a6bb8a0af88ab84d589fd6;p=~emulex%2Finfiniband.git [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 Signed-off-by: David S. Miller --- diff --git a/net/tipc/core.h b/net/tipc/core.h index b3c9df385bb..325404fd4eb 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -337,4 +337,16 @@ static inline void buf_discard(struct sk_buff *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 diff --git a/net/tipc/link.c b/net/tipc/link.c index a42f4343010..087379366d3 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1811,6 +1811,12 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) #endif msg_dbg(msg,"