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 6C844A00C2; Thu, 10 Feb 2022 07:43:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E76AC4013F; Thu, 10 Feb 2022 07:43:32 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 650DC40041 for ; Thu, 10 Feb 2022 07:43:31 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id u12so1000072plf.13 for ; Wed, 09 Feb 2022 22:43:31 -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=N31SHi1vcAwI2b+aL7Oj8AZEQ05hYSo51Ec1XCur/yo=; b=MgeyxNJ8G0YXbdjEWDr60VALZnz2JH0dFNGw0G/QAtkmiG2phzumKXMFZmjqx3DEh6 aqK563iQxYjRVAexg3z4GMgoOVerP30c/B1wxlg4eYXkkXcP4M7/YH4gAglIuVsb8yJO 3Mu3aaALwKCOsSadUn0pjeeMq4NJUDxSLBNEcwtsVX7deqGJ5xWq3VHBHwLoL5rWwn37 XWMZ6uaEbzBwhakqu8xRg5jMVm6BYTcYm+PNN8UtG7K6M6/1MCLXSz+hE4ix5lQtdRJA L2ZlYTptr8B0mw29x3qmXJIGhptp+uJG6mh1lSSh9UD63TZxjrJsrNPWKMYqvPtt+cz2 HKJA== 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=N31SHi1vcAwI2b+aL7Oj8AZEQ05hYSo51Ec1XCur/yo=; b=1vPEQGGeOWXIofg7Hic/71B6xEzqfP8rtejtkNX92hahk8mAiFLNArLvjDgOy40DWM CCMBXyj34fNBPoZKEaZ/FegmJ/u6CL7NEK5d4KBjiRWcICBRviuLIiuwKun+gMVNo7h6 Bs2SrwGDrD+h4+r8iPb8uP03CWefO6fipD+A5cL/ZK4X2d2D0KGfxyUSuWMz+7bhTlps q2kxGjFlTFam7xfPz/F5o9ZgS5Laj1EdSmcQxrx/kME0IdClDaGQa1jmM4RbH63FCwRu 3+bYXO1tEi2KxWZbClrD4duQDb4ajsPYlyVl0N6v/Rd4MMsXebUKMPW9lSJcQ0ZYErkR wZdA== X-Gm-Message-State: AOAM5325GOxdrJpUbmkhK77jrE3Ga1yKa+4/qWdWExz5+5zqBAgqIUBH xXu2JkcTdU/+D4O+da41Bk4aiNgHHIJ/naSML2D8fg== X-Google-Smtp-Source: ABdhPJyr25XuHSeyCnYIEZOgH937fY5AH/ZtzLp3Ti3izjk2JMdnbHgSRQiX8jy6mQzK3ocRGjmEA6T06Ys/ToVvJ6E= X-Received: by 2002:a17:90a:c705:: with SMTP id o5mr1246757pjt.241.1644475410553; Wed, 09 Feb 2022 22:43:30 -0800 (PST) MIME-Version: 1.0 References: <20220203090359.29270-1-ghalem.boudour@6wind.com> In-Reply-To: From: Ghalem Boudour Date: Thu, 10 Feb 2022 07:43:19 +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 I agree with you. Will submit a new revision. Thanks On Thu, Feb 10, 2022 at 3:43 AM Xu, Ting wrote: > > > -----Original Message----- > > From: Ghalem Boudour > > Sent: Thursday, February 10, 2022 3:27 AM > > To: Xu, Ting > > Cc: Wu, Jingjing ; Xing, Beilei ; > > dev@dpdk.org; Thibaut Collet ; Olivier Matz > > > > Subject: Re: [PATCH] net/iavf: initialize large VF setting at startup > > > > 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 > > > > > I think it is OK to move outside to the generic vf initialization since it is not only bound with RSS, what's your opinion?