* [PATCH] Fix napi_gro_frags vs netpoll path
@ 2010-08-05 11:03 Jarek Poplawski
2010-08-05 11:40 ` Herbert Xu
0 siblings, 1 reply; 4+ messages in thread
From: Jarek Poplawski @ 2010-08-05 11:03 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, Herbert Xu, Xin, Xiaohui
Hi,
While looking at Xioahui's patch I noticed this "unless I miss
something" bug.
Jarek P.
------------------>
The netpoll_rx_on() check in dev_gro_receive() skips part of the
"common" GRO_NORMAL path, especially "pull:" in dev_gro_receive(),
where at least eth header should be copied for entirely paged skbs.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index e1c1cdc..2b50896 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3072,7 +3072,7 @@ enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
int mac_len;
enum gro_result ret;
- if (!(skb->dev->features & NETIF_F_GRO))
+ if (!(skb->dev->features & NETIF_F_GRO) || netpoll_rx_on(skb))
goto normal;
if (skb_is_gso(skb) || skb_has_frags(skb))
@@ -3159,9 +3159,6 @@ __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
{
struct sk_buff *p;
- if (netpoll_rx_on(skb))
- return GRO_NORMAL;
-
for (p = napi->gro_list; p; p = p->next) {
NAPI_GRO_CB(p)->same_flow =
(p->dev == skb->dev) &&
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix napi_gro_frags vs netpoll path
2010-08-05 11:03 [PATCH] Fix napi_gro_frags vs netpoll path Jarek Poplawski
@ 2010-08-05 11:40 ` Herbert Xu
2010-08-05 11:49 ` Jarek Poplawski
0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2010-08-05 11:40 UTC (permalink / raw)
To: Jarek Poplawski; +Cc: David Miller, netdev@vger.kernel.org, Xin, Xiaohui
On Thu, Aug 05, 2010 at 11:03:55AM +0000, Jarek Poplawski wrote:
>
> The netpoll_rx_on() check in dev_gro_receive() skips part of the
> "common" GRO_NORMAL path, especially "pull:" in dev_gro_receive(),
> where at least eth header should be copied for entirely paged skbs.
>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix napi_gro_frags vs netpoll path
2010-08-05 11:40 ` Herbert Xu
@ 2010-08-05 11:49 ` Jarek Poplawski
2010-08-05 19:01 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Jarek Poplawski @ 2010-08-05 11:49 UTC (permalink / raw)
To: Herbert Xu; +Cc: David Miller, netdev@vger.kernel.org, Xin, Xiaohui
On Thu, Aug 05, 2010 at 07:40:59PM +0800, Herbert Xu wrote:
> On Thu, Aug 05, 2010 at 11:03:55AM +0000, Jarek Poplawski wrote:
> >
> > The netpoll_rx_on() check in dev_gro_receive() skips part of the
> > "common" GRO_NORMAL path, especially "pull:" in dev_gro_receive(),
> > where at least eth header should be copied for entirely paged skbs.
> >
> > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
>
> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
I hope, David will use it with a nearby v2 (the changelog fixed).
Thanks,
Jarek P.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix napi_gro_frags vs netpoll path
2010-08-05 11:49 ` Jarek Poplawski
@ 2010-08-05 19:01 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-08-05 19:01 UTC (permalink / raw)
To: jarkao2; +Cc: herbert, netdev, xiaohui.xin
From: Jarek Poplawski <jarkao2@gmail.com>
Date: Thu, 5 Aug 2010 11:49:44 +0000
> On Thu, Aug 05, 2010 at 07:40:59PM +0800, Herbert Xu wrote:
>> On Thu, Aug 05, 2010 at 11:03:55AM +0000, Jarek Poplawski wrote:
>> >
>> > The netpoll_rx_on() check in dev_gro_receive() skips part of the
>> > "common" GRO_NORMAL path, especially "pull:" in dev_gro_receive(),
>> > where at least eth header should be copied for entirely paged skbs.
>> >
>> > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
>>
>> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> I hope, David will use it with a nearby v2 (the changelog fixed).
I will :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-05 19:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 11:03 [PATCH] Fix napi_gro_frags vs netpoll path Jarek Poplawski
2010-08-05 11:40 ` Herbert Xu
2010-08-05 11:49 ` Jarek Poplawski
2010-08-05 19:01 ` 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).