* [PATCH] drivers/net/ethernet/via/via-velocity.c: update napi implementation
@ 2013-08-14 14:26 Julia Lawall
2013-08-14 21:42 ` Sergei Shtylyov
2013-08-15 8:39 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Julia Lawall @ 2013-08-14 14:26 UTC (permalink / raw)
To: Francois Romieu, roszenrami, dshwatrz
Cc: kernel-janitors, netdev, linux-kernel, grant.likely, rob.herring
From: Julia Lawall <Julia.Lawall@lip6.fr>
Drivers supporting NAPI should use a NAPI-specific function for receiving
packets. Hence netif_rx is changed to netif_receive_skb.
Furthermore netif_napi_del should be used in the probe and remove function
to clean up the NAPI resource information.
Thanks to Francois Romieu, David Shwatrz and Rami Rosen for their help on
this patch.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
I still don't understand the reason for choosing netif_receive_skb,
specifically. This patch is not tested.
drivers/net/ethernet/via/via-velocity.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index ef77631..d022bf9 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
@@ -2100,7 +2100,7 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
}
- netif_rx(skb);
+ netif_receive_skb(skb);
stats->rx_bytes += pkt_len;
stats->rx_packets++;
@@ -2904,6 +2904,7 @@ out:
return ret;
err_iounmap:
+ netif_napi_del(&vptr->napi);
iounmap(regs);
err_free_dev:
free_netdev(netdev);
@@ -2924,6 +2925,7 @@ static int velocity_remove(struct device *dev)
struct velocity_info *vptr = netdev_priv(netdev);
unregister_netdev(netdev);
+ netif_napi_del(&vptr->napi);
iounmap(vptr->mac_regs);
free_netdev(netdev);
velocity_nics--;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/net/ethernet/via/via-velocity.c: update napi implementation
2013-08-14 14:26 [PATCH] drivers/net/ethernet/via/via-velocity.c: update napi implementation Julia Lawall
@ 2013-08-14 21:42 ` Sergei Shtylyov
2013-08-15 8:39 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2013-08-14 21:42 UTC (permalink / raw)
To: Julia Lawall
Cc: Francois Romieu, roszenrami, dshwatrz, kernel-janitors, netdev,
linux-kernel, grant.likely, rob.herring
Hello.
On 08/14/2013 06:26 PM, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> Drivers supporting NAPI should use a NAPI-specific function for receiving
> packets. Hence netif_rx is changed to netif_receive_skb.
> Furthermore netif_napi_del should be used in the probe and remove function
> to clean up the NAPI resource information.
> Thanks to Francois Romieu, David Shwatrz and Rami Rosen for their help on
> this patch.
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> ---
> I still don't understand the reason for choosing netif_receive_skb,
> specifically. This patch is not tested.
This driver is not the only one with the netif_rx() used with NAPI issue.
I also overlooked this when converting drivers/net/ethernet/renesas/sh_eth.c
to NAPI. I'll try to change the call and see if netperf would behave better...
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/net/ethernet/via/via-velocity.c: update napi implementation
2013-08-14 14:26 [PATCH] drivers/net/ethernet/via/via-velocity.c: update napi implementation Julia Lawall
2013-08-14 21:42 ` Sergei Shtylyov
@ 2013-08-15 8:39 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-08-15 8:39 UTC (permalink / raw)
To: Julia.Lawall
Cc: romieu, roszenrami, dshwatrz, kernel-janitors, netdev,
linux-kernel, grant.likely, rob.herring
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Wed, 14 Aug 2013 16:26:53 +0200
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Drivers supporting NAPI should use a NAPI-specific function for receiving
> packets. Hence netif_rx is changed to netif_receive_skb.
>
> Furthermore netif_napi_del should be used in the probe and remove function
> to clean up the NAPI resource information.
>
> Thanks to Francois Romieu, David Shwatrz and Rami Rosen for their help on
> this patch.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-15 8:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14 14:26 [PATCH] drivers/net/ethernet/via/via-velocity.c: update napi implementation Julia Lawall
2013-08-14 21:42 ` Sergei Shtylyov
2013-08-15 8:39 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).