[v1] net/i40e: fix flow director does not work

Message ID 20210519032745.707639-1-stevex.yang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v1] net/i40e: fix flow director does not work |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-testing fail Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance fail Performance Testing issues
ci/iol-mellanox-Functional fail Functional Testing issues

Commit Message

Steve Yang May 19, 2021, 3:27 a.m. UTC
  When user configured the flow rule with raw packet via command
"flow_director_filter", it would reset all previous fdir input set
flags with "i40e_flow_set_fdir_inset()".

Ignore to configure the flow input set with raw packet rule used.

Fixes: ff04964ea6d5 ("net/i40e: fix flow director for common pctypes")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Xing, Beilei May 24, 2021, 3:32 a.m. UTC | #1
> -----Original Message-----
> From: Yang, SteveX <stevex.yang@intel.com>
> Sent: Wednesday, May 19, 2021 11:28 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX <stevex.yang@intel.com>
> Subject: [PATCH v1] net/i40e: fix flow director does not work
> 
> When user configured the flow rule with raw packet via command
> "flow_director_filter", it would reset all previous fdir input set flags with
> "i40e_flow_set_fdir_inset()".
> 
> Ignore to configure the flow input set with raw packet rule used.
> 
> Fixes: ff04964ea6d5 ("net/i40e: fix flow director for common pctypes")
> 
> Signed-off-by: Steve Yang <stevex.yang@intel.com>
> ---
>  drivers/net/i40e/i40e_fdir.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index
> ac0e09bfdd..3c7cf1ba90 100644
> --- a/drivers/net/i40e/i40e_fdir.c
> +++ b/drivers/net/i40e/i40e_fdir.c
> @@ -1768,7 +1768,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev
> *dev,
> 
>  	if (add) {
>  		/* configure the input set for common PCTYPEs*/
> -		if (!filter->input.flow_ext.customized_pctype) {
> +		if (!filter->input.flow_ext.customized_pctype &&
> +		    !filter->input.flow_ext.pkt_template) {
>  			ret = i40e_flow_set_fdir_inset(pf, pctype,
>  					filter->input.flow_ext.input_set);
>  			if (ret < 0)
> --
> 2.27.0

Acked-by: Beilei Xing <beilei.xing@intel.com>
  
Qi Zhang June 1, 2021, 11:12 a.m. UTC | #2
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xing, Beilei
> Sent: Monday, May 24, 2021 11:33 AM
> To: Yang, SteveX <stevex.yang@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v1] net/i40e: fix flow director does not work
> 
> 
> 
> > -----Original Message-----
> > From: Yang, SteveX <stevex.yang@intel.com>
> > Sent: Wednesday, May 19, 2021 11:28 AM
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX
> > <stevex.yang@intel.com>
> > Subject: [PATCH v1] net/i40e: fix flow director does not work
> >
> > When user configured the flow rule with raw packet via command
> > "flow_director_filter", it would reset all previous fdir input set
> > flags with "i40e_flow_set_fdir_inset()".
> >
> > Ignore to configure the flow input set with raw packet rule used.
> >
> > Fixes: ff04964ea6d5 ("net/i40e: fix flow director for common pctypes")
> >
> > Signed-off-by: Steve Yang <stevex.yang@intel.com>
> > ---
> >  drivers/net/i40e/i40e_fdir.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/i40e/i40e_fdir.c
> > b/drivers/net/i40e/i40e_fdir.c index
> > ac0e09bfdd..3c7cf1ba90 100644
> > --- a/drivers/net/i40e/i40e_fdir.c
> > +++ b/drivers/net/i40e/i40e_fdir.c
> > @@ -1768,7 +1768,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev
> > *dev,
> >
> >  	if (add) {
> >  		/* configure the input set for common PCTYPEs*/
> > -		if (!filter->input.flow_ext.customized_pctype) {
> > +		if (!filter->input.flow_ext.customized_pctype &&
> > +		    !filter->input.flow_ext.pkt_template) {
> >  			ret = i40e_flow_set_fdir_inset(pf, pctype,
> >  					filter->input.flow_ext.input_set);
> >  			if (ret < 0)
> > --
> > 2.27.0
> 
> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  
Thomas Monjalon June 16, 2021, 5:23 p.m. UTC | #3
01/06/2021 13:12, Zhang, Qi Z:
> > > When user configured the flow rule with raw packet via command
> > > "flow_director_filter", it would reset all previous fdir input set
> > > flags with "i40e_flow_set_fdir_inset()".
> > >
> > > Ignore to configure the flow input set with raw packet rule used.
> > >
> > > Fixes: ff04964ea6d5 ("net/i40e: fix flow director for common pctypes")
> > >
> > > Signed-off-by: Steve Yang <stevex.yang@intel.com>
> > 
> > Acked-by: Beilei Xing <beilei.xing@intel.com>
> 
> Applied to dpdk-next-net-intel.

Why Cc:stable is not added?
  
Qi Zhang June 17, 2021, 3:38 a.m. UTC | #4
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, June 17, 2021 1:23 AM
> To: Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v1] net/i40e: fix flow director does not work
> 
> 01/06/2021 13:12, Zhang, Qi Z:
> > > > When user configured the flow rule with raw packet via command
> > > > "flow_director_filter", it would reset all previous fdir input set
> > > > flags with "i40e_flow_set_fdir_inset()".
> > > >
> > > > Ignore to configure the flow input set with raw packet rule used.
> > > >
> > > > Fixes: ff04964ea6d5 ("net/i40e: fix flow director for common
> > > > pctypes")
> > > >
> > > > Signed-off-by: Steve Yang <stevex.yang@intel.com>
> > >
> > > Acked-by: Beilei Xing <beilei.xing@intel.com>
> >
> > Applied to dpdk-next-net-intel.
> 
> Why Cc:stable is not added?
> 

Yes, the patch need to be backported as the original patch is a fix that need to be backported also, thanks for the capture!
  

Patch

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ac0e09bfdd..3c7cf1ba90 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1768,7 +1768,8 @@  i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 
 	if (add) {
 		/* configure the input set for common PCTYPEs*/
-		if (!filter->input.flow_ext.customized_pctype) {
+		if (!filter->input.flow_ext.customized_pctype &&
+		    !filter->input.flow_ext.pkt_template) {
 			ret = i40e_flow_set_fdir_inset(pf, pctype,
 					filter->input.flow_ext.input_set);
 			if (ret < 0)