Message ID | k2y412e6f7f1004150127u4e7ec668r80f066bfb3efea81@mail.gmail.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
From: Changli Gao <xiaosuo@gmail.com> Date: Thu, 15 Apr 2010 16:27:19 +0800 > I think the following patch from Eric should be applied instead. > > diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c > index c65f18e..d1bcc9f 100644 > --- a/net/ipv4/ip_output.c > +++ b/net/ipv4/ip_output.c > @@ -120,7 +120,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb) > newskb->pkt_type = PACKET_LOOPBACK; > newskb->ip_summed = CHECKSUM_UNNECESSARY; > WARN_ON(!skb_dst(newskb)); > - netif_rx(newskb); > + netif_rx_ni(newskb); > return 0; > } Yes, this looks more reasonable. Eric if you agree please (re-)submit this formally, I must have missed this somehow, sorry. And this is a bug fix in any kernel, not just one's that have RPS patches applied. If we are not called from some interrupt context, there is no sure trigger to make sure software interrupts will be executed after the packet is queued locally. netif_rx_ni() makes sure that any pending software interrupts will run in such cases. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Le jeudi 15 avril 2010 à 01:33 -0700, David Miller a écrit : > Yes, this looks more reasonable. Eric if you agree please (re-)submit > this formally, I must have missed this somehow, sorry. > > And this is a bug fix in any kernel, not just one's that have RPS > patches applied. > > If we are not called from some interrupt context, there is no sure > trigger to make sure software interrupts will be executed after the > packet is queued locally. netif_rx_ni() makes sure that any pending > software interrupts will run in such cases. Our mails crossed ;) Yes I think it's more reasonable to fix it like this, I'll submit a patch after fully testing it :) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index c65f18e..d1bcc9f 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -120,7 +120,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb) newskb->pkt_type = PACKET_LOOPBACK; newskb->ip_summed = CHECKSUM_UNNECESSARY; WARN_ON(!skb_dst(newskb)); - netif_rx(newskb); + netif_rx_ni(newskb); return 0; }