On Tue, Dec 11, 2018 at 4:21 PM Cong Wang <xiyou.wangc...@gmail.com> wrote:
>
> On Tue, Dec 11, 2018 at 3:27 PM Saeed Mahameed <sae...@mellanox.com> wrote:
> > @@ -939,8 +939,8 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
> >                 }
> >                 out_priv = netdev_priv(encap_dev);
> >                 rpriv = out_priv->ppriv;
> > -               attr->out_rep[attr->out_count] = rpriv->rep;
> > -               attr->out_mdev[attr->out_count++] = out_priv->mdev;
> > +               attr->dests[attr->out_count].rep = rpriv->rep;
> > +               attr->dests[attr->out_count++].mdev = out_priv->mdev;
> >         }
> >
> >         err = mlx5_eswitch_add_vlan_action(esw, attr);
> > @@ -2468,8 +2468,9 @@ static int parse_tc_fdb_actions(struct mlx5e_priv 
> > *priv, struct tcf_exts *exts,
> >                                           MLX5_FLOW_CONTEXT_ACTION_COUNT;
> >                                 out_priv = netdev_priv(out_dev);
> >                                 rpriv = out_priv->ppriv;
> > -                               attr->out_rep[attr->out_count] = rpriv->rep;
> > -                               attr->out_mdev[attr->out_count++] = 
> > out_priv->mdev;
> > +                               attr->dests[attr->out_count].rep = 
> > rpriv->rep;
> > +                               attr->dests[attr->out_count].mdev = 
> > out_priv->mdev;
> > +                               attr->out_count++;
>
> It would be nicer if you can use either of these two patterns consistently.
>
> Either
>
> a[i++] = j;
>
> or
>
> a[i] = j;
> i++;
>
> The latter is slightly more readable for me, but I don't have any
> preference.
>
> Thanks.

Sure, will fix this in V2, thanks Cong.

Reply via email to