]> Pileus Git - ~andy/linux/blobdiff - drivers/net/ethernet/mellanox/mlx4/en_cq.c
net/mlx4_en: Add Low Latency Socket (LLS) support
[~andy/linux] / drivers / net / ethernet / mellanox / mlx4 / en_cq.c
index 1e6c594d6d04d282c0dd453ef6a9351d34e98983..3e2d5047cdb39321a35cd27359dbdeb6f277391b 100644 (file)
@@ -139,6 +139,7 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
 
        if (!cq->is_tx) {
                netif_napi_add(cq->dev, &cq->napi, mlx4_en_poll_rx_cq, 64);
+               napi_hash_add(&cq->napi);
                napi_enable(&cq->napi);
        }
 
@@ -162,6 +163,8 @@ void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
 {
        if (!cq->is_tx) {
                napi_disable(&cq->napi);
+               napi_hash_del(&cq->napi);
+               synchronize_rcu();
                netif_napi_del(&cq->napi);
        }