From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 86F97A0518; Fri, 24 Jul 2020 07:42:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29DC01C01E; Fri, 24 Jul 2020 07:42:58 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B090CE07; Fri, 24 Jul 2020 07:42:55 +0200 (CEST) IronPort-SDR: t+9V4v1GPPKzYvM+JBp6SNUQLnGSjQcLvAxHCOmE3rFyzjHl/OQqz5h36PBeX58+MdInn7rLnR k6LnjEBIPtxg== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="215251723" X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="215251723" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 22:42:54 -0700 IronPort-SDR: 3z3oqCNocdQJ6DmmSWqqMRfyAP5iyLUJte4vg7pUXjwtwy2ffkYkqhURe7WKUvlE59flNSx84Z Ri8XzDYN5Seg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="302558626" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 23 Jul 2020 22:42:53 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 22:42:52 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 22:42:51 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 22:42:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yz1IZJ3VZxIOzrdecGIE8Mi41BHcytxM2HQEaj5yWJFEFvr92O/oLQ3YUMNBStM73v3DUMRx7Agg0Z9+bkTrE9RXSZVpZLmC132cCTEYIHx/EisuXL51zTquxpQUgwKM3o+uWZXDdeRQqqizNzLtDNU0af9te/nwEoo0FWoGqUbUC4mSSwzkugQ+L7AeL34J3dKFY0/cxzlnzw3j1z2i4LI6U1JKS6XZXVLm9ns8nlvqDKktpbyumP2Cqybvl+2udRMLReF+ns3jjFVUk1MNCdiF5sVqJNxUMhh8h+4FannUqCZvLdZOdeDeZf2Ur2/bw9LTtojYsUb8NFrQDf5KhQ== 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-SenderADCheck; bh=LwM4yFijrlbgqUk6PA7cAOshQXrlj/HMr0FCy3hX/BM=; b=SeKwDZh152qcEf2cL51C8tmQVx/T76YCCeqOKUcT9zxvLYYg/4JRJujbVRFncJJm5xiXSkVF0wNCmsjZXHjFEBXaw9W/sSdkOMISfLKAh8ChKW7f5qkxCxE8Mej0kU3/Qks99BYdvXBjm6GF4NRt+p8zHcmkScsFH9p3UHmT1EijzkgicI93ESAj/xk/EqSD3ss0TqTkUModDN7VM1EgG9TkRnomnIQ9OpzCODguhBPBuisiiM2iZXJVorWE8MVYwEwriSI2PYJYe4O2O3yJ8HkJhiNelH2tlaIMb3xtiPxv50QEIuHZkRJ/kdjMPZEXi58vK2RbMkIWWBsiU8RCxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LwM4yFijrlbgqUk6PA7cAOshQXrlj/HMr0FCy3hX/BM=; b=jHp8tLfwXrME4GDu+vairt943etx20f91d6tW8WlZJGWH2Z9Bh8KtrVafiAsuj3WxQuCgDE29nW2u1SdxziQjjVN4ZJ5gcN+LLdd4nUMc6CL4/IoqorqPwNUrH6+bQVJ902JChrLCqYmjbeRxw08b+BB6h/8wrqYyBduclkYAUU= Received: from BYAPR11MB3477.namprd11.prod.outlook.com (2603:10b6:a03:7c::28) by BY5PR11MB4226.namprd11.prod.outlook.com (2603:10b6:a03:1bf::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21; Fri, 24 Jul 2020 05:42:49 +0000 Received: from BYAPR11MB3477.namprd11.prod.outlook.com ([fe80::11b9:abd9:39e0:f26a]) by BYAPR11MB3477.namprd11.prod.outlook.com ([fe80::11b9:abd9:39e0:f26a%3]) with mapi id 15.20.3195.025; Fri, 24 Jul 2020 05:42:49 +0000 From: "Wang, ShougangX" To: "Yang, Qiming" , "dev@dpdk.org" CC: "Xing, Beilei" , "Guo, Jia" , "stable@dpdk.org" , "Di, ChenxuX" Thread-Topic: [dpdk-dev] [PATCH v4] net/i40e: fix incorrect hash look up table Thread-Index: AQHWYWeGVDEv7hi1akun0axOM7lZWKkWLfGAgAAFrMA= Date: Fri, 24 Jul 2020 05:42:48 +0000 Message-ID: References: <20200715063515.9262-1-shougangx.wang@intel.com> <20200724024712.10727-1-shougangx.wang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.46] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8fdb9f40-2759-42df-a6b8-08d82f946647 x-ms-traffictypediagnostic: BY5PR11MB4226: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DfMQ/DlWaXP2z5Xe95bp+DMKXbydDWBD9BzAIls8X2CM6GKOEyS/Qd/ze8tPdlZUNKmA9y2/IBg/3g4eVAAy+pYUFl1/JRj2M35u+0A68UAOYnqm5xRfFh4biJpXFntGN7jlK244blmNmQrTkaqWvt/MvwWqS83Yw5C0uMPQorb91gLO1+Z4AGiUiQgad9b1ALvekOXOMNa23ctjtLREsd3l4YpIV/oSWgiBQuSVBe9OLgC6z+VRJhd07/wy0tE6xjeAFxs2qRIlY29gDtMvqzWs+HwK2lcg1F5f+38uxDog6fVOWN+DYpCIee1D4RCqRA6deSZZ+VL6KudoEkdDSw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3477.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(136003)(366004)(346002)(396003)(376002)(86362001)(66946007)(52536014)(6506007)(53546011)(66446008)(64756008)(71200400001)(2906002)(76116006)(66476007)(66556008)(26005)(186003)(7696005)(478600001)(8676002)(110136005)(55016002)(83380400001)(4326008)(54906003)(107886003)(9686003)(316002)(450100002)(5660300002)(8936002)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: fjmfD78G2HPYy7P722MhQW9t4nfvVQ/aTm2VbywrwlSyGvYasb4wiGKj5GrgUT7hbA4LLZGa+8JczZcWOxtNGYK46pg+emVYXpzI2LS4MvsLof7RNBL8YpyQSy5vRxhX7xPX9gLKxvNHN6FWDYmUwRdsOGSoE7dKZcXkxhKKLJXGkPF9oTAjaFmxB08jluf03mL1bpgVnupqT+sTQqZKumuWwZ6LinMFih1y4TrGaOrO6MJVCPp86VmX4B8uVimm9Nn1NNAHCJhERp9h1yp0lzVgLyIOtZ8CWlFzqTtwg6ZfS9QLs1virJp2TyQLQu6a0V1hCkt18Szur19F0b0k+gpEsJc/dfDvjYtcibBxGq/7+9UU3rf+zHLAfuQjiNcx6AuJrPXCqMWlQrMsavxbC9hmQcIY3vpQveD0qK1I/4D4LJUj3IXzVw2kybu+Q7j4NX5irRAPGFz7bpDFLKim1gAkyvmtoV2FmL7S4Cmn+Yw= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3477.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fdb9f40-2759-42df-a6b8-08d82f946647 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2020 05:42:48.9113 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GadZJBGUIbREaHZohANkDoEgYAwCDTng3yuLKL63zwW5i1uKkwWTLOUTTvQYQr9ZolMGPzz1CIysQ3ntYYMLfPZKNWp2ov1xs6IKu8u7ITc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4226 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4] net/i40e: fix incorrect hash look up table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Qiming > -----Original Message----- > From: Yang, Qiming > Sent: Friday, July 24, 2020 1:08 PM > To: Wang, ShougangX ; dev@dpdk.org > Cc: Xing, Beilei ; Guo, Jia ; W= ang, > ShougangX ; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v4] net/i40e: fix incorrect hash look up t= able >=20 > Hi, Shougang > This version looks better, only two small questions. > Once somebody gave comments to your patch, you should reply the > comments and CC when you send patch next version. > You don't include me in this version, don't forget this next time. Got it, I will keep in mind. > Qiming > > -----Original Message----- > > From: dev On Behalf Of Shougang Wang > > Sent: Friday, July 24, 2020 10:47 > > To: dev@dpdk.org > > Cc: Xing, Beilei ; Guo, Jia > > ; Wang, ShougangX ; > > stable@dpdk.org > > Subject: [dpdk-dev] [PATCH v4] net/i40e: fix incorrect hash look up > > table > > > > The hash look up table (LUT) is managed by global register but it is > > not initialized when RSS is disabled. Once user wants to enable RSS > > during runtime, the LUT will not be initialized. > > This patch fixes the issue by initializing the LUT whether RSS enabled = or not. > > > > Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS > > flow") > > Cc: stable@dpdk.org > > > > Signed-off-by: Shougang Wang > > --- > > v4: > > -Updated code. > > --- > > drivers/net/i40e/i40e_ethdev.c | 15 ++++----------- > > 1 file changed, 4 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > b/drivers/net/i40e/i40e_ethdev.c index 05d5f2861..0a3f5e3c1 100644 > > --- a/drivers/net/i40e/i40e_ethdev.c > > +++ b/drivers/net/i40e/i40e_ethdev.c > > @@ -8985,6 +8985,7 @@ static int > > i40e_pf_config_rss(struct i40e_pf *pf) { > > struct i40e_hw *hw =3D I40E_PF_TO_HW(pf); > > + enum rte_eth_rx_mq_mode mq_mode =3D > > +pf->dev_data->dev_conf.rxmode.mq_mode; >=20 > No tab? Actually, this line is on the same line as the code above, but it looks lik= e two lines here. I will adjust the position of this definition to follow the "Christmas tree= " in next version. >=20 > > struct rte_eth_rss_conf rss_conf; > > uint32_t i, lut =3D 0; > > uint16_t j, num; > > @@ -9022,7 +9023,8 @@ i40e_pf_config_rss(struct i40e_pf *pf) > > } > > > > rss_conf =3D pf->dev_data->dev_conf.rx_adv_conf.rss_conf; > > - if ((rss_conf.rss_hf & pf->adapter->flow_types_mask) =3D=3D 0) { > > + if ((rss_conf.rss_hf & pf->adapter->flow_types_mask) =3D=3D 0 || > > + !(mq_mode & ETH_MQ_RX_RSS_FLAG)) { > > i40e_pf_disable_rss(pf); > > return 0; > > } > > @@ -9198,16 +9200,7 @@ i40e_tunnel_filter_handle(struct rte_eth_dev > > *dev, static int i40e_pf_config_mq_rx(struct i40e_pf *pf) { > > - int ret =3D 0; > > - enum rte_eth_rx_mq_mode mq_mode =3D pf->dev_data- > > >dev_conf.rxmode.mq_mode; > > - > > - /* RSS setup */ > > - if (mq_mode & ETH_MQ_RX_RSS_FLAG) > > - ret =3D i40e_pf_config_rss(pf); > > - else > > - i40e_pf_disable_rss(pf); > > - > > - return ret; > > + return i40e_pf_config_rss(pf); >=20 > If only have one function call in this function, we can delete it, and ju= st use > i40e_pf_config_rss(pf) instead of i40e_pf_config_mq_rx. Got it. Thanks for your review. Thanks. Shougang