Message ID | 201309030303.11381.sergei.shtylyov@cogentembedded.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Date: Tue, 3 Sep 2013 03:03:10 +0400 > Driver supporting NAPI should use NAPI-specific function for receiving packets, > so netif_rx() should be changed to netif_receive_skb(). > > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Applied. -- 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
Hi On Wed, 4 Sep 2013, David Miller wrote: > From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > Date: Tue, 3 Sep 2013 03:03:10 +0400 > > > Driver supporting NAPI should use NAPI-specific function for receiving packets, > > so netif_rx() should be changed to netif_receive_skb(). > > > > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> This patch breaks NFS boot on Armadillo800eva for me. Network communication slows down to a crawl with net eth0: Receive FIFO Overflow nfs: server 192.168.x.y not responding, still trying With this patch reverted (e.g. in today's Linus tree snapshot) boot is restored. Thanks Guennadi > Applied. --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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
On Thu, 2013-09-26 at 18:12 +0200, Guennadi Liakhovetski wrote: > Hi > > On Wed, 4 Sep 2013, David Miller wrote: > > > From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > Date: Tue, 3 Sep 2013 03:03:10 +0400 > > > > > Driver supporting NAPI should use NAPI-specific function for receiving packets, > > > so netif_rx() should be changed to netif_receive_skb(). > > > > > > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > This patch breaks NFS boot on Armadillo800eva for me. Network > communication slows down to a crawl with > > net eth0: Receive FIFO Overflow > nfs: server 192.168.x.y not responding, still trying > > With this patch reverted (e.g. in today's Linus tree snapshot) boot is > restored. RX_RING_SIZE is 64 This driver refills the Rx ring buffers only _after_ the loop to drain ready buffers. This was OK with the previous behavior (netif_rx() is damn fast) With this low amount of buffers, underrun can happen with the new code, as netif_receive_skb() adds delay during the drain. Most likely driver needs to refill buffers one by one (or small batches) instead of in one go after the drain. -- 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
Hello. On 26-09-2013 18:12, Guennadi Liakhovetski wrote: >> From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> >> Date: Tue, 3 Sep 2013 03:03:10 +0400 >>> Driver supporting NAPI should use NAPI-specific function for receiving packets, >>> so netif_rx() should be changed to netif_receive_skb(). >>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > This patch breaks NFS boot on Armadillo800eva for me. Network > communication slows down to a crawl with > net eth0: Receive FIFO Overflow > nfs: server 192.168.x.y not responding, still trying > With this patch reverted (e.g. in today's Linus tree snapshot) boot is > restored. Guennadi, are you expecting some actions (like looking into what Eric have suggested) from me? If so, I'm still on vacation, should be back next Tuesday. I don't think reverting the patch is a Right Thing to do. > Thanks > Guennadi WBR, Sergei -- 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
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -1347,7 +1347,7 @@ static int sh_eth_rx(struct net_device * skb_reserve(skb, NET_IP_ALIGN); skb_put(skb, pkt_len); skb->protocol = eth_type_trans(skb, ndev); - netif_rx(skb); + netif_receive_skb(skb); ndev->stats.rx_packets++; ndev->stats.rx_bytes += pkt_len; }
Driver supporting NAPI should use NAPI-specific function for receiving packets, so netif_rx() should be changed to netif_receive_skb(). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- This patch is against Dave's 'net-next.git' repo (it also applies to 'net.git' with offset). Perhaps it should be backported to 3.11 once it is out... drivers/net/ethernet/renesas/sh_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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