MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx4_rss_detach

Function mlx4_rss_detach

dpdk/drivers/net/mlx4/mlx4_rxq.c:290–308  ·  view source on GitHub ↗

* Detach a user from a RSS context instance. * * Used when disabling (not destroying) a flow rule. * * This function decrements the usage count of the context and destroys * usage resources after reaching 0. * * @param rss * RSS context to detach from. */

Source from the content-addressed store, hash-verified

288 * RSS context to detach from.
289 */
290void
291mlx4_rss_detach(struct mlx4_rss *rss)
292{
293 struct mlx4_priv *priv = rss->priv;
294 struct rte_eth_dev *dev = ETH_DEV(priv);
295 unsigned int i;
296
297 MLX4_ASSERT(rss->refcnt);
298 MLX4_ASSERT(rss->qp);
299 MLX4_ASSERT(rss->ind);
300 if (--rss->usecnt)
301 return;
302 claim_zero(mlx4_glue->destroy_qp(rss->qp));
303 rss->qp = NULL;
304 claim_zero(mlx4_glue->destroy_rwq_ind_table(rss->ind));
305 rss->ind = NULL;
306 for (i = 0; i != rss->queues; ++i)
307 mlx4_rxq_detach(dev->data->rx_queues[rss->queue_id[i]]);
308}
309
310/**
311 * Initialize common RSS context resources.

Callers 1

mlx4_flow_toggleFunction · 0.85

Calls 1

mlx4_rxq_detachFunction · 0.85

Tested by

no test coverage detected