aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-03-13 16:08:07 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-14 14:38:32 -0400
commit1149557d64c97dc9adf3103347a1c0e8c06d3b89 (patch)
tree1253880332cf983760ba27a157f6b77aa11859e4 /net/tipc/link.c
parentcf2157f88a5abf1a64b8c51a737a35e918dc67e5 (diff)
tipc: eliminate unnecessary linearization of incoming buffers
Currently, TIPC linearizes all incoming buffers directly at reception before passing them upwards in the stack. This is clearly a waste of CPU resources, and must be avoided. In this commit, we eliminate this unnecessary linearization. We still ensure that at least the message header is linear, and that the buffer is linearized where this is still needed, i.e. when unbundling and when reversing messages. In addition, we ensure that fragmented messages are validated after reassembly before delivering them upwards in the stack. Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 944c8c663a2d..8c6639d107fc 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1075,13 +1075,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b_ptr)
1075 if (unlikely(!tipc_msg_validate(skb))) 1075 if (unlikely(!tipc_msg_validate(skb)))
1076 goto discard; 1076 goto discard;
1077 1077
1078 /* Ensure message data is a single contiguous unit */
1079 if (unlikely(skb_linearize(skb)))
1080 goto discard;
1081
1082 /* Handle arrival of a non-unicast link message */ 1078 /* Handle arrival of a non-unicast link message */
1083 msg = buf_msg(skb); 1079 msg = buf_msg(skb);
1084
1085 if (unlikely(msg_non_seq(msg))) { 1080 if (unlikely(msg_non_seq(msg))) {
1086 if (msg_user(msg) == LINK_CONFIG) 1081 if (msg_user(msg) == LINK_CONFIG)
1087 tipc_disc_rcv(net, skb, b_ptr); 1082 tipc_disc_rcv(net, skb, b_ptr);