void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq) { napi_disable(&cq->napi); if (!cq->is_tx) { napi_hash_del(&cq->napi); synchronize_rcu(); } netif_napi_del(&cq->napi); mlx4_cq_free(priv->mdev->dev, &cq->mcq); }
void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq) { napi_disable(&cq->napi); #ifdef HAVE_NAPI_HASH_ADD if (!cq->is_tx) { napi_hash_del(&cq->napi); synchronize_rcu(); } #endif netif_napi_del(&cq->napi); mlx4_cq_free(priv->mdev->dev, &cq->mcq); }
static void sn_free_queues(struct sn_device *dev) { int i; for (i = 0; i < dev->num_rxq; i++) { #ifdef CONFIG_NET_RX_BUSY_POLL napi_hash_del(&dev->rx_queues[i]->rx.napi); #endif netif_napi_del(&dev->rx_queues[i]->rx.napi); } /* Queues are allocated in batch, * and the tx_queues[0] is its address */ kfree(dev->tx_queues[0]); }
static void sn_free_queues(struct sn_device *dev) { int i; log_info("%s: releasing queues\n", dev->netdev->name); for (i = 0; i < dev->num_rxq; i++) { napi_hash_del(&dev->rx_queues[i]->napi); netif_napi_del(&dev->rx_queues[i]->napi); } /* Queues are allocated in batch, * and the tx_queues[0] is its address */ kfree(dev->tx_queues[0]); }
/** * ixgbe_free_q_vector - Free memory allocated for specific interrupt vector * @adapter: board private structure to initialize * @v_idx: Index of vector to be freed * * This function frees the memory allocated to the q_vector. In addition if * NAPI is enabled it will delete any references to the NAPI struct prior * to freeing the q_vector. **/ static void ixgbe_free_q_vector(struct ixgbe_adapter *adapter, int v_idx) { struct ixgbe_q_vector *q_vector = adapter->q_vector[v_idx]; struct ixgbe_ring *ring; ixgbe_for_each_ring(ring, q_vector->tx) adapter->tx_ring[ring->queue_index] = NULL; ixgbe_for_each_ring(ring, q_vector->rx) adapter->rx_ring[ring->queue_index] = NULL; adapter->q_vector[v_idx] = NULL; napi_hash_del(&q_vector->napi); netif_napi_del(&q_vector->napi); /* * ixgbe_get_stats64() might access the rings on this vector, * we must wait a grace period before freeing it. */ kfree_rcu(q_vector, rcu); }