From a42b152abaf40caf966d24bb1a17d6928a5ab12f Mon Sep 17 00:00:00 2001 From: Jay Ding Date: Mon, 30 Apr 2018 18:06:08 -0700 Subject: [PATCH] net/bnxt: update returned error on invalid max ring Return EINVAL instead of ENOSPC when invalid queue_idx passed in during rx and tx queue_setup_op routines. Signed-off-by: Jay Ding Signed-off-by: Scott Branden Reviewed-by: Ray Jui Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxq.c | 2 +- drivers/net/bnxt/bnxt_txq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index e939c9ac0a..4e6fa4e305 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -290,7 +290,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, PMD_DRV_LOG(ERR, "Cannot create Rx ring %d. Only %d rings available\n", queue_idx, bp->max_rx_rings); - return -ENOSPC; + return -EINVAL; } if (!nb_desc || nb_desc > MAX_RX_DESC_CNT) { diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index 07e25d77b8..b50f37cf26 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -86,7 +86,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, PMD_DRV_LOG(ERR, "Cannot create Tx ring %d. Only %d rings available\n", queue_idx, bp->max_tx_rings); - return -ENOSPC; + return -EINVAL; } if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) { -- 2.20.1