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 D9EEFA0528; Fri, 17 Jul 2020 09:32:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13CF51BF5C; Fri, 17 Jul 2020 09:32:05 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id DE2B31BEDF; Fri, 17 Jul 2020 09:32:02 +0200 (CEST) IronPort-SDR: I/3l5JNH23hSTDeEWWdpDuSuhnWKLuHqjt5qXgIDP8u6Cq7w8d7qT/PrCrC2ErycUru7dpkc7j cpzmgok/6veA== X-IronPort-AV: E=McAfee;i="6000,8403,9684"; a="234402408" X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="234402408" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2020 00:32:00 -0700 IronPort-SDR: JEftJgvUyMxRK060uWbVMEV9igfZD5n+5k0R87fazsn0z5DSQQ+AM/xyW9DNV5azp/GHosW6nW Z+XX8KdNxrTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="317273909" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga008.jf.intel.com with ESMTP; 17 Jul 2020 00:31:47 -0700 Received: from orsmsx115.amr.corp.intel.com (10.22.240.11) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Jul 2020 00:31:47 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX115.amr.corp.intel.com (10.22.240.11) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Jul 2020 00:31:47 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Jul 2020 00:30:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LwqHWGwZ04BRhQMuHGFHyCtmszbig+ffGaxQ/WT2MUcHp/Iw01aMrHhpPszxU0Kdczsrhl90wK668iLYMcSZ0nXetFMoZawUKZm/e8JMeTpvTdcJsDr9dueqiPDIyPCj0hhPHL32O1eVLLR0W84CDvDQm3HyNx7qBjUyy8knjdyBtVICya9a1p6g+GviXdz4u5SDpfhaDsezyaY1ygRhVl93sIOVKklH4HAuVUhx8ceHN4DoPzbIenW5WuvY08KNfyqH/MRgLATWk/pRBa1gYFv3foojsfvG+j+FFxRPpo5mKunvAhVbDK5TuWzQvHnB/EFLdKq9K2mR8l0soT4Iuw== 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=TT1jAJzy4vf95+6pG82xnf7WioFGSWVXSX/2Y5j10Fc=; b=Fn933eB2V5buQ5VX1qFxQe9aU5kgypD57gPjFjRqXJIrDl2SVJHym2EM+8DAfE/JEr+mKOtkBjDMdloZr2E5kqJayDiHzOFnailY+ThhBFqjhg6hFXGNa32oqZQ/YE/PHZ/PKDw12kcghphJq+Ls1x4ZzVxSraaizIRNmz6+y6l5XSRSeFBUAG+BcR1peo+h6BjIAusEgbHxjYHF1en/ePMihS5T9R1weI4nCorMimqTSpX688P8VHtx347ns7CnA27innRvx+vrEoWb6dE6lGgV4tmjKWBpGA+Y8vknT1JZcnATfyja/ddMNpAQQlGSvJoLSG6lcHko9/wcg0a7lA== 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=TT1jAJzy4vf95+6pG82xnf7WioFGSWVXSX/2Y5j10Fc=; b=WnGHJEsjTfNpRhSHvbh3r2h3IGZMIkcdeNsRGrhkonkm0JRauhulqxavWZNzT+vi5L7NJEbieiYf0bCiBVgSav4Og749s3wYbxmTjNDEqDj6kc8UhOfWrH7c4Ji/OEVSS8L8bbfqAlxCyRueVCC2gNgst776K0khJDZO5ZyMWGw= Received: from MWHPR11MB1391.namprd11.prod.outlook.com (2603:10b6:300:23::15) by MWHPR11MB1390.namprd11.prod.outlook.com (2603:10b6:300:22::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17; Fri, 17 Jul 2020 07:30:17 +0000 Received: from MWHPR11MB1391.namprd11.prod.outlook.com ([fe80::f8f5:b48c:be92:ac17]) by MWHPR11MB1391.namprd11.prod.outlook.com ([fe80::f8f5:b48c:be92:ac17%3]) with mapi id 15.20.3195.022; Fri, 17 Jul 2020 07:30:17 +0000 From: "Zhao1, Wei" To: "Wang, ShougangX" , "dev@dpdk.org" CC: "Xing, Beilei" , "Guo, Jia" , "Wang, ShougangX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix missed i40e filter pctype Thread-Index: AQHWWoGK6vX+aPMT2E+9t61sy/xEXqkLYxhw Date: Fri, 17 Jul 2020 07:30:16 +0000 Message-ID: References: <20200715080810.45639-1-shougangx.wang@intel.com> In-Reply-To: <20200715080810.45639-1-shougangx.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWY0OWU5MjEtNGM1Yi00MDM3LWFhNzQtZWQ1MzQwYWUyYmJiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicTQ3QWtKXC9nRE4zd1hXSDFkT1paOTlWc2dkdWgrN1V6OHlGRVgyaDloclRIelY1clV5Nk5IZWgzaTI3NHRtemwifQ== dlp-version: 11.0.600.7 dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action 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.198.147.212] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 21da8fec-5a68-49d6-50ba-08d82a2340be x-ms-traffictypediagnostic: MWHPR11MB1390: 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:758; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kx3A4yucbD9EasqKwQpXhtqv0Qagtb9EygCjFEETVCYJ1KEoFT3OjniZgBtt8inMfBYNQXjme4Ly39PdoYEmzCElwlJRvzfdABzN7qb2SuVNvHsSONuGVsPpTjMRGZTT0e9O62ibcA6IjDwWg9l3hGYlOtCKSq61QzaakR4/emONiKjDibNpZpPXXn/pJTjjKVUwGYYTJrMo34Xwpa8uqjEZOn1zDtFumAsJwKpNzsvSZMYzakPiTo2cDV9gdlP2+H+OMMVPXuYuKxdxUMAhLYrcK6JdcAVsgaMFFRGg4r8ywvArJ654hgf2Nbdp4Nz5 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1391.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(366004)(376002)(39860400002)(396003)(450100002)(66446008)(64756008)(71200400001)(33656002)(478600001)(316002)(9686003)(83380400001)(86362001)(8676002)(8936002)(55016002)(54906003)(52536014)(110136005)(6506007)(53546011)(26005)(66946007)(66556008)(5660300002)(66476007)(4326008)(7696005)(76116006)(2906002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: M52O1088+i2n2Bq6jcaYT8b0sbRLjXBnE31FKvwfisNcE2YDFw98PwdhOwXfA//mMf+olwHriqU+DVVSXE39hjaiOt8TyDAlAl/+DAQ8S0c9HHotzUTdB9XUEXtwSPmATJHpzwOpPFDGoWlbYLA1dATkF1l8aU+ASq2Obs4AjBUAnTc/JQnVac7W+K8haDIdRbs5cKfsqDKmGwsGJScPiaaHvvcP+2szdQUUJ1JOeKM4WcVVyOjp2q0ZcmkZHyXv8Megx4VVnZdICVyO8l0qlQAEYkoshuGuZTzxgWjfe54V/rfgg86rmBX8LdPZbLnGLWF3cPLz+14pXKCCRU0C2jaNPF/AUf8Z7G5xG7Dlj+ifuPVujBa/PApcLXye2mBLLM13/yOTtovcYKylzfbRyTYA2rsc26yAoyMZCR1Q0fG0CdN+/RRcgle9QyI8mJXFQZYC4lNi9cZj0i36H3/4fCsDbzxt0OiZYeJ0uoJNfqQ7FyaIAySxxkqutFSQjZWJ 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: MWHPR11MB1391.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21da8fec-5a68-49d6-50ba-08d82a2340be X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2020 07:30:16.9612 (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: wC2BYoV9aHq2BHSCXmFQFQfyCvIQ6TC1I0O3f6RJbUE3XZB2+LwczVHmrLpVt0tRIvkT040dG8+IZe3ZBzwPdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1390 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix missed i40e filter pctype 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" Reviewed-by: Wei Zhao > -----Original Message----- > From: dev On Behalf Of Shougang Wang > Sent: Wednesday, July 15, 2020 4:08 PM > To: dev@dpdk.org > Cc: Xing, Beilei ; Guo, Jia ; W= ang, > ShougangX ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/i40e: fix missed i40e filter pctype >=20 > The i40e_filter_pctype TCP_SYN_NO_ACK, UNICAST_IPV4_UDP and > MULTICAST_IPV4_UDP for x722 are missed when translate RSS type to > i40e_filter_pctype. This patche fix it. >=20 > Fixes: da7018ec29d4 ("net/i40e: fix queue region in RSS flow") > Cc: stable@dpdk.org >=20 > Signed-off-by: Shougang Wang > --- > drivers/net/i40e/i40e_flow.c | 45 ++++++++++++++++++++++++++++++------ > 1 file changed, 38 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c = index > 7cd537340..7f34bc5a4 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -4853,11 +4853,12 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > const struct rte_flow_action *act; > const struct rte_flow_action_rss *rss; > struct i40e_pf *pf =3D I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); > + struct i40e_hw *hw =3D > I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct i40e_queue_regions *info =3D &pf->queue_region; > struct i40e_rte_flow_rss_conf *rss_config =3D > &filter->rss_conf; > struct i40e_rte_flow_rss_conf *rss_info =3D &pf->rss_info; > - uint16_t i, j, n, tmp, nb_types; > + uint16_t i, j, n, m, tmp, nb_types; > uint32_t index =3D 0; > uint64_t hf_bit =3D 1; >=20 > @@ -4889,6 +4890,24 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > I40E_FILTER_PCTYPE_L2_PAYLOAD}, > }; >=20 > + static const struct { > + uint64_t rss_type; > + enum i40e_filter_pctype pctype; > + } pctype_match_table_x722[] =3D { > + {ETH_RSS_NONFRAG_IPV4_TCP, > + I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK}, > + {ETH_RSS_NONFRAG_IPV4_UDP, > + I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP}, > + {ETH_RSS_NONFRAG_IPV4_UDP, > + I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP}, > + {ETH_RSS_NONFRAG_IPV6_TCP, > + I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK}, > + {ETH_RSS_NONFRAG_IPV6_UDP, > + I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP}, > + {ETH_RSS_NONFRAG_IPV6_UDP, > + I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP}, > + }; > + > NEXT_ITEM_OF_ACTION(act, actions, index); > rss =3D act->conf; >=20 > @@ -4914,6 +4933,18 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > break; > } > } > + > + if (hw->mac.type =3D=3D I40E_MAC_X722) > + for (j =3D 0; j < RTE_DIM(pctype_match_table_x722); j++) { > + if (rss->types & > + pctype_match_table_x722[j].rss_type) { > + m =3D conf_info->region[0].flowtype_num; > + conf_info->region[0].hw_flowtype[m] =3D > + pctype_match_table_x722[j].pctype; > + conf_info->region[0].flowtype_num++; > + conf_info->queue_region_number =3D 1; > + } > + } > } >=20 > /** > @@ -5011,9 +5042,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > info->region[i].user_priority_num++; > } >=20 > - j =3D info->region[i].flowtype_num; > - tmp =3D conf_info->region[n].hw_flowtype[0]; > - if (conf_info->region[n].flowtype_num) { > + for (m =3D 0; m < conf_info->region[n].flowtype_num; m++) { > + j =3D info->region[i].flowtype_num; > + tmp =3D conf_info->region[n].hw_flowtype[m]; > info->region[i].hw_flowtype[j] =3D tmp; > info->region[i].flowtype_num++; > } > @@ -5026,9 +5057,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > info->region[i].user_priority_num++; > } >=20 > - j =3D info->region[i].flowtype_num; > - tmp =3D conf_info->region[n].hw_flowtype[0]; > - if (conf_info->region[n].flowtype_num) { > + for (m =3D 0; m < conf_info->region[n].flowtype_num; m++) { > + j =3D info->region[i].flowtype_num; > + tmp =3D conf_info->region[n].hw_flowtype[m]; > info->region[i].hw_flowtype[j] =3D tmp; > info->region[i].flowtype_num++; > } > -- > 2.17.1