DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] i40e: fix flexible payload selection
@ 2016-05-12  8:11 Jingjing Wu
  2016-06-01 19:30 ` Zhe Tao
  0 siblings, 1 reply; 3+ messages in thread
From: Jingjing Wu @ 2016-05-12  8:11 UTC (permalink / raw)
  To: helin.zhang; +Cc: dev, jingjing.wu, mikehabibi

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 <mikehabibi@gmail.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: fix flexible payload selection
  2016-05-12  8:11 [dpdk-dev] [PATCH] i40e: fix flexible payload selection Jingjing Wu
@ 2016-06-01 19:30 ` Zhe Tao
  2016-06-09  9:43   ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Zhe Tao @ 2016-06-01 19:30 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: helin.zhang, dev, mikehabibi

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 <mikehabibi@gmail.com>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
>  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 <zhe.tao@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: fix flexible payload selection
  2016-06-01 19:30 ` Zhe Tao
@ 2016-06-09  9:43   ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2016-06-09  9:43 UTC (permalink / raw)
  To: Zhe Tao; +Cc: Jingjing Wu, helin.zhang, dev, mikehabibi

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 <mikehabibi@gmail.com>
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> > ---
> >  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 <zhe.tao@intel.com>

Applied to dpdk-next-net/rel_16_07

/Bruce

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-09  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12  8:11 [dpdk-dev] [PATCH] i40e: fix flexible payload selection Jingjing Wu
2016-06-01 19:30 ` Zhe Tao
2016-06-09  9:43   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).