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 C1746A00C2; Thu, 3 Feb 2022 10:05:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B42040143; Thu, 3 Feb 2022 10:05:09 +0100 (CET) Received: from smtpservice.6wind.com (unknown [185.13.181.2]) by mails.dpdk.org (Postfix) with ESMTP id 91DBB40140 for ; Thu, 3 Feb 2022 10:05:07 +0100 (CET) Received: from megadeth.dev.6wind.com (megadeth.dev.6wind.com [10.17.1.43]) by smtpservice.6wind.com (Postfix) with ESMTP id 5B66B60063; Thu, 3 Feb 2022 10:05:07 +0100 (CET) From: Ghalem Boudour To: jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, Ghalem Boudour , Thibaut Collet , Olivier Matz Subject: [PATCH] net/iavf: initialize large VF setting at startup Date: Thu, 3 Feb 2022 10:03:59 +0100 Message-Id: <20220203090359.29270-1-ghalem.boudour@6wind.com> X-Mailer: git-send-email 2.30.2 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 lv_enabled is used to remember if large VF setting is configured, but its value is not initialized at startup. This can lead to a different configuration regarding the initial configuration of the PF. For example, a first start is done with 8 rx and 8 tx queues. Large VF is not needed and reta size is 64. A second start is done with 20 rx and tx queues. Large VF is required and reta size is 256. A third start is done with 2 rx and tx queues. Large VF is not needed but reta size is 256 as the PF has been configured during the second start. In order to have a consistent behavior regarding reta size whatever the configuration of the PF (may be changed by a previous boot) the lv_enabled must be set properly at the init phase. Signed-off-by: Ghalem Boudour Signed-off-by: Thibaut Collet Reviewed-by: Olivier Matz --- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 79397f15e54f..09410be4b712 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2276,6 +2276,8 @@ iavf_init_vf(struct rte_eth_dev *dev) PMD_INIT_LOG(ERR, "unable to allocate rss_lut memory"); goto err_rss; } + if (vf->vsi_res->num_queue_pairs > IAVF_MAX_NUM_QUEUES_DFLT) + vf->lv_enabled = true; } if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) { -- 2.30.2