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 2A94BA0C4B; Tue, 13 Jul 2021 03:44:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD0CD40DDE; Tue, 13 Jul 2021 03:44:48 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 4876B4069E for ; Tue, 13 Jul 2021 03:44:47 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="208263046" X-IronPort-AV: E=Sophos;i="5.84,235,1620716400"; d="scan'208";a="208263046" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 18:44:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,235,1620716400"; d="scan'208";a="459399850" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga008.jf.intel.com with ESMTP; 12 Jul 2021 18:44:44 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 12 Jul 2021 18:44:44 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 12 Jul 2021 18:44:43 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Mon, 12 Jul 2021 18:44:43 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 12 Jul 2021 18:44:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QwA7H8L7+x9fAmTYTVmmuW8IHj565IBPgacgT+ZpS1sIZJNwlU73BRt5rjZDFRNJVGkXsZhdZj7Stwlc9nh645H8eABzfWg8AgOuhjahQ9F3zg/TslD9E6N4OPndryenoN3dbmvZuJzt78fJMab4QIMl1vqHjjo4LSMhty2/yIa4lhoEZelMMTRcSb3B7gay+2MDiFMs5EPr/cOlyINYvtK5MCqYVl8JbV7liBXXS4h7qJ5M/Zqrpt6xKdkGklm3Hf6Xr7Zu1TMKe/BKIdbdrQ6/F3wcPAhCX4HK9dN/ddlOZCKbIQZYYjFiDxWYp3Zm1TuEh3tdcK2FDY/NqjpWbw== 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=+BPwMlKAY3D1lBCON7bKWscEDk5sUYSFJxfkfJ3xM+A=; b=V/YO/AKtsHha5gWp70rPNLrQB5qsHlifl4c5isIi4hzC1b2FMXCCUdSN31sIQ/w+UUHIwCA7OdjOZp8WO1BE0DiXGFUxDGoTY9lz8GfeEWuYhWmZJntIJ14PyUEZaG91cSoNUrl3eCoMGVGmqjn3XM80S6zlWq2UiH70vYsqbxHrjAZPjj/c4XxwfmSALG4kT1T+JrToWGL8pckJiuumWaP/su26KZT7RIVBEhnzGD6dxgZYsQUHAkUCVAJGpeTLsDvLTuvBi7HHI2ulyH8c+mQ5zzsSEkIjcBN92zTxV6ZbWNULeikTO0Oa/Mb/GvbuibsDD9weR+Ng/3z6j+3PGg== 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=+BPwMlKAY3D1lBCON7bKWscEDk5sUYSFJxfkfJ3xM+A=; b=BBHBn3yt/FptnALwCRjARNWpwrxvnTqb+6sA2QF65peCRES0qvnOgY65TqcCG1MgKTtHACn84yXslSlGrqGfGrgtHqSmXUvxJDT5GR0VZD/hSN5dEBvplS7YoY9lZpFFtOYKrwmDt0NdBeCxBL3FPyFiqKvVcMJMazDZ/xzWGdI= Received: from BN6PR11MB4035.namprd11.prod.outlook.com (2603:10b6:405:7a::38) by BN7PR11MB2771.namprd11.prod.outlook.com (2603:10b6:406:a9::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.23; Tue, 13 Jul 2021 01:44:39 +0000 Received: from BN6PR11MB4035.namprd11.prod.outlook.com ([fe80::c92e:4cf:776e:41c7]) by BN6PR11MB4035.namprd11.prod.outlook.com ([fe80::c92e:4cf:776e:41c7%4]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 01:44:39 +0000 From: "Su, Simei" To: "Zhang, Qi Z" CC: "dev@dpdk.org" , "Cao, Yahui" Thread-Topic: [PATCH] net/ice: fix SPI for ESP and NATT not work issue Thread-Index: AQHXdwMDSxak9ltS0U2X2FTXhn4dw6tAGMSAgAAIg1A= Date: Tue, 13 Jul 2021 01:44:39 +0000 Message-ID: References: <20210712093914.441114-1-simei.su@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 63697c3a-c178-44ea-8185-08d9459fc721 x-ms-traffictypediagnostic: BN7PR11MB2771: 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:4303; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: F8z7j6X9MFjTOrn7X0F0mDEKuu9gazbe763c7s1BjaKrp/NpZEWrmNX8hagZ9zDVOjz2PQ7nUkloYod4nN80UV2C9eyAX50QoGG7QP6PqWOGwSjhK7CESX95995vdX2/chtJpgy9Ls/kfQ7vprCodSaOpDFt4YSzher8tAU3w1RLjJnHZL0o6CPLzL7X1ZixkQMeZSMndJdPUcY8UvOofojPqTzZVp+JGnkZ9cw39pGojzEvYOzSB5jx3Ok+NhVwMKSsdxMC31/4IduXxQz9B5G231XVpNP2gzEDKevvZIBWkt8dP3r1ZxV+mcg2jQwslrC4rFQIPsj0DScccJQ7ySZ9on5SyBGKntUbEffCGZNTiBvL39oc5mT7NESE6GNOAR8aqKfBpd2OxQIvmnh7fRCPOTUEOUFUf8UhCSmKg8ih5cazDLQtnMQBIfQjCupWVfrlqW0JmyEK9MuSUV77J953ICUC21LLr4GhE10Gpk5cVsj/6GJsp76ONOgz1dJOlTTtEuZpkNuRklXlCadK0Ccm1WSogYO4XiUyF8sHOAPXdjoWLK1xz9rIKb/hr5G32zFLDzBKvisMdvmjRttoPGZUm8Uiq/c44a32914JXdZ5ol1aDw+tBwqW2mmcSX0evG26GEsu4rMmvcE+hHjdIQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4035.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(136003)(376002)(366004)(346002)(86362001)(55016002)(8936002)(26005)(9686003)(8676002)(107886003)(316002)(6862004)(186003)(33656002)(52536014)(7696005)(71200400001)(478600001)(5660300002)(6636002)(122000001)(38100700002)(66446008)(64756008)(66556008)(66946007)(83380400001)(76116006)(54906003)(4326008)(6506007)(53546011)(66476007)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6OMd7hpn49biQoNRjAgIJwDo5pJ2sjR5sIATWfhBb8NdTQXWWDS0tur82CiB?= =?us-ascii?Q?sjrjSFyj7Xs0xOOFZ/fkx96u2a6X+TnQqg4RYKGbWH4q0PvxPrT2UB0bQJs1?= =?us-ascii?Q?aGs+ql+g654JS7DFanoew2TWUuq+mgdP7yYLocQNf3XKcS1yVUqewDEWAm2V?= =?us-ascii?Q?05v04z7M2iB6EpIvMuG0YdhEIQtZPsVIS0uWQ0RbPGjeVsw049Ixczogrmtm?= =?us-ascii?Q?FjyG2GtKrqOlKC8vxVh6NQ8jbxTiqmD2DqewSZFrOWBqBhC58endFCwdFVHt?= =?us-ascii?Q?7euxYRfyq+SDWRd4Rr3F9m9GnyXxRCLMYM8vEmpRB9qBgMRJnQCEBWHVEIz0?= =?us-ascii?Q?1W8rS8hjCnk37FC4SqPsvCga3P1vv+fbvwMLczvsA0ZwgH2ncrRKxFni4Jmq?= =?us-ascii?Q?Jixk33r2l0cPQlG9MetuBbC3U9m4igz/HbS12UnThOo4UJItoHe1iOLf+JWb?= =?us-ascii?Q?UckiJm24aff2cQEKxYN5tCXxMmYBOGkyG/yFNYBPsmDtuPXrmjtVs+IxQq5i?= =?us-ascii?Q?OMjT/n4ypK3AEucfnS7t1pLXkPsWQTAQiB7gf3MTWKa7h61OBdgKlk9aL2+l?= =?us-ascii?Q?k96z540erWwN6hPdByct9qqRQ2JhvX8ZzN+gfcIfPO1qunqtNXioHwvidTNf?= =?us-ascii?Q?iq1jAaoNSdW1/eOunQAA1n30XWjwLOsFMzHRY2vpvAXQUb9b2WLdzAS0a8OR?= =?us-ascii?Q?jfbVRHlK3Aj387436AdxaxxM7gtN5D6odSLHCFiyTggy7nlWusP711VIcE47?= =?us-ascii?Q?IG/xV4tF9JPxRwolheO/SjSryMtx1EfHIl5BONJ2rqX9dsRMjOQTw2dsxigv?= =?us-ascii?Q?nzdcH7Qv2c/802EoaWxpt49RxtrWojJmO5j85c55jkuA3ydtWPmnirN5/71P?= =?us-ascii?Q?Gd01qq68Ld55k97wZ2jMOOJ+xgTcvKoxv3vfg1sn6qM0o7kufno715PG+SWM?= =?us-ascii?Q?yYl1ZdmXin5V6cmhICJU4dtR5O7p3dfct5uv/2ClSeGQtU1j/WQTGQ9Ji+B8?= =?us-ascii?Q?RCSuWKg2o/JrQjUnoVudnfF+TKi+ry7YeLtiLebIzkrR1kpqUxOaF1fri+/O?= =?us-ascii?Q?ulqWit7AE97qdlpW23cMxuo/aRUthZOpXP55SruMVGZaH4sOAH7q6RgD9D/h?= =?us-ascii?Q?dt2EqUYKsgopvsisJx12rgqxUFiQrPpw0+fj5QmPelJkpl3JCXYYnwR+qjQp?= =?us-ascii?Q?q8YIAgBDDwok1CFWOQPN/q4kMzhMDxaiNoCQeqxcsR4PzFHbrTlcxaUb8x1x?= =?us-ascii?Q?9hUg+4RBHP22sVnE8m9Z28EXC57Qp96XcgPHX9kAxhyVHZ03Z9jAct8dPeyc?= =?us-ascii?Q?6kooeQvTdEj5/UU8sFHfTaMV?= 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: BN6PR11MB4035.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63697c3a-c178-44ea-8185-08d9459fc721 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2021 01:44:39.1864 (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: NUlMW6sb9zvTxoCjHftuTBZkMgJ9BjQmNWsaI6W+uFkV1N5Jgh26FxK4353AEZoIObxRZkUwNUsIUZhAN6v/0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2771 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/ice: fix SPI for ESP and NATT not work issue 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 Sender: "dev" Hi, Qi > -----Original Message----- > From: Zhang, Qi Z > Sent: Tuesday, July 13, 2021 9:07 AM > To: Su, Simei > Cc: dev@dpdk.org; Cao, Yahui > Subject: RE: [PATCH] net/ice: fix SPI for ESP and NATT not work issue >=20 >=20 >=20 > > -----Original Message----- > > From: Su, Simei > > Sent: Monday, July 12, 2021 5:39 PM > > To: Zhang, Qi Z > > Cc: dev@dpdk.org; Cao, Yahui ; Su, Simei > > > > Subject: [PATCH] net/ice: fix SPI for ESP and NATT not work issue >=20 > What is "ESP and NATT" > Do you mean > fix FDIR when SPI as inputset for an ESP over UDP Flow ? >=20 Yes, I mean when SPI as inputset for both ESP over IP and ESP over UDP. I will refine the title to let it be more accurate. > > > > This patch fixes this issue by adding the correspongding input set for > > ESP and >=20 > s/ correspongding/corresponding OK. Thanks for correcting it. >=20 > > NATT when parsing input set. Also, it adds input set bit for NAT_T_ESP > > to distinguish ESP over IP and ESP over UDP. > > > > Fixes: 70feafc1a3f2 ("net/ice: support ESP/NATT flow director to match > > outer > > IP") > > > > Signed-off-by: Simei Su > > --- > > drivers/net/ice/ice_fdir_filter.c | 14 ++++++++++---- > > drivers/net/ice/ice_generic_flow.h | 3 +++ > > 2 files changed, 13 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/net/ice/ice_fdir_filter.c > > b/drivers/net/ice/ice_fdir_filter.c > > index 4f1aa39..82adb1f 100644 > > --- a/drivers/net/ice/ice_fdir_filter.c > > +++ b/drivers/net/ice/ice_fdir_filter.c > > @@ -100,11 +100,11 @@ > > > > #define ICE_FDIR_INSET_IPV4_NATT_ESP (\ ICE_INSET_IPV4_SRC | > > ICE_INSET_IPV4_DST | \ > > -ICE_INSET_ESP_SPI) > > +ICE_INSET_NAT_T_ESP_SPI) > > > > #define ICE_FDIR_INSET_IPV6_NATT_ESP (\ ICE_INSET_IPV6_SRC | > > ICE_INSET_IPV6_DST | \ > > -ICE_INSET_ESP_SPI) > > +ICE_INSET_NAT_T_ESP_SPI) > > > > static struct ice_pattern_match_item ice_fdir_pattern_list[] =3D { > > {pattern_ethertype,ICE_FDIR_INSET_ETH, > > ICE_INSET_NONE,ICE_INSET_NONE}, > > @@ -951,6 +951,8 @@ ice_fdir_input_set_parse(uint64_t inset, enum > > ice_flow_field *field) {ICE_INSET_GTPU_TEID, > > ICE_FLOW_FIELD_IDX_GTPU_IP_TEID}, {ICE_INSET_GTPU_QFI, > > ICE_FLOW_FIELD_IDX_GTPU_EH_QFI}, {ICE_INSET_VXLAN_VNI, > > ICE_FLOW_FIELD_IDX_VXLAN_VNI}, > > +{ICE_INSET_ESP_SPI, ICE_FLOW_FIELD_IDX_ESP_SPI}, > > +{ICE_INSET_NAT_T_ESP_SPI, > > ICE_FLOW_FIELD_IDX_NAT_T_ESP_SPI}, > > }; > > > > for (i =3D 0, j =3D 0; i < RTE_DIM(ice_inset_map); i++) { @@ -2128,8 > > +2130,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter > > *ad, if (!(esp_spec && esp_mask)) break; > > > > -if (esp_mask->hdr.spi =3D=3D UINT32_MAX) > > -*input_set |=3D ICE_INSET_ESP_SPI; > > +if (esp_mask->hdr.spi =3D=3D UINT32_MAX) { if (l4 =3D=3D > > +RTE_FLOW_ITEM_TYPE_UDP) *input_set |=3D ICE_INSET_NAT_T_ESP_SPI; else > > +*input_set |=3D ICE_INSET_ESP_SPI; } > > > > if (l3 =3D=3D RTE_FLOW_ITEM_TYPE_IPV4) > > filter->input.ip.v4.sec_parm_idx =3D > > diff --git a/drivers/net/ice/ice_generic_flow.h > > b/drivers/net/ice/ice_generic_flow.h > > index 0bd38d8..8845a3e 100644 > > --- a/drivers/net/ice/ice_generic_flow.h > > +++ b/drivers/net/ice/ice_generic_flow.h > > @@ -26,6 +26,7 @@ > > #define ICE_PROT_AHBIT_ULL(15) > > #define ICE_PROT_L2TPV3OIPBIT_ULL(16) #define > > ICE_PROT_PFCPBIT_ULL(17) > > +#define ICE_PROT_NAT_T_ESPBIT_ULL(18) > > > > /* field */ > > > > @@ -117,6 +118,8 @@ > > (ICE_PROT_PFCP | ICE_PFCP_S_FIELD) > > #define ICE_INSET_PFCP_SEID \ > > (ICE_PROT_PFCP | ICE_PFCP_S_FIELD | ICE_PFCP_SEID) > > +#define ICE_INSET_NAT_T_ESP_SPI \ > > +(ICE_PROT_NAT_T_ESP | ICE_ESP_SPI) > > > > /* empty pattern */ > > extern enum rte_flow_item_type pattern_empty[]; > > -- > > 2.9.5 >=20