From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD817A0503; Thu, 19 May 2022 10:05:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 462A542B80; Thu, 19 May 2022 10:04:52 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id D54EE4281F for ; Thu, 19 May 2022 10:04:43 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 115) id A10A08C; Thu, 19 May 2022 11:04:43 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mail1.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD autolearn=no autolearn_force=no version=3.4.6 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id EE5708F; Thu, 19 May 2022 11:04:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru EE5708F Authentication-Results: shelob.oktetlabs.ru/EE5708F; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Pankaj Gupta , Jochen Behrens Cc: dev@dpdk.org Subject: [PATCH v6 7/9] net/vmxnet3: advertise RETA size in device info Date: Thu, 19 May 2022 11:04:13 +0300 Message-Id: <20220519080415.1577680-8-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220519080415.1577680-1-andrew.rybchenko@oktetlabs.ru> References: <20220503042257.15626-1-pagupta@vmware.com> <20220519080415.1577680-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Pankaj Gupta Currently the driver assumes that the size of the RETA table is four times the number of Rx queues at multiple places. However, it sets it to four times the maximum number of queues (4 * 32 = 128) when it first initializes the device. Change the other uses to use the stored value, not the assumed default. Tested, using testpmd, for different hardware versions on ESXi 7.0 Update 2. Signed-off-by: Pankaj Gupta Reviewed-by: Jochen Behrens --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 52309811e5..c9e352b73a 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -1479,7 +1479,12 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev, dev_info->rx_queue_offload_capa = 0; dev_info->tx_offload_capa = VMXNET3_TX_OFFLOAD_CAP; dev_info->tx_queue_offload_capa = 0; - + if (hw->rss_conf == NULL) { + /* RSS not configured */ + dev_info->reta_size = 0; + } else { + dev_info->reta_size = hw->rss_conf->indTableSize; + } return 0; } -- 2.30.2