net/mlx5: fix missing init for flow group

Message ID 1555273135-1773-1-git-send-email-orika@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers
Series net/mlx5: fix missing init for flow group |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Ori Kam April 14, 2019, 8:18 p.m. UTC
  the flow group should be initialized.
For example selecting if the encapsulation is for root or private tables
is based on the flow->group value.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")

Signed-off-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Yongseok Koh April 16, 2019, 11:07 p.m. UTC | #1
On Sun, Apr 14, 2019 at 08:18:55PM +0000, Ori Kam wrote:
> the flow group should be initialized.
> For example selecting if the encapsulation is for root or private tables
> is based on the flow->group value.
> 
> Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")
> 
> Signed-off-by: Ori Kam <orika@mellanox.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>

>  drivers/net/mlx5/mlx5_flow_dv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
> index 3862b26..82e8749 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -3236,6 +3236,7 @@ struct field_modify_info modify_tcp[] = {
>  	union flow_dv_attr flow_attr = { .attr = 0 };
>  	struct mlx5_flow_dv_tag_resource tag_resource;
>  
> +	flow->group = attr->group;
>  	if (priority == MLX5_FLOW_PRIO_RSVD)
>  		priority = priv->config.flow_prio - 1;
>  	for (; !actions_end ; actions++) {
> -- 
> 1.8.3.1
>
  
Shahaf Shuler April 22, 2019, 5:45 p.m. UTC | #2
Wednesday, April 17, 2019 2:08 AM, Yongseok Koh:
> Subject: Re: [PATCH] net/mlx5: fix missing init for flow group
> 
> On Sun, Apr 14, 2019 at 08:18:55PM +0000, Ori Kam wrote:
> > the flow group should be initialized.
> > For example selecting if the encapsulation is for root or private
> > tables is based on the flow->group value.
> >
> > Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")
> >
> > Signed-off-by: Ori Kam <orika@mellanox.com>
> > ---
> Acked-by: Yongseok Koh <yskoh@mellanox.com>

Applied to next-net-mlx, thanks. 

> 
> >  drivers/net/mlx5/mlx5_flow_dv.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> > b/drivers/net/mlx5/mlx5_flow_dv.c index 3862b26..82e8749 100644
> > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > @@ -3236,6 +3236,7 @@ struct field_modify_info modify_tcp[] = {
> >  	union flow_dv_attr flow_attr = { .attr = 0 };
> >  	struct mlx5_flow_dv_tag_resource tag_resource;
> >
> > +	flow->group = attr->group;
> >  	if (priority == MLX5_FLOW_PRIO_RSVD)
> >  		priority = priv->config.flow_prio - 1;
> >  	for (; !actions_end ; actions++) {
> > --
> > 1.8.3.1
> >
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3862b26..82e8749 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3236,6 +3236,7 @@  struct field_modify_info modify_tcp[] = {
 	union flow_dv_attr flow_attr = { .attr = 0 };
 	struct mlx5_flow_dv_tag_resource tag_resource;
 
+	flow->group = attr->group;
 	if (priority == MLX5_FLOW_PRIO_RSVD)
 		priority = priv->config.flow_prio - 1;
 	for (; !actions_end ; actions++) {