* [PATCH v2] net/inet_lro: remove setting skb->ip_summed when not LRO-able
@ 2008-06-25 15:29 Eli Cohen
2008-06-28 3:09 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eli Cohen @ 2008-06-25 15:29 UTC (permalink / raw)
To: netdev, Jan-Bernd Themann
Cc: OpenFabrics General, Or Gerlitz, Vladimir Sokolovsky,
Roland Dreier
>From 9c5223b8574f364629de4cc8607d97b32f742a7c Mon Sep 17 00:00:00 2001
From: Eli Cohen <eli@mellanox.co.il>
Date: Tue, 24 Jun 2008 17:17:14 +0300
Subject: [PATCH] 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: Eli Cohen <eli@mellanox.co.il>
---
Changes since previous post:
Updated comment on inet_lro.h for more clarity.
include/linux/inet_lro.h | 6 +++++-
net/ipv4/inet_lro.c | 3 +--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h
index 80335b7..c4335fa 100644
--- a/include/linux/inet_lro.h
+++ b/include/linux/inet_lro.h
@@ -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 */
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c
index 4a4d49f..cfd034a 100644
--- a/net/ipv4/inet_lro.c
+++ b/net/ipv4/inet_lro.c
@@ -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;
}
--
1.5.6
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] net/inet_lro: remove setting skb->ip_summed when not LRO-able
2008-06-25 15:29 [PATCH v2] net/inet_lro: remove setting skb->ip_summed when not LRO-able Eli Cohen
@ 2008-06-28 3:09 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-06-28 3:09 UTC (permalink / raw)
To: eli; +Cc: netdev, THEMANN, general, or.gerlitz, vlad, rdreier
From: Eli Cohen <eli@dev.mellanox.co.il>
Date: Wed, 25 Jun 2008 18:29:12 +0300
> 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>
Patch applied, thanks everyone.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-28 3:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 15:29 [PATCH v2] net/inet_lro: remove setting skb->ip_summed when not LRO-able Eli Cohen
2008-06-28 3:09 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).