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 <harish.patil@cavium.com>
This commit is contained in:
Harish Patil 2017-07-01 12:29:57 -07:00 committed by Ferruh Yigit
parent e1c9b9995e
commit c008e17b61

View File

@ -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,