net/bnxt: update returned error on invalid max ring
authorJay Ding <jay.ding@broadcom.com>
Tue, 1 May 2018 01:06:08 +0000 (18:06 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:48 +0000 (22:31 +0100)
Return EINVAL instead of ENOSPC when invalid queue_idx passed in
during rx and tx queue_setup_op routines.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_rxq.c
drivers/net/bnxt/bnxt_txq.c

index e939c9a..4e6fa4e 100644 (file)
@@ -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) {
index 07e25d7..b50f37c 100644 (file)
@@ -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) {