From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9E1FE1DF55; Tue, 12 Jun 2018 07:10:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2018 22:10:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,213,1526367600"; d="scan'208";a="46422836" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga007.fm.intel.com with ESMTP; 11 Jun 2018 22:10:05 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Jun 2018 22:10:05 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Jun 2018 22:10:05 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.223]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.51]) with mapi id 14.03.0319.002; Tue, 12 Jun 2018 13:10:03 +0800 From: "Lu, Wenzhuo" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] net/ixgbe: fix tunnel id format error for FDIR Thread-Index: AQHT/LA0HhdsWhTQ/EmXZ7/jTs9GfqRcHD4g Date: Tue, 12 Jun 2018 05:10:02 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B7E8449@shsmsx102.ccr.corp.intel.com> References: <1528189935-34943-1-git-send-email-wei.zhao1@intel.com> <1528189935-34943-4-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1528189935-34943-4-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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-stable] [PATCH] net/ixgbe: fix tunnel id format error for FDIR X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 05:10:08 -0000 Hi Wei, > -----Original Message----- > From: Zhao1, Wei > Sent: Tuesday, June 5, 2018 5:12 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; stable@dpdk.org; Zhao1, Wei > > Subject: [PATCH] net/ixgbe: fix tunnel id format error for FDIR >=20 > In cloud mode for FDIR, tunnel id should be set as protocol request, the > lower 8 bits should be set as reserved. To my opinion, the original implementation and this patch have different un= derstanding of the 'tunnel_id' in ' struct rte_eth_tunnel_flow'. Originally= it only means the tunnel id but not including the reserved 8 bits. This patch means it should include the reserved bits. Maybe it makes things= easier because the whole 4 bytes are big endian. So, may I suggest to add some comments in ' struct rte_eth_tunnel_flow' to = let the users know what the 'tunnel_id' really means? >=20 > Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for X550") > Fixes: 11777435c727 ("net/ixgbe: parse flow director filter") >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/ixgbe/ixgbe_fdir.c | 2 +- > drivers/net/ixgbe/ixgbe_flow.c | 5 ++--- > 2 files changed, 3 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdi= r.c > index d5e5179..67ab627 100644 > --- a/drivers/net/ixgbe/ixgbe_fdir.c > +++ b/drivers/net/ixgbe/ixgbe_fdir.c > @@ -774,7 +774,7 @@ ixgbe_fdir_filter_to_atr_input(const struct > rte_eth_fdir_filter *fdir_filter, > input->formatted.tunnel_type =3D > fdir_filter->input.flow.tunnel_flow.tunnel_type; > input->formatted.tni_vni =3D > - fdir_filter->input.flow.tunnel_flow.tunnel_id; > + fdir_filter->input.flow.tunnel_flow.tunnel_id >> 8; > } >=20 > return 0; > diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flo= w.c > index eb0644c..64af777 100644 > --- a/drivers/net/ixgbe/ixgbe_flow.c > +++ b/drivers/net/ixgbe/ixgbe_flow.c > @@ -2489,8 +2489,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct > rte_flow_attr *attr, > rte_memcpy(((uint8_t *) > &rule->ixgbe_fdir.formatted.tni_vni + 1), > vxlan_spec->vni, RTE_DIM(vxlan_spec->vni)); > - rule->ixgbe_fdir.formatted.tni_vni =3D > rte_be_to_cpu_32( > - rule->ixgbe_fdir.formatted.tni_vni); > + rule->ixgbe_fdir.formatted.tni_vni >>=3D 8; > } > } >=20 > @@ -2587,7 +2586,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct > rte_flow_attr *attr, > /* tni is a 24-bits bit field */ > rte_memcpy(&rule->ixgbe_fdir.formatted.tni_vni, > nvgre_spec->tni, RTE_DIM(nvgre_spec->tni)); > - rule->ixgbe_fdir.formatted.tni_vni <<=3D 8; > + rule->ixgbe_fdir.formatted.tni_vni >>=3D 8; > } > } >=20 > -- > 2.7.5