mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
cf2157f88a
commit
1149557d64
2 changed files with 10 additions and 9 deletions
|
@ -1075,13 +1075,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b_ptr)
|
|||
if (unlikely(!tipc_msg_validate(skb)))
|
||||
goto discard;
|
||||
|
||||
/* Ensure message data is a single contiguous unit */
|
||||
if (unlikely(skb_linearize(skb)))
|
||||
goto discard;
|
||||
|
||||
/* Handle arrival of a non-unicast link message */
|
||||
msg = buf_msg(skb);
|
||||
|
||||
if (unlikely(msg_non_seq(msg))) {
|
||||
if (msg_user(msg) == LINK_CONFIG)
|
||||
tipc_disc_rcv(net, skb, b_ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue