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 A9796A0518; Fri, 24 Jul 2020 07:08:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FF5F1D530; Fri, 24 Jul 2020 07:08:02 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6CE491D44F; Fri, 24 Jul 2020 07:07:59 +0200 (CEST) IronPort-SDR: uAo1svIXl3JfPY+1Zi5yjwW2Quc/iBGvKAYANpuEYSyioLrCUDLm79LnSj4sMnVXI6BqJll30L WP1VcGPPiQmg== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="150645893" X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="150645893" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 22:07:58 -0700 IronPort-SDR: lLlpxYdqeyiB/CpGCx/yi6sNyfsAGA8vzOF2+AqVJwBEpGu3jAL5CxZxHVo73ULm+VlJezqEmb UMhw6ZN5sHQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="489082247" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP; 23 Jul 2020 22:07:57 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 23 Jul 2020 22:07:57 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 23 Jul 2020 22:07:57 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 22:07:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eXgzdx5F3n7KAEZK5jdIKJFNYE3O6KsF+Y5XGvREuMVTxYiP6tW9set3nxLto3YIIFKZap/HpEqeW0j02lmO/vvJJhCN6QPUJWnF0NqoMG9lApEvzafBe/CAAXBzDsDWMOLK6VHPDpZDs0ZqGQK7HwhidpwA+94WxbtnduCel8M3Os6FRuXLT4Uo3fi1lnfGlPV3paoh0XryQ9waTs4uAP/hCd/Lt9psukbPS0y8Z4Y/9uA5/cR/3bjG16ks8EaTXtBiN1IHnXC/UhK3Kx/4CUSMnbXvgaDv7QeZrZic2RKtgiDWY5FUWrNKh+N2epDfVJS8j8EB66FhGmi+Au8u2A== 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=jDhz9p5lpad4AsfCa9I4eeMIqwhE00hJ05iAFtjbFk8=; b=Zu1ra6zsqxkSF1IdfLa0inK+yXfwplS7QTf5M9LftXvbQY8NBm5IqvuJpmDT7Xc+tO02B9+03qrsWK3TFgPdIHR1elZeIx2lr0pYH0z7jKM+2jjSLTJiHwWrL1FLEupFrPUct2tTOuXy0bmXz2dp4kH7y/dH8oUrgJRD4RUajHaoyWpcukfr8jAi0ZG1X+7VhjqdAUgjugvRlR9Mj6fdCo8B1QqcCtF5dIAWmpygKw390nFceM7xWMraASTBBSLNti2exHtluF8sXnTlMSfL5UHqmOm857k6Q8GVv2trPEANZV4vxhlP4O9zFWS/DTvbup+CymEmvbzf/m4NDkWsDA== 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=jDhz9p5lpad4AsfCa9I4eeMIqwhE00hJ05iAFtjbFk8=; b=d2/e4yj6NiSivGdjHKe4wRECP2A0sldG5lMVSaFdrSDILfWeR8k9NSHmhDF61Nuvf65ZIoyot8YvuLzhN4yvfYZWmHuk3B8UO03DMJacRY3KwCu6k4IJjY/M1wDAeAG9F3Tec2sUW089zxLTITrGWI1YYYPtXd3RmNfpbU4k5pk= Received: from BN6PR11MB0017.namprd11.prod.outlook.com (2603:10b6:405:6c::34) by BN8PR11MB3716.namprd11.prod.outlook.com (2603:10b6:408:8a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 05:07:49 +0000 Received: from BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120]) by BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120%6]) with mapi id 15.20.3195.028; Fri, 24 Jul 2020 05:07:49 +0000 From: "Yang, Qiming" To: "Wang, ShougangX" , "dev@dpdk.org" CC: "Xing, Beilei" , "Guo, Jia" , "Wang, ShougangX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4] net/i40e: fix incorrect hash look up table Thread-Index: AQHWYWeQOz0f4vGahk+Z3HZHCOs8DKkWLESQ Date: Fri, 24 Jul 2020 05:07:49 +0000 Message-ID: References: <20200715063515.9262-1-shougangx.wang@intel.com> <20200724024712.10727-1-shougangx.wang@intel.com> In-Reply-To: <20200724024712.10727-1-shougangx.wang@intel.com> Accept-Language: en-US, zh-CN 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.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9f5671f5-ae04-4286-f32c-08d82f8f82a5 x-ms-traffictypediagnostic: BN8PR11MB3716: 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:1923; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zftWtAAt/fsdMJ0xjtINfzrZolvF/qR0ZXeqQbEQ78HxPD4lNkllVI1Jobuxm2REhjT2YhkcEnDHItRYoTYle0wx7m54itrOJwzVbrvslIjlZO+Bf0bIwa3dCYBX6TnMjJK/yJQdaQn+6v9/4xV/YOd13YcaN5XLFxtANfpH4UZYURpImQsKhfJ+MzOH/ua5kjmDHaDM2ROAp8EzEsnUv42zIBI2EBqwiN+0IWCpYa9aMH0BkwuKDEexocBzEJvyaWpqUKnCPiYYkw3I9nl3/Pxxux2MnGQXuh4p2HgJa3qNifhuhSWgPK57HGwEEm8F2x8iBOLewiiCISdQw1OxXA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0017.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(26005)(8676002)(186003)(8936002)(64756008)(478600001)(7696005)(86362001)(66446008)(2906002)(33656002)(83380400001)(316002)(66476007)(66556008)(66946007)(55016002)(9686003)(450100002)(76116006)(110136005)(6506007)(53546011)(54906003)(52536014)(5660300002)(4326008)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: qn7/nQafC7dG8D2VZbS7sh/9s5Mobeh1BP9hiIocgxh6xYvcqfV8UAqtLjrGDypaiyQBbCPe9wZlkhasG6BmaAxG0hz4NKiMzrRgnRxwpXAo2tPLWb7WEUAJP7rSOB4qFC0ZBPRAfUbhYo0wcn9KlI2djDHPj8aNHsORJjCJCO66tyTdqO1XdsXkhBuU9lxczcaxC/9QMA+o6ssfIShF0iJWBkmnkVDmo1GS0TILYd9YqQYbZHJbaVgOveeB+Zd5pJFJFmxZCM7S1Hz3uCXL82UeUcXwPZJAWIUzmU6GgDNdYwKhNp+sz2fUjkIwbZU4fbw9kRoHuAqfgZ1qnnyF08wHW+UZoKOHauwvUtH/ZPQF6RhE9iov6INF2vBybrI5HN4Yvd5BT7kHG2qedm7y/ENkMTH7NPdQlVpI1+OIJcrH7QlucfZIWLXimuHbm0qJ7p04BipD6Og0+axymazrdKCbtGTyfZAz+a3ryfuhgF3sXNnMFstXh2EFbm7gL/En 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: BN6PR11MB0017.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f5671f5-ae04-4286-f32c-08d82f8f82a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2020 05:07:49.0348 (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: aw4Q3PDjo1RTLIb9hyZIlOyLN0LL4eE1Qz6pS83+Bnuhdm+hgFDcfkE3PD2X6rhIRZW+FaKGE2MzClBdjFhdMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3716 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, Shougang This version looks better, only two small questions. Once somebody gave comments to your patch, you should reply the comments an= d CC when you send patch next version. You don't include me in this version, don't forget this next time. 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 ; W= ang, > ShougangX ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH v4] net/i40e: fix incorrect hash look up table >=20 > 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. >=20 > Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow") > Cc: stable@dpdk.org >=20 > Signed-off-by: Shougang Wang > --- > v4: > -Updated code. > --- > drivers/net/i40e/i40e_ethdev.c | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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; No tab? > 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) > } >=20 > 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); If only have one function call in this function, we can delete it, and just= use i40e_pf_config_rss(pf) instead of i40e_pf_config_mq_rx. > } >=20 > /* Get the symmetric hash enable configurations per port */ > -- > 2.17.1