[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Dec 2018 17:16:50 -0800
From: Saeed Mahameed <saeedm@....mellanox.co.il>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Saeed Mahameed <saeedm@...lanox.com>,
"David S. Miller" <davem@...emloft.net>,
Linux Netdev List <netdev@...r.kernel.org>,
elibr@...lanox.com
Subject: Re: [net-next 03/14] net/mlx5e: Refactor eswitch flow attr for
destination specific properties
On Tue, Dec 11, 2018 at 5:05 PM Saeed Mahameed
<saeedm@....mellanox.co.il> wrote:
>
> On Tue, Dec 11, 2018 at 4:21 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
> >
> > On Tue, Dec 11, 2018 at 3:27 PM Saeed Mahameed <saeedm@...lanox.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.
Actually this is going to be changed in downstream patch:
"net/mlx5e: Support header rewrite actions with remote port mirroring"
To:
+ attr->dests[out_index].rep = rpriv->rep;
+ attr->dests[out_index].mdev = out_priv->mdev;
So no need to change anything here, I will stick to this version.
Powered by blists - more mailing lists