lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Dec 2018 17:05:42 -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 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ