From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id CD9541EAF1; Thu, 14 Jun 2018 02:42:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 17:42:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,220,1526367600"; d="scan'208";a="63915389" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 13 Jun 2018 17:42:14 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 13 Jun 2018 17:42:14 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 13 Jun 2018 17:42:14 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.223]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Thu, 14 Jun 2018 08:41:49 +0800 From: "Lu, Wenzhuo" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR Thread-Index: AQHUAvEY//2UBYTx7E6x+Jg4TDTvUaRe6qyQ Date: Thu, 14 Jun 2018 00:41:49 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B7E8F4D@shsmsx102.ccr.corp.intel.com> References: <1528189935-34943-5-git-send-email-wei.zhao1@intel.com> <1528877502-5076-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1528877502-5076-1-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-dev] [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR 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: , X-List-Received-Date: Thu, 14 Jun 2018 00:42:16 -0000 Hi Wei, > -----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 >=20 > Tunnel type format should be translated to ixgbe required format before > register set in FDIR cloud mode, Ans also some register not useful in clo= ud > mode but only useful in IP mode should be set to zero as datasheet reques= t. >=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 > --- >=20 > v2: > -change register write function for FDIRIPSA and FDIRIPDA. >=20 > --- > drivers/net/ixgbe/ixgbe_fdir.c | 17 +++++++++++++---- > drivers/net/ixgbe/ixgbe_flow.c | 6 ++---- > 2 files changed, 15 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdi= r.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 u= sed.