| 1279 | } |
| 1280 | |
| 1281 | int |
| 1282 | mlx5_dev_ctx_shared_mempool_subscribe(struct rte_eth_dev *dev) |
| 1283 | { |
| 1284 | struct mlx5_priv *priv = dev->data->dev_private; |
| 1285 | struct mlx5_dev_ctx_shared *sh = priv->sh; |
| 1286 | int ret; |
| 1287 | |
| 1288 | /* Check if we only need to track Rx mempool destruction. */ |
| 1289 | if (!sh->cdev->config.mr_mempool_reg_en) { |
| 1290 | ret = rte_mempool_event_callback_register |
| 1291 | (mlx5_dev_ctx_shared_rx_mempool_event_cb, sh); |
| 1292 | return ret == 0 || rte_errno == EEXIST ? 0 : ret; |
| 1293 | } |
| 1294 | return mlx5_dev_mempool_subscribe(sh->cdev); |
| 1295 | } |
| 1296 | |
| 1297 | /** |
| 1298 | * Set up multiple TISs with different affinities according to |
no test coverage detected