[dpdk-dev,3/9] net/qede: limit ring size to 32k

Message ID 1498729889-21524-4-git-send-email-rasesh.mody@cavium.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Mody, Rasesh June 29, 2017, 9:51 a.m. UTC
  From: Harish Patil <harish.patil@cavium.com>

Since nb_max is a u16 it can store value upto 65535 only (not 64K), but
this value is not a power-of-2. So limit the ring sizes to 32K.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 3e9f359..fcc9bbb 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1189,13 +1189,13 @@  static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 
 /* Info about HW descriptor ring limitations */
 static const struct rte_eth_desc_lim qede_rx_desc_lim = {
-	.nb_max = NUM_RX_BDS_MAX,
+	.nb_max = 0x8000, /* 32K */
 	.nb_min = 128,
 	.nb_align = 128 /* lowest common multiple */
 };
 
 static const struct rte_eth_desc_lim qede_tx_desc_lim = {
-	.nb_max = NUM_TX_BDS_MAX,
+	.nb_max = 0x8000, /* 32K */
 	.nb_min = 256,
 	.nb_align = 256,
 	.nb_seg_max = ETH_TX_MAX_BDS_PER_LSO_PACKET,