From: Harish Patil Date: Sat, 1 Jul 2017 19:29:57 +0000 (-0700) Subject: net/qede: limit ring size to 32k X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c008e17b61265f35ab299a4cc991bd4f1257402b;p=dpdk.git net/qede: limit ring size to 32k Since nb_max is a u16 it can store value up to 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 --- diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 3e9f359650..fcc9bbbf20 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,