Skip to content

Commit

Permalink
net/inet_lro: remove setting skb->ip_summed when not LRO-able
Browse files Browse the repository at this point in the history
When an SKB cannot be chained to a session, the current code attempts
to "restore" its ip_summed field from lro_mgr->ip_summed. However,
lro_mgr->ip_summed does not hold the original value; in fact, we'd
better not touch skb->ip_summed since it is not modified by the code
in the path leading to a failure to chain it.  Also use a cleaer
comment to the describe the ip_summed field of struct net_lro_mgr.

Issue raised by Or Gerlitz <ogerlitz@voltaire.com>

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eli Cohen authored and David S. Miller committed Jun 28, 2008
1 parent 9a37580 commit 251a4b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion include/linux/inet_lro.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ struct net_lro_mgr {
from received packets and eth protocol
is still ETH_P_8021Q */

u32 ip_summed; /* Set in non generated SKBs in page mode */
/*
* Set for generated SKBs that are not added to
* the frag list in fragmented mode
*/
u32 ip_summed;
u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY
* or CHECKSUM_NONE */

Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/inet_lro.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb,
out2: /* send aggregated SKBs to stack */
lro_flush(lro_mgr, lro_desc);

out: /* Original SKB has to be posted to stack */
skb->ip_summed = lro_mgr->ip_summed;
out:
return 1;
}

Expand Down

0 comments on commit 251a4b3

Please sign in to comment.