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 910C2A0350; Mon, 22 Jun 2020 17:50:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 746721D8F6; Mon, 22 Jun 2020 17:50:08 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id C6DE11D8F0; Mon, 22 Jun 2020 17:50:06 +0200 (CEST) IronPort-SDR: OJTxI619zsyBDjG+p5pOKKWkGvKYHU8hvo8tufEJsPGOspSSPxdB0L2pE+Rwetv/3oO/47bL97 6w3nKkSmKAdg== X-IronPort-AV: E=McAfee;i="6000,8403,9659"; a="124071347" X-IronPort-AV: E=Sophos;i="5.75,267,1589266800"; d="scan'208";a="124071347" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 08:50:05 -0700 IronPort-SDR: VsItXXV02SOZg6Tc0hvYEMVuPTR7jxHCASUvucDRwZK/Sag6bSdE+1zyllezuQlHjvN37AbnWK WRwj/uTkmFBg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,267,1589266800"; d="scan'208";a="310152209" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga008.jf.intel.com with ESMTP; 22 Jun 2020 08:50:05 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 08:50:01 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 08:50:01 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.89]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.174]) with mapi id 14.03.0439.000; Mon, 22 Jun 2020 23:49:58 +0800 From: "Zhang, Qi Z" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2 3/4] net/ice: add check for NVGRE protocol Thread-Index: AQHWRHIH0hfL+um7tUmD3mL1uHT7YqjkzT3w Date: Mon, 22 Jun 2020 15:49:57 +0000 Message-ID: <039ED4275CED7440929022BC67E7061154843048@SHSMSX103.ccr.corp.intel.com> References: <20200605074031.16231-1-wei.zhao1@intel.com> <20200617061429.6447-1-wei.zhao1@intel.com> <20200617061429.6447-4-wei.zhao1@intel.com> In-Reply-To: <20200617061429.6447-4-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/4] net/ice: add check for NVGRE protocol 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: 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 3/4] net/ice: add check for NVGRE protocol fix tunnel type for switch rule >=20 > This patch add check for protocol type of IPv4 packet, it need to update = tunnel > type when NVGRE is in payload. The patch change default tunnel type to ICE_NON_TUN and only change to=20 ICE_SW_TUN_AND_NON_TUN to hint switch engine if GRE proto is matched in a I= Pv4 header. >=20 > Fixes: 6bc7628c5e0b ("net/ice: change default tunnel type") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/ice/ice_switch_filter.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ice/ice_switch_filter.c > b/drivers/net/ice/ice_switch_filter.c > index 3c0c36bce..3b38195d6 100644 > --- a/drivers/net/ice/ice_switch_filter.c > +++ b/drivers/net/ice/ice_switch_filter.c > @@ -28,6 +28,7 @@ > #define MAX_QGRP_NUM_TYPE 7 > #define ICE_PPP_IPV4_PROTO 0x0021 > #define ICE_PPP_IPV6_PROTO 0x0057 > +#define ICE_IPV4_PROTO_NVGRE 0x2F To keep consistent=20 #define ICE_IPV4_NVGRE_PROTO 0x002F=20 >=20 > #define ICE_SW_INSET_ETHER ( \ > ICE_INSET_DMAC | ICE_INSET_SMAC | ICE_INSET_ETHERTYPE) @@ -632,6 > +633,10 @@ ice_switch_inset_get(const struct rte_flow_item pattern[], > list[t].m_u.ipv4_hdr.protocol =3D > ipv4_mask->hdr.next_proto_id; > } > + if ((ipv4_spec->hdr.next_proto_id & > + ipv4_mask->hdr.next_proto_id) =3D=3D > + ICE_IPV4_PROTO_NVGRE) > + *tun_type =3D ICE_SW_TUN_AND_NON_TUN; > if (ipv4_mask->hdr.type_of_service) { > list[t].h_u.ipv4_hdr.tos =3D > ipv4_spec->hdr.type_of_service; > @@ -1526,7 +1531,7 @@ ice_switch_parse_pattern_action(struct ice_adapter > *ad, > const struct rte_flow_item *item =3D pattern; > uint16_t item_num =3D 0; > enum ice_sw_tunnel_type tun_type =3D > - ICE_SW_TUN_AND_NON_TUN; > + ICE_NON_TUN; > struct ice_pattern_match_item *pattern_match_item =3D NULL; >=20 > for (; item->type !=3D RTE_FLOW_ITEM_TYPE_END; item++) { > -- > 2.19.1