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 B702FA04FF; Wed, 4 May 2022 17:05:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FA1540C35; Wed, 4 May 2022 17:05:27 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 85B3F4069F for ; Wed, 4 May 2022 17:05:25 +0200 (CEST) Received: from [192.168.108.214] (unknown [188.170.87.12]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id BC88282; Wed, 4 May 2022 18:05:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru BC88282 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1651676725; bh=K6GkQcWl2gRRvDeDheXWQhjejnUs1ih8/ju2DRu6W5Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=m4jvIQbGUnTNtTt9d8g7sGtfdtkx6HTHDZga8n/8Weg9murCwgOTxa8Tyaazo+gcJ jRXcu9LK+bRcA3uO0CK3xPC52EiEO3jWU/3I77f3Wl+GcoNldCWvJM3XIEF9yB4EtY BvNeAdxLB6qgmzrie67iRK4AFazwIjIyU3x+cjTk= Message-ID: <6eeca907-3543-e4b6-b7b7-1af25da23649@oktetlabs.ru> Date: Wed, 4 May 2022 18:05:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH 6/8] vmxnet3: set reta size Content-Language: en-US To: Pankaj Gupta , jbehrens@vmware.com, yongwang@vmware.com Cc: dev@dpdk.org References: <20220503042257.15626-1-pagupta@vmware.com> <20220503042257.15626-7-pagupta@vmware.com> From: Andrew Rybchenko In-Reply-To: <20220503042257.15626-7-pagupta@vmware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Consider: net/vmxnet3: advertise RETA size in device info On 5/3/22 07:22, Pankaj Gupta wrote: > Currently the driver assumes that the size of the reta table is reta -> RETA (see devtools/words-case.txt) > four times the number of rx queues at multiple places. However, rx -> Rx > 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. > > Signed-off-by: Pankaj Gupta > --- > 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 f65b3d3113..9955f121f6 100644 > --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c > +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c > @@ -1483,7 +1483,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) { Compare with NULL explicitly as DPDK coding style says. > + dev_info->reta_size = hw->rss_conf->indTableSize; > + } else { > + /* RSS not configured */ > + dev_info->reta_size = 0; > + } > return 0; > } >