From: Jay Ding Date: Tue, 1 May 2018 01:06:08 +0000 (-0700) Subject: net/bnxt: update returned error on invalid max ring X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a42b152abaf40caf966d24bb1a17d6928a5ab12f;p=dpdk.git 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 --- 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) {