Skip to contentSkip to conversation

Fix napi_gro_frags vs netpoll path

PATCH Superseded Jarek Poplawski 3 participants 4 messages Aug 5, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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
index e1c1cdc..2b50896 100644
@@ -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) &&
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jarek Poplawski

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.

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
#2 lore raw
Quoted 9 lines · Herbert Xu
Quoted 6 lines · Jarek Poplawski

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.

I hope, David will use it with a nearby v2 (the changelog fixed).

Thanks,
Jarek P.

maintainer
#3 lore raw

From: 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 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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I hope, David will use it with a nearby v2 (the changelog fixed).

I will :-)