Skip to contentSkip to conversation

net: Fix napi_gro_frags vs netpoll path

PATCH Applied Jarek Poplawski 2 participants 2 messages Aug 5, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: Fix napi_gro_frags vs netpoll path

Slight changelog and subject fixes only, sorry.

Jarek P.
------------------>

The netpoll_rx_on() check in __napi_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) &&
maintainer Applied
#1 lore raw

From: Jarek Poplawski <[email protected]>
Date: Thu, 5 Aug 2010 11:19:11 +0000

Quoted 10 lines

Slight changelog and subject fixes only, sorry.

Jarek P.
------------------>

The netpoll_rx_on() check in __napi_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.

Applied, with Herbert's ACK to v1.