From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A62A1C368 for ; Thu, 9 Jun 2016 11:43:06 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 09 Jun 2016 02:43:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,444,1459839600"; d="scan'208";a="118842133" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.71]) by fmsmga004.fm.intel.com with SMTP; 09 Jun 2016 02:43:03 -0700 Received: by (sSMTP sendmail emulation); Thu, 09 Jun 2016 10:43:02 +0025 Date: Thu, 9 Jun 2016 10:43:02 +0100 From: Bruce Richardson To: Zhe Tao Cc: Jingjing Wu , helin.zhang@intel.com, dev@dpdk.org, mikehabibi@gmail.com Message-ID: <20160609094302.GA11144@bricha3-MOBL3> References: <1463040700-32165-1-git-send-email-jingjing.wu@intel.com> <20160601193057.GB19593@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160601193057.GB19593@intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] i40e: fix flexible payload selection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 09:43:07 -0000 On Thu, Jun 02, 2016 at 03:30:57AM +0800, Zhe Tao wrote: > On Thu, May 12, 2016 at 04:11:40PM +0800, Jingjing Wu wrote: > > When setting up flexible payload selection rules, it is allowed > > that setting value to 63 to disable the rule (NONUSE_FLX_PIT_DEST_OFF). > > However, MK_FLX_PIT macro is always adding an offset value 50 > > (I40E_FLX_OFFSET_IN_FIELD_VECTOR), it will be set to "63 + 50" and > > when setting NONUSE_FLX_PIT_DEST_OFF to disable it. It breaks > > the functionality. > > This patch fixes this issue. > > > > Fixes: d8b90c4eabe9 ("i40e: take flow director flexible payload > > configuration") > > > > Reported-by: Michael Habibi > > Signed-off-by: Jingjing Wu > > --- > > drivers/net/i40e/i40e_fdir.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c > > index 8aa41e5..efbcd18 100644 > > --- a/drivers/net/i40e/i40e_fdir.c > > +++ b/drivers/net/i40e/i40e_fdir.c > > @@ -94,7 +94,9 @@ > > I40E_PRTQF_FLX_PIT_SOURCE_OFF_MASK) | \ > > (((fsize) << I40E_PRTQF_FLX_PIT_FSIZE_SHIFT) & \ > > I40E_PRTQF_FLX_PIT_FSIZE_MASK) | \ > > - ((((dst_offset) + I40E_FLX_OFFSET_IN_FIELD_VECTOR) << \ > > + ((((dst_offset) == NONUSE_FLX_PIT_DEST_OFF ? \ > > + NONUSE_FLX_PIT_DEST_OFF : \ > > + ((dst_offset) + I40E_FLX_OFFSET_IN_FIELD_VECTOR)) << \ > > I40E_PRTQF_FLX_PIT_DEST_OFF_SHIFT) & \ > > I40E_PRTQF_FLX_PIT_DEST_OFF_MASK)) > > > > -- > > 2.4.0 > Acked-by: Zhe Tao Applied to dpdk-next-net/rel_16_07 /Bruce