* 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. */
| 288 | * RSS context to detach from. |
| 289 | */ |
| 290 | void |
| 291 | mlx4_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. |
no test coverage detected