From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D42712C3F for ; Thu, 2 Jun 2016 05:47:37 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 01 Jun 2016 20:47:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,404,1459839600"; d="scan'208";a="967160257" Received: from adambynes.sh.intel.com (HELO adambynes) ([10.239.129.240]) by orsmga001.jf.intel.com with ESMTP; 01 Jun 2016 20:47:32 -0700 Date: Thu, 2 Jun 2016 03:30:57 +0800 From: Zhe Tao To: Jingjing Wu Cc: helin.zhang@intel.com, dev@dpdk.org, mikehabibi@gmail.com Message-ID: <20160601193057.GB19593@intel.com> References: <1463040700-32165-1-git-send-email-jingjing.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463040700-32165-1-git-send-email-jingjing.wu@intel.com> 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, 02 Jun 2016 03:47:38 -0000 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