* [PATCH net-next] net/mlx4_en: remove napi_hash_del() call
@ 2016-11-16 13:49 Eric Dumazet
2016-11-17 16:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2016-11-16 13:49 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Tariq Toukan
From: Eric Dumazet <edumazet@google.com>
There is no need calling napi_hash_del()+synchronize_rcu() before
calling netif_napi_del()
netif_napi_del() does this already.
Using napi_hash_del() in a driver is useful only when dealing with
a batch of NAPI structures, so that a single synchronize_rcu() can
be used. mlx4_en_deactivate_cq() is deactivating a single NAPI.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/en_cq.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
index 03f05c4d1f9897d851c4f36d1f0e37ad3398e76c..09dd3776db7632ae8818c9638507705176233ea4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
@@ -185,10 +185,6 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq)
void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
{
napi_disable(&cq->napi);
- if (cq->type == RX) {
- napi_hash_del(&cq->napi);
- synchronize_rcu();
- }
netif_napi_del(&cq->napi);
mlx4_cq_free(priv->mdev->dev, &cq->mcq);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net/mlx4_en: remove napi_hash_del() call
2016-11-16 13:49 [PATCH net-next] net/mlx4_en: remove napi_hash_del() call Eric Dumazet
@ 2016-11-17 16:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-11-17 16:17 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, tariqt
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 16 Nov 2016 05:49:22 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> There is no need calling napi_hash_del()+synchronize_rcu() before
> calling netif_napi_del()
>
> netif_napi_del() does this already.
>
> Using napi_hash_del() in a driver is useful only when dealing with
> a batch of NAPI structures, so that a single synchronize_rcu() can
> be used. mlx4_en_deactivate_cq() is deactivating a single NAPI.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-17 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 13:49 [PATCH net-next] net/mlx4_en: remove napi_hash_del() call Eric Dumazet
2016-11-17 16:17 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.