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 34F3AA0350; Mon, 29 Jun 2020 04:01:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D47C92C2B; Mon, 29 Jun 2020 04:01:48 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id F17391150; Mon, 29 Jun 2020 04:01:46 +0200 (CEST) IronPort-SDR: ySV50KAehztBEnQDW2m8qGDI6K0bH3aXF69b/WfVaAH8TcHNwF41xIO7oyPRe0lOCr0uvCe8XB 5shrBfMDbV6A== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="145889557" X-IronPort-AV: E=Sophos;i="5.75,293,1589266800"; d="scan'208";a="145889557" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2020 19:01:45 -0700 IronPort-SDR: uXyXtwtRgzip78HR4k2Ix9JWUdo7Ofw6W7E8+4Nwt8pG2uqN8m1tRMUid5tYZ0JFgqtzc0VV0j 3UDeg1fMjbyg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,293,1589266800"; d="scan'208";a="302911961" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga004.fm.intel.com with ESMTP; 28 Jun 2020 19:01:45 -0700 Received: from orsmsx151.amr.corp.intel.com (10.22.226.38) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jun 2020 19:01:45 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX151.amr.corp.intel.com (10.22.226.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jun 2020 19:01:44 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.56) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jun 2020 19:01:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=luj3gtKURx/LcPgJIBru7fBRB9QObobXgNXVPEVhZWI0PiC/FTAIqd2Cry3LmBTx12aBWalxXn6NDidwHQ+U5wCFLYB0B6/nTKl5ZxZpAI9NvnuEWwPXs+2xjV/8Y68BQpmIxfXvC8b1ndj6qxWWTRxDM0jMwVJWB4gBiyNHPByFlVF0vkCsWpGpjGQBXi5xD6kzlGC24ayMUhDZRq11pQqY3PwXPfHzfZI/pnORNwrDcrMZnkLnZ3qXwEXcebqlvtxnVyWKVUQdSO/dBtpC9b2/BusbjBwtho24UA8iLwfImeKMzHe/j47HDvjd1ERX3gZeGg80HnYVCVJj/piq1w== 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=AyR9arODWO9EUzBE22SwysJuQlnxJ4clt/4tuBpCtao=; b=CzIXIR+Bwf4gPALdOcygGiz+bJX4L9SHBWX/YzV2YGgEzqvEhBhVigIIbYTReREWRgxjc/BIK4Ivv3T5qBQR+5lTkJVhs9LkxvBNF3G9juznSwtNGsk8Ov9Xx7wj7AUgkhfbFA+AjFzWwm3KLACmgVJ8eyKiNHKGAwvaaJytihKzIH6fZm318PD4V6v36vFWcY54il/Kb/W/OIdUmyae3OHfwRO7xDiVXNq91LWAiOIHnip+qDXjNqqKbwVmOmiBjl0wpUD5F/cZJip5WZ85xZlFFxGM4DwNIN3Q5hk8seWepzvPyCZ3XJ3E6k6AcKehzzjnJWcUAvdp3bVs5qnhIA== 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=AyR9arODWO9EUzBE22SwysJuQlnxJ4clt/4tuBpCtao=; b=UFb3slg5sfcuQKFIsbdgFgqxn58EjydUZl6w4Z2uTk/ujtPyQbRjIhpW02GhZrju210CQ6jzqaiVIlm8+aOAXqJU2GT10+jcm/dgvlxTKCh/3qOlAHcDM9J7wZR2+HRWmkFlbyQBbuwlWIQ64xlWwEq82q59vArmtXcSIrh080w= Received: from MWHPR11MB1391.namprd11.prod.outlook.com (2603:10b6:300:23::15) by MWHPR1101MB2093.namprd11.prod.outlook.com (2603:10b6:301:50::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Mon, 29 Jun 2020 02:01:43 +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.3131.027; Mon, 29 Jun 2020 02:01:43 +0000 From: "Zhao1, Wei" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Lu, Nannan" Thread-Topic: [PATCH v3 3/4] net/ice: support switch flow for specific L4 type Thread-Index: AQHWTQy/TanpUomqzkqePvDR5h66waju1qcAgAAANjA= Date: Mon, 29 Jun 2020 02:01:42 +0000 Message-ID: References: <20200617061429.6447-1-wei.zhao1@intel.com> <20200628050145.72810-1-wei.zhao1@intel.com> <20200628050145.72810-4-wei.zhao1@intel.com> <039ED4275CED7440929022BC67E7061154847C39@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E7061154847C39@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2MwZTUyZTAtMTliNC00MjgyLThmNDYtYzk0MjU1YjUxNDlkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicTRINnZFejB1R29RbkxEbTN1NTNhR3pMUDlNS0Q3VEtlZjRhOEE3d3RzK0RrTDdiN3oyWlwvOEUzYUpjUGVkVHUifQ== 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.204] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7a8b4241-5580-43f6-2de5-08d81bd05ec5 x-ms-traffictypediagnostic: MWHPR1101MB2093: 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:4941; x-forefront-prvs: 044968D9E1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ITQwWyJe88xzWNCqlf2vi1Yb4Y1hk78+jR44LP+vQ0XQC0xvuhWUilO81p4vKWzvMW9JbX3Mj0hBPKiv5yPISUYBk+Pf+a9bS/ihxbEC0FAyfVRLFv6grAt1+v/itn50SUDZbkm6dzBOeilT350+v1iNmiHCciPPBXBokaWXLds+Y6WI5/hYq6em0AgdaVhbWeoPj+fRrfuMZk6bwYblSJb/1eFL8VY+RDpNlGJPt6/UvM1oIM7PZpd1zL+7KF0Z1SECjUdfCg06vzf2zoq4IZSzC8vBU8WPVKeDeD13hLlkjqdou9RNhlJuoVp1qtLH1IJ1o6iUcJn4ARxfS5+adtzo0Cd70XNhENwlIyxBNm7t9ogvqYWR77bTvaMNbDKv 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)(376002)(39860400002)(346002)(366004)(396003)(136003)(450100002)(4326008)(83380400001)(478600001)(316002)(7696005)(9686003)(55016002)(71200400001)(86362001)(52536014)(8936002)(64756008)(107886003)(66446008)(33656002)(186003)(110136005)(26005)(76116006)(54906003)(6506007)(66946007)(66476007)(5660300002)(53546011)(66556008)(8676002)(2906002)(21314003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: o2M/6rLgJUTgpRmH90VcuT0WjIyXjIwu2bZGowpLJZBvd4I+vlqlD20JwO3Kgq0AEnGggjN4/8H5lOrpSaR6SLR91JIx3a0wmCiwC9ZVsAGa7gMXEs1N5eGUn16v59xso7o42M7wed9HahKVroKJcaJi3tVoCoJm4e/ujy5+Gy1VgaqYfJSU2SjOwq7+0KBY7P/2+1AlhiAwLkeD+8QHNTsfz1ZOvBzFFTaRmu2UM6O5DWkRODrPnzk0pWaiQiPyFJOz3nHabbAEpv1YcR4RU5X8tn8QZolOB5dTSPUDUz2ukRgmhSgQvfkgWnawRNCv6XclwO6aUw16sjYDz8pRnJbbF7UyznsxIK7pN+6Q688miXsmQxZ3wJI2/Tcnta/05weLlYJH7k9nEqajpGgZv8+wLs4vVO2kOy93tj49PEY0fsoSNVnEbZ7tzSRhgh3txqbKBrWFsHq27DHJUakVhpbFcu4hT0A7T9hNAUF7zojx6wUAs8+mJ8CQTZXNcdHZ 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: 7a8b4241-5580-43f6-2de5-08d81bd05ec5 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jun 2020 02:01:42.7944 (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: knB50fVVLRul1C1phosZyxvc+bdIWvPoGuv0M6Wwb3DGIERI+NZqkTmq8dpv4JVPKiFn93r+uULlglmJQ9Pv7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2093 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 3/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" Hi,=20 > -----Original Message----- > From: Zhang, Qi Z > Sent: Monday, June 29, 2020 9:56 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: stable@dpdk.org; Lu, Nannan > Subject: RE: [PATCH v3 3/4] net/ice: support switch flow for specific L4 = type >=20 >=20 >=20 > > -----Original Message----- > > From: Zhao1, Wei > > Sent: Sunday, June 28, 2020 1:02 PM > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Zhang, Qi Z ; Lu, Nannan > > ; Zhao1, Wei > > Subject: [PATCH v3 3/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 | 27 ++++++++++++++++++++------- > > 1 file changed, 20 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/net/ice/ice_switch_filter.c > > b/drivers/net/ice/ice_switch_filter.c > > index c607e8d17..c1ea74c73 100644 > > --- a/drivers/net/ice/ice_switch_filter.c > > +++ b/drivers/net/ice/ice_switch_filter.c > > @@ -29,6 +29,8 @@ > > #define ICE_PPP_IPV4_PROTO 0x0021 > > #define ICE_PPP_IPV6_PROTO 0x0057 > > #define ICE_IPV4_PROTO_NVGRE 0x002F > > +#define ICE_TUN_VXLAN_VALID 0x0001 > > +#define ICE_TUN_NVGRE_VALID 0x0002 >=20 > Why not apply the same pattern with other valid flag? > I mean use vxlan_valid and nvgre_valid. > Could be tunnel_valid =3D vxlan_valid | nvgre_valid. Because we will extend to gtp-u or other kinds of packet, there will be mor= e and more xxx_valid variable. I think we can follow rte layer to use bit define kinds of tunnel packet. It is too complex to define too many valid flag. >=20 > > > > #define ICE_SW_INSET_ETHER ( \ > > ICE_INSET_DMAC | ICE_INSET_SMAC | ICE_INSET_ETHERTYPE) @@ > > -471,11 +473,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; > > 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; > > @@ -924,7 +926,7 @@ ice_switch_inset_get(const struct rte_flow_item > > pattern[], > > return 0; > > } > > > > - tunnel_valid =3D 1; > > + tunnel_valid =3D ICE_TUN_VXLAN_VALID; > > if (vxlan_spec && vxlan_mask) { > > list[t].type =3D ICE_VXLAN; > > if (vxlan_mask->vni[0] || > > @@ -960,7 +962,7 @@ ice_switch_inset_get(const struct rte_flow_item > > pattern[], > > "Invalid NVGRE item"); > > return 0; > > } > > - tunnel_valid =3D 1; > > + tunnel_valid =3D ICE_TUN_NVGRE_VALID; > > if (nvgre_spec && nvgre_mask) { > > list[t].type =3D ICE_NVGRE; > > if (nvgre_mask->tni[0] || > > @@ -1325,6 +1327,21 @@ ice_switch_inset_get(const struct rte_flow_item > > pattern[], > > *tun_type =3D ICE_SW_TUN_PPPOE; > > } > > > > + if (*tun_type =3D=3D ICE_NON_TUN) { > > + if (tunnel_valid =3D=3D ICE_TUN_VXLAN_VALID) > > + *tun_type =3D ICE_SW_TUN_VXLAN; > > + else if (tunnel_valid =3D=3D ICE_TUN_NVGRE_VALID) > > + *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 +1553,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