* Create RQT using DevX API as a filed of indirection table. * * @param dev * Pointer to Ethernet device. * @param log_n * Log of number of queues in the array. * @param ind_tbl * DevX indirection table object. * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. */
| 716 | * 0 on success, a negative errno value otherwise and rte_errno is set. |
| 717 | */ |
| 718 | static int |
| 719 | mlx5_devx_ind_table_new(struct rte_eth_dev *dev, const unsigned int log_n, |
| 720 | struct mlx5_ind_table_obj *ind_tbl) |
| 721 | { |
| 722 | struct mlx5_priv *priv = dev->data->dev_private; |
| 723 | struct mlx5_devx_rqt_attr *rqt_attr = NULL; |
| 724 | const uint16_t *queues = dev->data->dev_started ? ind_tbl->queues : |
| 725 | NULL; |
| 726 | |
| 727 | MLX5_ASSERT(ind_tbl); |
| 728 | rqt_attr = mlx5_devx_ind_table_create_rqt_attr(dev, log_n, queues, |
| 729 | ind_tbl->queues_n); |
| 730 | if (!rqt_attr) |
| 731 | return -rte_errno; |
| 732 | ind_tbl->rqt = mlx5_devx_cmd_create_rqt(priv->sh->cdev->ctx, rqt_attr); |
| 733 | mlx5_free(rqt_attr); |
| 734 | if (!ind_tbl->rqt) { |
| 735 | DRV_LOG(ERR, "Port %u cannot create DevX RQT.", |
| 736 | dev->data->port_id); |
| 737 | rte_errno = errno; |
| 738 | return -rte_errno; |
| 739 | } |
| 740 | return 0; |
| 741 | } |
| 742 | |
| 743 | /** |
| 744 | * Modify RQT using DevX API as a filed of indirection table. |
no test coverage detected