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 6A6B2A034E; Wed, 9 Feb 2022 20:27:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4223641141; Wed, 9 Feb 2022 20:27:08 +0100 (CET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id 438B241101 for ; Wed, 9 Feb 2022 20:27:07 +0100 (CET) Received: by mail-pj1-f45.google.com with SMTP id h14-20020a17090a130e00b001b88991a305so6082020pja.3 for ; Wed, 09 Feb 2022 11:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hSetLjfItldH0HQdt5lk65+EBiMcm8O/H95jJcmZEV8=; b=UNoA+eZoO1AxRNjGkJS8cChZwli4wHIQuzeq44RAGqvIgpUBSpbK98kJXjcgeCXIgh x/3vWkXCIxHxuvmghiuoDL85frARphldl5FfgG9zbWNBzXDJtMLP+X4J7ygS+v5MyugX mjKI9cPfZbmQQfyXsm4tCkGywgVlh3OZa+IX3pEdwmW4O5bgauKtmqpM7PLCGJGXGpxe M4AC3TYPUfwKbudOg5pfnbeTRr/l8Q717ZTTC/u1WPdHhsBizLYWgNsbOkQq2PFdoPA/ 8OZU1m7K0vsER+xJzzX1fwRd/IftA3PnMT1vuTlzwN5dXsuYokQCB+Zsdb2k+XCrkeRu Hp6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hSetLjfItldH0HQdt5lk65+EBiMcm8O/H95jJcmZEV8=; b=QTv0WNj3gie0gE9U7NqFfEvojhELfqANH0l+MvbaFT3I2ws1ow5rslc+4ZFCo2FHlK aDF+v3cTLO5i45mRe/iXdkda+vMJgHxogsDIi1C48+JPqK2hKP9TODyDdZjceV0eUvvl KXyFEOgh5tvtLyB2JBVgNo5HBvm5BDM74DfdCAVxhNwZWflUFOza+2DJwPHE4vYMJQ6r NZMUsv9Abb1NiopDf2ag+e9NFrg0HHI6Km/EgErJ8NUWyvOSt5df3y4/RwJRTxrF13GE c+Bek0qZJyS5QsT7cBYJmGusGy1JeI6aQCdDga6WAesZJCDl0JhC0UUAYGLL51vhvUAg gtnw== X-Gm-Message-State: AOAM5330MWUYHsKlUPRBTMpbNoHjDywm6SC2sIOJbLhQT/P26fGzoXKk HjXsj78E4M9lmXbUbpuJuuJkPODzyb7d98o5GUDO4A== X-Google-Smtp-Source: ABdhPJzYlhw72v+4pQjUZFe3abV7O3JIJdfOaEufvNPU4/lE/h+f52cEKN32ghZ/4XzhsDId400t7raSKmgze0qffH8= X-Received: by 2002:a17:903:1212:: with SMTP id l18mr3567368plh.77.1644434826482; Wed, 09 Feb 2022 11:27:06 -0800 (PST) MIME-Version: 1.0 References: <20220203090359.29270-1-ghalem.boudour@6wind.com> In-Reply-To: From: Ghalem Boudour Date: Wed, 9 Feb 2022 20:26:55 +0100 Message-ID: Subject: Re: [PATCH] net/iavf: initialize large VF setting at startup To: "Xu, Ting" Cc: "Wu, Jingjing" , "Xing, Beilei" , "dev@dpdk.org" , Thibaut Collet , Olivier Matz Content-Type: text/plain; charset="UTF-8" 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 Hi Ting, The purpose of the correction is to ensure that the rss configuration is aligned with the number of queues allocated on the current boot and not impacted by a previous configuration done in a previous boot. The rss configuration is only available if VIRTCHNL_VF_OFFLOAD_RSS_PF is present and that is the reason that we have set the operation in part of VIRTCHNL_VF_OFFLOAD_RSS_PF. Nevertheless this operation can be moved outside to be more generic and also covers iavf_config_irq_map. On Wed, Feb 9, 2022 at 3:42 AM Xu, Ting wrote: > > > -----Original Message----- > > From: Ghalem Boudour > > Sent: Thursday, February 3, 2022 5:04 PM > > To: Wu, Jingjing ; Xing, Beilei > > Cc: dev@dpdk.org; Ghalem Boudour ; > > Thibaut Collet ; Olivier Matz > > > > Subject: [PATCH] net/iavf: initialize large VF setting at startup > > > > 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; > > Why you put this operation in the part of " VIRTCHNL_VF_OFFLOAD_RSS_PF"? > > > } > > > > if (vf->vf_res->vf_cap_flags & > > VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) { > > -- > > 2.30.2 >