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 3C312A04B3; Mon, 3 Feb 2020 03:46:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8EC751BFC6; Mon, 3 Feb 2020 03:46:17 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 873391BFB6; Mon, 3 Feb 2020 03:46:15 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Feb 2020 18:46:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,396,1574150400"; d="scan'208";a="403290272" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 02 Feb 2020 18:46:14 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 2 Feb 2020 18:46:13 -0800 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.138]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.222]) with mapi id 14.03.0439.000; Mon, 3 Feb 2020 10:46:12 +0800 From: "Zhang, Qi Z" To: "Ye, Xiaolong" , "Cao, Yahui" CC: "Yang, Qiming" , "Lu, Wenzhuo" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/ice: fix FDIR gtp_psc without qfi pattern issue Thread-Index: AQHV0GDNd5zgIcEcF0mgc9qIkB+QM6gHHPQAgAG6ATA= Date: Mon, 3 Feb 2020 02:46:11 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153E169DE@SHSMSX105.ccr.corp.intel.com> References: <20200121134113.27109-1-yahui.cao@intel.com> <20200202082230.GJ54838@intel.com> In-Reply-To: <20200202082230.GJ54838@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] net/ice: fix FDIR gtp_psc without qfi pattern issue 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 Xiaolong: Please ignore this one, since it is covered by below patch already=20 https://patches.dpdk.org/patch/65025/=20 Thanks Qi > -----Original Message----- > From: Ye, Xiaolong > Sent: Sunday, February 2, 2020 4:23 PM > To: Cao, Yahui > Cc: Yang, Qiming ; Lu, Wenzhuo > ; dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z > > Subject: Re: [PATCH] net/ice: fix FDIR gtp_psc without qfi pattern issue >=20 > On 01/21, Yahui Cao wrote: > >If only gtpu teid is specified, FDIR will always match the gtpu teid no > >matter there is gtp extension header appended or not. > >So forbid pattern in which gtp_psc without qfi value follows gtpu with > >teid value like: > >pattern eth / ipv4 / udp / gtpu teid is XXX / gtp_psc / end > > > >Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel") > >Cc: stable@dpdk.org > > > >Signed-off-by: Yahui Cao > >--- > > drivers/net/ice/ice_fdir_filter.c | 12 ++++++++++++ > >drivers/net/ice/ice_generic_flow.h | 6 ++++++ > > 2 files changed, 18 insertions(+) > > > >diff --git a/drivers/net/ice/ice_fdir_filter.c > >b/drivers/net/ice/ice_fdir_filter.c > >index f356581d1..7517299fc 100644 > >--- a/drivers/net/ice/ice_fdir_filter.c > >+++ b/drivers/net/ice/ice_fdir_filter.c > >@@ -1894,6 +1894,18 @@ ice_fdir_parse_pattern(__rte_unused struct > >ice_adapter *ad, > > > > filter->input.gtpu_data.qfi =3D > > gtp_psc_spec->qfi; > >+ } else { > >+ /* forbid pattern like: > >+ * "gtpu teid is XXX / gtp_psc / end" > >+ */ > >+ if (ice_flow_inset_get_field(input_set, > >+ ICE_INSET_GTPU_TEID)) { > >+ rte_flow_error_set(error, EINVAL, > >+ RTE_FLOW_ERROR_TYPE_ITEM, > >+ item, > >+ "Invalid GTP mask"); >=20 > Is this a correct message for the error? >=20 > Btw, this patch can't be applied cleanly on top of latest dpdk-next-net-i= ntel, > please help rebase and send a new version. >=20 > Thanks, > Xiaolong >=20 > >+ return -rte_errno; > >+ } > > } > > break; > > default: > >diff --git a/drivers/net/ice/ice_generic_flow.h > >b/drivers/net/ice/ice_generic_flow.h > >index adc30ee2a..8387b5fee 100644 > >--- a/drivers/net/ice/ice_generic_flow.h > >+++ b/drivers/net/ice/ice_generic_flow.h > >@@ -485,4 +485,10 @@ ice_search_pattern_match_item(const struct > rte_flow_item pattern[], > > struct ice_pattern_match_item *array, > > uint32_t array_len, > > struct rte_flow_error *error); > >+ > >+static inline int > >+ice_flow_inset_get_field(uint64_t input_set, uint64_t field) { > >+ return (input_set & field) =3D=3D field; > >+} > > #endif > >-- > >2.17.1 > >