Fix napi_gro_frags vs netpoll path
Subsystems (2)
PATCH 1/1 Fix napi_gro_frags vs netpoll path
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.
---
net/core/dev.c +1 -4
@@ -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) &&
Quoted 6 lines · Jarek Poplawski
The
netpoll_rx_on()check indev_gro_receive()skips part of the "common"GRO_NORMALpath, especially "pull:" indev_gro_receive(), where at least eth header should be copied for entirely paged skbs.Signed-off-by Jarek Poplawski <[email protected]>
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 9 lines · Herbert Xu
Quoted 6 lines · Jarek Poplawski
The
netpoll_rx_on()check indev_gro_receive()skips part of the "common"GRO_NORMALpath, especially "pull:" indev_gro_receive(), where at least eth header should be copied for entirely paged skbs.Signed-off-by Jarek Poplawski <[email protected]>Acked-by Herbert Xu <[email protected]>
I hope, David will use it with a nearby v2 (the changelog fixed).
Thanks,
Jarek P.
David Miller
maintainerFrom: Jarek Poplawski <[email protected]>
Date: Thu, 5 Aug 2010 11:49:44 +0000
Quoted 7 lines · Herbert Xu
Quoted 6 lines · Jarek Poplawski
Quoted 5 lines
The
netpoll_rx_on()check indev_gro_receive()skips part of the "common"GRO_NORMALpath, especially "pull:" indev_gro_receive(), where at least eth header should be copied for entirely paged skbs.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Jarek Poplawski <[email protected]>Acked-by Herbert Xu <[email protected]>I hope, David will use it with a nearby v2 (the changelog fixed).
I will :-)