net/bnxt: set descriptor rings limits
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 28 Jun 2018 20:15:30 +0000 (13:15 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 2 Jul 2018 23:35:58 +0000 (01:35 +0200)
Set MIN and MAX descriptor count for TX and RX rings.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c

index d19aea5..9a70617 100644 (file)
@@ -24,6 +24,9 @@
 #define VLAN_TAG_SIZE          4
 #define BNXT_MAX_LED           4
 #define BNXT_NUM_VLANS         2
+#define BNXT_MIN_RING_DESC     16
+#define BNXT_MAX_TX_RING_DESC  4096
+#define BNXT_MAX_RX_RING_DESC  8192
 
 struct bnxt_led_info {
        uint8_t      led_id;
index f26461c..752c348 100644 (file)
@@ -450,6 +450,10 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
        eth_dev->data->dev_conf.intr_conf.lsc = 1;
 
        eth_dev->data->dev_conf.intr_conf.rxq = 1;
+       dev_info->rx_desc_lim.nb_min = BNXT_MIN_RING_DESC;
+       dev_info->rx_desc_lim.nb_max = BNXT_MAX_RX_RING_DESC;
+       dev_info->tx_desc_lim.nb_min = BNXT_MIN_RING_DESC;
+       dev_info->tx_desc_lim.nb_max = BNXT_MAX_TX_RING_DESC;
 
        /* *INDENT-ON* */