From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 478801EB11; Thu, 14 Jun 2018 03:53:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 18:53:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,220,1526367600"; d="scan'208";a="207932349" Received: from kmsmsx155.gar.corp.intel.com ([172.21.73.106]) by orsmga004.jf.intel.com with ESMTP; 13 Jun 2018 18:53:27 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.131]) by KMSMSX155.gar.corp.intel.com ([169.254.15.164]) with mapi id 14.03.0319.002; Thu, 14 Jun 2018 09:51:09 +0800 From: "Zhao1, Wei" To: "Lu, Wenzhuo" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR Thread-Index: AQHUAvEZVYyPAQ7EV06FZ+45phr8eKReZPaAgACZJwA= Date: Thu, 14 Jun 2018 01:51:08 +0000 Message-ID: References: <1528189935-34943-5-git-send-email-wei.zhao1@intel.com> <1528877502-5076-1-git-send-email-wei.zhao1@intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B7E8F4D@shsmsx102.ccr.corp.intel.com> In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B7E8F4D@shsmsx102.ccr.corp.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.0.200.100 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH v2] net/ixgbe: fix tunnel type set 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: Thu, 14 Jun 2018 01:53:30 -0000 Hi, > -----Original Message----- > From: Lu, Wenzhuo > Sent: Thursday, June 14, 2018 8:42 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR >=20 > Hi Wei, >=20 >=20 > > -----Original Message----- > > From: Zhao1, Wei > > Sent: Wednesday, June 13, 2018 4:12 PM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; stable@dpdk.org; Zhao1, Wei > > > > Subject: [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR > > > > Tunnel type format should be translated to ixgbe required format > > before register set in FDIR cloud mode, Ans also some register not > > useful in cloud mode but only useful in IP mode should be set to zero a= s > datasheet request. > > > > Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for > > X550") > > Fixes: 11777435c727 ("net/ixgbe: parse flow director filter") > > > > Signed-off-by: Wei Zhao > > --- > > > > v2: > > -change register write function for FDIRIPSA and FDIRIPDA. > > > > --- > > drivers/net/ixgbe/ixgbe_fdir.c | 17 +++++++++++++---- > > drivers/net/ixgbe/ixgbe_flow.c | 6 ++---- > > 2 files changed, 15 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_fdir.c > > b/drivers/net/ixgbe/ixgbe_fdir.c index 67ab627..3feb815 100644 > > --- a/drivers/net/ixgbe/ixgbe_fdir.c > > +++ b/drivers/net/ixgbe/ixgbe_fdir.c > > @@ -771,8 +771,15 @@ ixgbe_fdir_filter_to_atr_input(const struct > > rte_eth_fdir_filter *fdir_filter, > > input->formatted.inner_mac, > > fdir_filter- > > >input.flow.tunnel_flow.mac_addr.addr_bytes, > > sizeof(input->formatted.inner_mac)); > > - input->formatted.tunnel_type =3D > > - fdir_filter->input.flow.tunnel_flow.tunnel_type; > > + if (fdir_filter->input.flow.tunnel_flow.tunnel_type =3D=3D > > + RTE_FDIR_TUNNEL_TYPE_VXLAN) > > + input->formatted.tunnel_type =3D 0x8000; > > + else if (fdir_filter->input.flow.tunnel_flow.tunnel_type =3D=3D > > + RTE_FDIR_TUNNEL_TYPE_NVGRE) > > + input->formatted.tunnel_type =3D 0; > Better use macros for 0x8000 and 0. And add comments why these values > are used. Ok, I will add some comment.