Re: [PATCH v2 08/10] ethdev: add getter for per-queue Tx rate limit

Stephen Hemminger
2026-03-11T16:32:08Z

On Wed, 11 Mar 2026 00:26:51 +0100
Vincent Jardin <vjardin@free.fr> wrote:

> +int
> +mlx5_get_queue_rate_limit(struct rte_eth_dev *dev, uint16_t queue_idx,
> + uint32_t *tx_rate)
> +{
> + struct mlx5_priv *priv = dev->data->dev_private;
> + struct mlx5_txq_ctrl *txq_ctrl;
> +
> + if (queue_idx >= dev->data->nb_tx_queues) {
> + rte_errno = EINVAL;
> + return -rte_errno;
> + }

This check should be done in ethdev not driver; to be consistent
with other ethdev API's.