From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasesh Mody Subject: [PATCH v2 3/8] net/qede: limit ring size to 32k Date: Sat, 1 Jul 2017 12:29:57 -0700 Message-ID: <1498937402-25547-4-git-send-email-rasesh.mody@cavium.com> References: <1498729889-21524-1-git-send-email-rasesh.mody@cavium.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Harish Patil , To: , Return-path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0047.outbound.protection.outlook.com [104.47.38.47]) by dpdk.org (Postfix) with ESMTP id 70A272C37 for ; Sat, 1 Jul 2017 21:30:58 +0200 (CEST) In-Reply-To: <1498729889-21524-1-git-send-email-rasesh.mody@cavium.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Harish Patil 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 --- drivers/net/qede/qede_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 1.7.10.3