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

Function mlx5_devx_ind_table_new

dpdk/drivers/net/mlx5/mlx5_devx.c:718–741  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

716 * 0 on success, a negative errno value otherwise and rte_errno is set.
717 */
718static int
719mlx5_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.

Callers 1

Calls 3

mlx5_devx_cmd_create_rqtFunction · 0.85
mlx5_freeFunction · 0.85

Tested by

no test coverage detected