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 34A47A0519; Tue, 23 Jun 2020 03:12:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A79B41D625; Tue, 23 Jun 2020 03:12:35 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 97CAF1D528; Tue, 23 Jun 2020 03:12:33 +0200 (CEST) IronPort-SDR: yYamj0458VPp6RsnxrD3KOJ9gVOngYjirsL4N9W2UUsbz4Jl2abMLi8zZvIsK3dwcIEAQyT3d+ xo/fhKwHuJPA== X-IronPort-AV: E=McAfee;i="6000,8403,9660"; a="162003637" X-IronPort-AV: E=Sophos;i="5.75,268,1589266800"; d="scan'208";a="162003637" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 18:12:32 -0700 IronPort-SDR: VnlKtYgNGSO/luRt77TSPJEj4BDGeKNmuTAZh7uwV4jWrCcTO2lcxTSB/2jwxdUglvkhuOFn8z oX4t040zNe5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,268,1589266800"; d="scan'208";a="478677712" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 22 Jun 2020 18:12:32 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 18:12:31 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 22 Jun 2020 18:12:30 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 22 Jun 2020 18:12:30 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 18:12:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e0+V9b6rhKv5pAJaMH7i6rkmF4xxTsBujWM7Y1wOZpYj50q+pICTfhzZERqkISAxAqhY4SUqEB9+FYu6Ne5O80/G7dxp+YlH7Fi/o61OCtqrCUwcx4beB5o5rzlsKlUc95Fm6NMoj7EMoqs0k7HZtceToLe0Qmsuymkg/NOxXOLVXBI2EWSsAWk8xqoC37VkhR+ApoScEcjM6HTPdJV0nzNPofg0OIG5TcdcDQXu19JNlrGMkyNL38pSA44FYIP76bz6f7S9Qtu4C9k7BVO1uXfZPMQrY07hd0Odv6cIE1YsFGTulVn+g0bOe22UZc/OExen1xsyW8wzadO2tmn57Q== 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=74Lh9pnOFMU7g+9Kk5scQeaec/OEnhiS1pWUzPWIsaY=; b=SEVTIFWNVB0uZC2xZBbJjuYK1ewkij0q/OTxB0ugbV0NpCFb7Ir0jqOJJ2/vttsAVtd2EeE+ObBMFlUGz8/+ism8NbuwtA3p4Y95mnixEwSuOJdzo+CBeOjxisfDjtqbCq3wVWIxezQZOSPhkSeSNjFHmq9oEVT8TQd9R0AIyiGd9RjfhgeQFfhTKGhhuIFXw5RH+l+g9V02nj0p9lCwnmQVOHu6BKVoZmVXTCglfuHyrM26k+d4qTsoI5OMehfyAZqamPMiuCaCBXAhdLiW/0i4lYhZiHw+HWlbVC6AdRpIp6dR3q00kumfJmsU5G1FMKXR+s64qN84XVA4AEZ2Bw== 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=74Lh9pnOFMU7g+9Kk5scQeaec/OEnhiS1pWUzPWIsaY=; b=LJapjigNMQz+8q9T73idK68zdddHnJBTpCablIS48DXgv8sg83jfqYxe8Fj+Qk9P6JN6XNiJOMb0CrYFBsV7TwKOWJFvb3X3738bW2VvTmy5sAxjD0HMT83v8frbG6W0Xem9I5/qgxpRI4DF6Qjms7SHmu4A6Pw0YkRu1pkq66I= Received: from MWHPR11MB1391.namprd11.prod.outlook.com (2603:10b6:300:23::15) by MW3PR11MB4522.namprd11.prod.outlook.com (2603:10b6:303:2d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Tue, 23 Jun 2020 01:12:21 +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.3109.027; Tue, 23 Jun 2020 01:12:21 +0000 From: "Zhao1, Wei" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2 4/4] net/ice: support switch flow for specific L4 type Thread-Index: AQHWRHIO8lWPkBQcjEuO7NFlQ1rTcajkzNuAgACg3zA= Date: Tue, 23 Jun 2020 01:12:21 +0000 Message-ID: References: <20200605074031.16231-1-wei.zhao1@intel.com> <20200617061429.6447-1-wei.zhao1@intel.com> <20200617061429.6447-5-wei.zhao1@intel.com> <039ED4275CED7440929022BC67E706115484301E@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E706115484301E@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDcwZmIyOTUtNGFlZC00ZGMzLThhYmMtMjU5MWI2ZjE5OGNkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieWtmUlh6aGxNMU5RdkxcL0pDV2RKNzR4U09vK1VEdUVhY0dWa0RNWmViOUZxbExiZXN2anZZeU5zanora0tNQkgifQ== 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.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aa6353a7-08a1-4173-a9e0-08d817127b5b x-ms-traffictypediagnostic: MW3PR11MB4522: 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:7219; x-forefront-prvs: 04433051BF x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: woRNkm69lnCcwny6Bsgov+XxjE7TzJTyPFNYX5w6kSCJP+NQGZRgDvBgtXkeWai3hNw3EY21CVY8+bgWFzx9iD2b0O0swx3Wqs9/PkAPxKNoWD1cvfmQmqJDHt0o0OQZt8HXpp7RT9Vwf105XDTHVpECs77zi+cC/NtEahpjvk0i7catIbITLOeL+s8i2JPkTlu63UEomuh/GvZZ0399V5SxsDUlb4GU4Tzxwee4UYp/OKMGS5miPG0B5MJZoie/YXvn+rPL/KN6ab2KCsqkcWrsbEz/f9NOQgCS+pqqzw6FRtDGWnxW4ansrNxx064o 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)(39860400002)(136003)(376002)(346002)(366004)(396003)(71200400001)(66556008)(66476007)(64756008)(66946007)(66446008)(5660300002)(83380400001)(52536014)(76116006)(86362001)(2906002)(186003)(7696005)(450100002)(26005)(4326008)(9686003)(110136005)(33656002)(6506007)(53546011)(8676002)(316002)(478600001)(55016002)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: rlfyOR8HtUVyHbR/LHcUSt49hNk9FzuyKjsRBawCHVYw4ZccPg9gfdc6QonlOmhMCE7bGz1oOdOIkJ2NrnUstVctKl3Ry+/HA9nMouH2w3ecS/jInJ/nj5ta7EWipM/rjGkWFkDxUDOa7M+Zme1CL2dvPGPg55E7HaI2T633zkIdCX4BVov0r43Hlxd23JeyUAgRYyjfjxhkSVOdy53rGljL9dqc3tgfROgQk/QMemGcOFclJ6+o2RjeRa+sB2SAx+q+WPc12OguJqdEfU4PvdMLw3OPeDL+gY3mopgKQz7VPMa+ZE3ZyOKJX5bait/L1q0jDzRxPSu/e1uLuzJUc8n4hqsRKk1ZGqLsCxMUQYXDY3DcVZI95LS6QWIYfPcxoQ7zr8m5C78gqQJVxjefEuRWQdHvw97SbYzGg1YGqRf8GnvscF6nx7Em4mkhyVCktyUDRuHN3Vmj37ZjMaXbVWMKYG/XXLCazvvYQjgDD7yf9ZXSCsf+b6PEuskthqAu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: aa6353a7-08a1-4173-a9e0-08d817127b5b X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2020 01:12:21.9030 (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: ELtDfXIs3uShUdme9qQr2C9ODJFfSmPLKPCXU2P/EC6e8DIPlPLpxcKgrLcqLuY7E861cL1X39D/t0eeAI+gng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4522 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 4/4] net/ice: support switch flow for specific L4 type 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" > -----Original Message----- > From: Zhang, Qi Z > Sent: Monday, June 22, 2020 11:36 PM > To: Zhao1, Wei ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH v2 4/4] net/ice: support switch flow for specific L4 = type >=20 >=20 >=20 > > -----Original Message----- > > From: Zhao1, Wei > > Sent: Wednesday, June 17, 2020 2:14 PM > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Zhang, Qi Z ; Zhao1, Wei > > > > Subject: [PATCH v2 4/4] net/ice: support switch flow for specific L4 > > type > > > > This patch add more specific tunnel type for ipv4/ipv6 packet, it > > enable tcp/udp layer of ipv4/ipv6 as L4 payload but without > > L4 dst/src port number as input set for the switch filter rule. > > > > Fixes: 47d460d63233 ("net/ice: rework switch filter") > > Cc: stable@dpdk.org > > > > Signed-off-by: Wei Zhao > > --- > > drivers/net/ice/ice_switch_filter.c | 23 +++++++++++++++++------ > > 1 file changed, 17 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/net/ice/ice_switch_filter.c > > b/drivers/net/ice/ice_switch_filter.c > > index 3b38195d6..f4fd8ff33 100644 > > --- a/drivers/net/ice/ice_switch_filter.c > > +++ b/drivers/net/ice/ice_switch_filter.c > > @@ -471,11 +471,11 @@ ice_switch_inset_get(const struct rte_flow_item > > pattern[], > > const struct rte_flow_item_l2tpv3oip *l2tp_spec, *l2tp_mask; > > const struct rte_flow_item_pfcp *pfcp_spec, *pfcp_mask; > > uint64_t input_set =3D ICE_INSET_NONE; > > + uint16_t tunnel_valid =3D 0; >=20 > why not vxlan_valid and nvgre_valid to keep consistent naming with other > variables? > Can we use a bitmap Ok, Update in v3 >=20 > > bool pppoe_elem_valid =3D 0; > > bool pppoe_patt_valid =3D 0; > > bool pppoe_prot_valid =3D 0; > > bool profile_rule =3D 0; > > - bool tunnel_valid =3D 0; > > bool ipv6_valiad =3D 0; > > bool ipv4_valiad =3D 0; > > bool udp_valiad =3D 0; > > @@ -960,7 +960,7 @@ ice_switch_inset_get(const struct rte_flow_item > > pattern[], > > "Invalid NVGRE item"); > > return 0; > > } > > - tunnel_valid =3D 1; > > + tunnel_valid =3D 2; > > if (nvgre_spec && nvgre_mask) { > > list[t].type =3D ICE_NVGRE; > > if (nvgre_mask->tni[0] || > > @@ -1325,6 +1325,21 @@ ice_switch_inset_get(const struct rte_flow_item > > pattern[], > > *tun_type =3D ICE_SW_TUN_PPPOE; > > } > > > > + if (!pppoe_patt_valid) { > > + if (tunnel_valid =3D=3D 1) > > + *tun_type =3D ICE_SW_TUN_VXLAN; > > + else if (tunnel_valid =3D=3D 2) > > + *tun_type =3D ICE_SW_TUN_NVGRE; > > + else if (ipv4_valiad && tcp_valiad) > > + *tun_type =3D ICE_SW_IPV4_TCP; > > + else if (ipv4_valiad && udp_valiad) > > + *tun_type =3D ICE_SW_IPV4_UDP; > > + else if (ipv6_valiad && tcp_valiad) > > + *tun_type =3D ICE_SW_IPV6_TCP; > > + else if (ipv6_valiad && udp_valiad) > > + *tun_type =3D ICE_SW_IPV6_UDP; > > + } > > + > > *lkups_num =3D t; > > > > return input_set; > > @@ -1536,10 +1551,6 @@ ice_switch_parse_pattern_action(struct > > ice_adapter *ad, > > > > for (; item->type !=3D RTE_FLOW_ITEM_TYPE_END; item++) { > > item_num++; > > - if (item->type =3D=3D RTE_FLOW_ITEM_TYPE_VXLAN) > > - tun_type =3D ICE_SW_TUN_VXLAN; > > - if (item->type =3D=3D RTE_FLOW_ITEM_TYPE_NVGRE) > > - tun_type =3D ICE_SW_TUN_NVGRE; > > if (item->type =3D=3D RTE_FLOW_ITEM_TYPE_ETH) { > > const struct rte_flow_item_eth *eth_mask; > > if (item->mask) > > -- > > 2.19.1 >=20