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 35576423CA; Fri, 13 Jan 2023 23:03:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C80D242D86; Fri, 13 Jan 2023 23:03:42 +0100 (CET) Received: from CY4PR02CU007-vft-obe.outbound.protection.outlook.com (mail-westcentralusazon11011007.outbound.protection.outlook.com [40.93.199.7]) by mails.dpdk.org (Postfix) with ESMTP id 32C3540E0F for ; Fri, 13 Jan 2023 23:03:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AdpGc6qPATC0S6vjXgcMnspo9Vle48pd6Yag3GMRiKXZdoV+B9vRM9U9Gn1LOjes5js0kAhJ5soYwkipxSR0TknsuTzXE+UVJY6UrVNe/FNkEtAC7GyS+mD8NxlThcE1pWctgNlkoxfxMWNpWDo/VBCVC2wx1rLmYAbguswHhq1fUsTzufGobNGvMZhqzU2cRyx/M+zAJ5iTSkOL7Fr1Ep2b1hQQ10SIRJE0CKWUjJaC5XS/HxKg1X4isdDSucWL+76UmuUeLvEhoUXTDN43so6FfJXOfDB3ubWpjDaroMC9HQ6AVAAVw8gIAhys+gU/o4ZS2pRkZDbIPW5pY5a9Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GDSSIwWMg10bgIH3DdTiS0g4EDjYDUq+jeM5G/c1Eqo=; b=KfYuamXnKefJfm1sEkBuh+DYdLKg/cPNQsEPDPLmg/QWIWPIYjSdF0S/wJybTKI+kB036UpPGY+IC5wk2hsnWixsoUO9wwCeZh51tnHhrg3RX8BKVmerYKZO7Cc4OZZCGqNznKwco/lDIA2LxuntZwBwIp3JoTDW2hSASTbkODxn3WXgs7EC5E/jV36biLEBDem8OCkeWdN9J+OnRwLemXNJR/P0Z0EGdEaurqsCSvh/VQXulqiWZ4UiY0YFpUqGVGqHcltobq8EiyiwPN2kJNG4CAwZaAGkPUEh/praYH1W8NfwwdYlLXYZN622jejXBFzlYboXzhz4tIXH1ej7kg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GDSSIwWMg10bgIH3DdTiS0g4EDjYDUq+jeM5G/c1Eqo=; b=ha/IR8PSnFjn9xwWh/euPkOzR49K83l1I9lUvmS51ewUQBm8NNnt6bhX9UnouuwH2o8cD/L8xIyM3z47wh7LfK8toxvzd2vUL+aQaomXPwcj1aEKtcATRvb/PHC4CdvE1NuPjbgy1Ri0zgxkkwNjawjRNpxmgEpPs92wkYGI/x8= Received: from BYAPR05MB5911.namprd05.prod.outlook.com (2603:10b6:a03:cc::28) by DM4PR05MB9512.namprd05.prod.outlook.com (2603:10b6:8:108::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Fri, 13 Jan 2023 22:03:38 +0000 Received: from BYAPR05MB5911.namprd05.prod.outlook.com ([fe80::8b5:132a:dcce:38ee]) by BYAPR05MB5911.namprd05.prod.outlook.com ([fe80::8b5:132a:dcce:38ee%3]) with mapi id 15.20.5986.018; Fri, 13 Jan 2023 22:03:38 +0000 From: Jochen Behrens To: Ferruh Yigit , Raghav Roy , "dev@dpdk.org" Subject: Re: [PATCH] net/vmxnet3: added checks for TCP for RSS Configuration Thread-Topic: [PATCH] net/vmxnet3: added checks for TCP for RSS Configuration Thread-Index: AQHZFPNvCePsPU5WNE2p3WvRdJ3CY655k70AgCMZWoCAAF3SdA== Date: Fri, 13 Jan 2023 22:03:38 +0000 Message-ID: References: <20221221041917.29569-1-royra@vmware.com> <20221222082434.18336-1-royra@vmware.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vmware.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR05MB5911:EE_|DM4PR05MB9512:EE_ x-ms-office365-filtering-correlation-id: b5b04056-34b5-4858-75c6-08daf5b20623 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rXD86GFo/gHTXGKDS+BxMuY4eqSJt4lsWM64gNF4sW7MZPmt1l+iitWOwxI/v/1+XU2ArVJHUHrjPC86Emsa0du8Ht9pKC1PTaiY3IAqSHms+vH+VUwUOn3ooVWGCZwzaT4JTtQWxS9I2vsik1jRP4U/lht+5IYelJsdXM3lsevrB5lYgnmEiXQ77CR87pPfRqH9QolSnfoAQLIWpdWoVq+8I/aqU96KZQE31wIfwTWOF3w/eweF45TdCJmbHxcDJ1mEVuyKQPDVEokNzYYqClKFiCS6gLJOrU2TAnJwXy9+ddkpwLpBI8QGFozs/jj/TlFqJ65G/7/GVu3r6/Rf0vvkFapUUc/Js3ECSlrC/ek3yWuvInzKME1+zgXY/UQ/oNt3LOtzQVW3C6DiIKL9Rj1UNat6A4x1cbQlPCk7HejyeiR9XuALj98C7142lNmoZp/qTb4uJ/DvKsTF24jHxrsdkKZ557xNwHimOAzFDiovlkxJCO8n8TOxSNp4hQS6wa9ogcxqWwx172l5sWz8lLlVMexRpzg5tfpFnfWlJrm7GlqLnmoKyTovVwvdu1qv/+VdtKOnNr/SGOXyiqbx0ABlL95FMhDvQHJfyiprWmRL6jG0uKDr3pMcnIR1s2ZW8Dw987d0LaSwKhhPuEdTMyqcNI6iqrzz/UyAkZNMKLqLMj/Clf5w/2l+omfmdJXh/Jp22I4Qt69Uz+FKw4QwQg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR05MB5911.namprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(396003)(136003)(376002)(39860400002)(346002)(451199015)(2906002)(8936002)(33656002)(53546011)(26005)(186003)(9686003)(41300700001)(5660300002)(52536014)(55016003)(76116006)(64756008)(66556008)(66446008)(8676002)(38070700005)(66476007)(86362001)(38100700002)(71200400001)(122000001)(7696005)(83380400001)(6506007)(66946007)(478600001)(316002)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3TGNfz854xmS0xMJgzuoqvXcGGWDanqr6TYrg4432WdupKK3m3eZUjwiIClU?= =?us-ascii?Q?DdrOdsytXoXVMcFsMcTSuBjEEsNl3I/iN/P8geHnZSFF11s5l3ynFMlTSOPp?= =?us-ascii?Q?GTG4svCAeo+qHZF25ooTUoDc5HIl7OpHoLKR8iQlO8+22f+TFuABGEeUjaS9?= =?us-ascii?Q?6y13v1Rtg3Y1GPANAY5t6GNolab+Hc70zeXr8yEOw2zSx1E1Xx9lkQx9mWBa?= =?us-ascii?Q?S2xjrmAFIm/od8cN7jznbofMWd3kb14Ym0vzjEZ1iGHV4LwZYX3D2WSC9QD1?= =?us-ascii?Q?v8C86X0QI8+RK/rFRvrhDX3+o+CrNi+SDxZCMn2KiNME+cSaEljChGfn+NdJ?= =?us-ascii?Q?2tjs+SgGX+gc66VUrcvXTsc+fv5ejU7WIeiDj+oQ+YartUniGi3lBklEAwyj?= =?us-ascii?Q?F50NwXWDIi/RoCvbnxzY5vcZ20a1zV+O1qjInb3g8F8+OWuVaFnMEvGDJ2uZ?= =?us-asc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B8C/s+/N99?= =?us-ascii?Q?1l966rbM6eNe0KP3PkIoAx1L6T9zDDeyto6c8pwFp37IJk+kEsuK0nReUTDU?= =?us-ascii?Q?K2VOLuAcUc48GDXy3ZiE509d0x0W2ImTSz7X7GzA/50mjVsFNRKw2pbY/06C?= =?us-ascii?Q?dS5R64ky+1nLc65FYiPfKc41WnU47HIqV2MiTLWXD85Rgcq09FqgJjKDBJoE?= =?us-ascii?Q?bDlD3AwPKHWplOz+S+97ZolF9dV0Su0aMFyaD6H/ytHdT8qJ3YuKGOxzl+uy?= =?us-ascii?Q?yw=3D=3D?= Content-Type: multipart/alternative; boundary="_000_BYAPR05MB591191EF0763AD0C599F3CDEA0C29BYAPR05MB5911namp_" MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR05MB5911.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5b04056-34b5-4858-75c6-08daf5b20623 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2023 22:03:38.2005 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: iDll7J5T3UPGRWdnV3e77UH/DvtcGxPMutsaR0tiR0W/cxRXutvBx2LaAWXMJOBSkwEGHNNvSEzKvc3pJafIUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR05MB9512 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 --_000_BYAPR05MB591191EF0763AD0C599F3CDEA0C29BYAPR05MB5911namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The check is at an additional location. I agree, and pointed out to him off= line earlier, that a check for the h/w version should be used with the addi= tional code, too. Jochen From: Ferruh Yigit Date: Friday, January 13, 2023 at 8:24 AM To: Raghav Roy , dev@dpdk.org Cc: Jochen Behrens Subject: Re: [PATCH] net/vmxnet3: added checks for TCP for RSS Configuratio= n !! External Email On 12/22/2022 8:24 AM, Raghav Roy wrote: > Added checks for TCP in vmxnet3_rss_configure() > This check ensures the hashType for RSS, when enabled > just for UDP, is not NONE. > Mandatory hash functions for v4 already added in the past: Commit 52ec00fd1474 ("net/vmxnet3: fix RSS setting on v4") Now this commit adds it for all versions, why it was fine in the past but it is needed now? @Jochen, can you please help reviewing this patch? > Signed-off-by: Raghav Roy > --- > drivers/net/vmxnet3/vmxnet3_rxtx.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmx= net3_rxtx.c > index a875ffec07..e8407c9b2e 100644 > --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c > +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c > @@ -1412,6 +1412,13 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) > dev_rss_conf =3D hw->rss_conf; > port_rss_conf =3D &dev->data->dev_conf.rx_adv_conf.rss_conf; > > + if ((port_rss_conf->rss_hf & VMXNET3_MANDATORY_V4_RSS) !=3D > + VMXNET3_MANDATORY_V4_RSS) { > + PMD_INIT_LOG(WARNING, "RSS: IPv4/6 TCP is required for vmxn= et3 RSS, " > + "automatically setting it"); > + port_rss_conf->rss_hf |=3D VMXNET3_MANDATORY_V4_RSS; > + } > + ` #define VMXNET3_MANDATORY_V4_RSS ( \ RTE_ETH_RSS_NONFRAG_IPV4_TCP | \ RTE_ETH_RSS_NONFRAG_IPV6_TCP) ` Can you please describe why IPv4/6 TCP hash function is required for driver= ? And what is the impact, I mean what is the observed behavior without this patch, if RSS is failing without this change patch needs to be fix patch and please describe since when RSS is failing. > /* loading hashFunc */ > dev_rss_conf->hashFunc =3D VMXNET3_RSS_HASH_FUNC_TOEPLITZ; > /* loading hashKeySize */ > @@ -1419,6 +1426,7 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) > /* loading indTableSize: Must not exceed VMXNET3_RSS_MAX_IND_TABLE_= SIZE (128)*/ > dev_rss_conf->indTableSize =3D (uint16_t)((MAX_RX_QUEUES(hw)) * 4); > > + > if (port_rss_conf->rss_key =3D=3D NULL) { > /* Default hash key */ > port_rss_conf->rss_key =3D rss_intel_key; > @@ -1446,6 +1454,5 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) > dev_rss_conf->hashType |=3D VMXNET3_RSS_HASH_TYPE_IPV6; > if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP) > dev_rss_conf->hashType |=3D VMXNET3_RSS_HASH_TYPE_TCP_IPV6; > - Please drop unrelated/unimportant syntax changes. > return VMXNET3_SUCCESS; > } !! External Email: This email originated from outside of the organization. = Do not click links or open attachments unless you recognize the sender. --_000_BYAPR05MB591191EF0763AD0C599F3CDEA0C29BYAPR05MB5911namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

The check is at an = additional location. I agree, and pointed out to him offline earlier, that = a check for the h/w version should be used with the additional code, too.

 

   &= nbsp;            Joc= hen

 

 

 

From: Ferruh Yigit <fe= rruh.yigit@amd.com>
Date: Friday, January 13, 2023 at 8:24 AM
To: Raghav Roy <royra@vmware.com>, dev@dpdk.org <dev@dpdk.o= rg>
Cc: Jochen Behrens <jbehrens@vmware.com>
Subject: Re: [PATCH] net/vmxnet3: added checks for TCP for RSS Confi= guration

!! External Email
On 12/22/2022 8:24 AM, Raghav Roy wrote:
> Added checks for TCP in vmxnet3_rss_configure()
> This check ensures the hashType for RSS, when enabled
> just for UDP, is not NONE.
>

Mandatory hash functions for v4 already added in the past:
Commit 52ec00fd1474 ("net/vmxnet3: fix RSS setting on v4")

Now this commit adds it for all versions, why it was fine in the past
but it is needed now?

@Jochen, can you please help reviewing this patch?


> Signed-off-by: Raghav Roy <royra@vmware.com>
> ---
>  drivers/net/vmxnet3/vmxnet3_rxtx.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/= vmxnet3_rxtx.c
> index a875ffec07..e8407c9b2e 100644
> --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
> +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
> @@ -1412,6 +1412,13 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev)<= br> >       dev_rss_conf =3D hw->rss_conf;<= br> >       port_rss_conf =3D &dev->dat= a->dev_conf.rx_adv_conf.rss_conf;
>
> +     if ((port_rss_conf->rss_hf & VMXNET3_= MANDATORY_V4_RSS) !=3D
> +        VMXNET3_MANDATORY_V4_RSS) = {
> +           &nb= sp; PMD_INIT_LOG(WARNING, "RSS: IPv4/6 TCP is required for vmxnet3 RSS= , "
> +           &nb= sp;            =   "automatically setting it");
> +           &nb= sp; port_rss_conf->rss_hf |=3D VMXNET3_MANDATORY_V4_RSS;
> +     }
> +

`
#define VMXNET3_MANDATORY_V4_RSS ( \
        RTE_ETH_RSS_NONFRAG_IPV4_TCP | \=
        RTE_ETH_RSS_NONFRAG_IPV6_TCP) `

Can you please describe why IPv4/6 TCP hash function is required for driver= ?
And what is the impact, I mean what is the observed behavior without
this patch, if RSS is failing without this change patch needs to be fix
patch and please describe since when RSS is failing.

>       /* loading hashFunc */
>       dev_rss_conf->hashFunc =3D VMXN= ET3_RSS_HASH_FUNC_TOEPLITZ;
>       /* loading hashKeySize */
> @@ -1419,6 +1426,7 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) >       /* loading indTableSize: Must not = exceed VMXNET3_RSS_MAX_IND_TABLE_SIZE (128)*/
>       dev_rss_conf->indTableSize =3D = (uint16_t)((MAX_RX_QUEUES(hw)) * 4);
>
> +
>       if (port_rss_conf->rss_key =3D= =3D NULL) {
>            = ;   /* Default hash key */
>            = ;   port_rss_conf->rss_key =3D rss_intel_key;
> @@ -1446,6 +1454,5 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) >            = ;   dev_rss_conf->hashType |=3D VMXNET3_RSS_HASH_TYPE_IPV6; >       if (rss_hf & RTE_ETH_RSS_NONFR= AG_IPV6_TCP)
>            = ;   dev_rss_conf->hashType |=3D VMXNET3_RSS_HASH_TYPE_TCP_IPV6= ;
> -

Please drop unrelated/unimportant syntax changes.

>       return VMXNET3_SUCCESS;
>  }


!! External Email: This email originated from outside of the organization. = Do not click links or open attachments unless you recognize the sender.

--_000_BYAPR05MB591191EF0763AD0C599F3CDEA0C29BYAPR05MB5911namp_--