提交 251a4b32 编写于 作者: E Eli Cohen 提交者: David S. Miller

net/inet_lro: remove setting skb->ip_summed when not LRO-able

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: NEli Cohen <eli@mellanox.co.il>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9a375803
...@@ -84,7 +84,11 @@ struct net_lro_mgr { ...@@ -84,7 +84,11 @@ struct net_lro_mgr {
from received packets and eth protocol from received packets and eth protocol
is still ETH_P_8021Q */ 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 u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY
* or CHECKSUM_NONE */ * or CHECKSUM_NONE */
......
...@@ -383,8 +383,7 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, ...@@ -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 */ out2: /* send aggregated SKBs to stack */
lro_flush(lro_mgr, lro_desc); lro_flush(lro_mgr, lro_desc);
out: /* Original SKB has to be posted to stack */ out:
skb->ip_summed = lro_mgr->ip_summed;
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册