From 6a68c813fd16e42940b451cf8ee45dca05e2c602 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Thu, 28 Jun 2018 13:15:30 -0700 Subject: [PATCH] net/bnxt: set descriptor rings limits Set MIN and MAX descriptor count for TX and RX rings. Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h | 3 +++ drivers/net/bnxt/bnxt_ethdev.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index d19aea5694..9a70617fc8 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -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; diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index f26461c42c..752c3481ad 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -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* */ -- 2.20.1