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] [day] [month] [year] [list]
Date:   Tue, 1 Sep 2020 19:54:14 +0800
From:   Tonghao Zhang <xiangxia.m.yue@...il.com>
To:     Stefano Brivio <sbrivio@...hat.com>
Cc:     David Miller <davem@...emloft.net>,
        Pravin Shelar <pshelar@....org>,
        Cong Wang <xiyou.wangcong@...il.com>,
        ovs dev <dev@...nvswitch.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v3 1/3] net: openvswitch: improve coding style

On Wed, Aug 26, 2020 at 5:51 AM Stefano Brivio <sbrivio@...hat.com> wrote:
>
> On Tue, 25 Aug 2020 13:06:34 +0800
> xiangxia.m.yue@...il.com wrote:
>
> > +++ b/net/openvswitch/datapath.c
> >
> > [...]
> >
> > @@ -2095,7 +2099,7 @@ static void ovs_update_headroom(struct datapath *dp, unsigned int new_headroom)
> >       dp->max_headroom = new_headroom;
> >       for (i = 0; i < DP_VPORT_HASH_BUCKETS; i++)
>
> While at it, you could also add curly brackets here.
>
> > +++ b/net/openvswitch/flow_table.c
> >
> > [...]
> >
> > @@ -111,9 +111,11 @@ static void flow_free(struct sw_flow *flow)
> >       if (ovs_identifier_is_key(&flow->id))
> >               kfree(flow->id.unmasked_key);
> >       if (flow->sf_acts)
> > -             ovs_nla_free_flow_actions((struct sw_flow_actions __force *)flow->sf_acts);
> > +             ovs_nla_free_flow_actions((struct sw_flow_actions __force *)
> > +                                       flow->sf_acts);
> >       /* We open code this to make sure cpu 0 is always considered */
> > -     for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, &flow->cpu_used_mask))
> > +     for (cpu = 0; cpu < nr_cpu_ids;
> > +          cpu = cpumask_next(cpu, &flow->cpu_used_mask))
>
> ...and here.
>
> > @@ -273,7 +275,7 @@ static int tbl_mask_array_add_mask(struct flow_table *tbl,
> >
> >       if (ma_count >= ma->max) {
> >               err = tbl_mask_array_realloc(tbl, ma->max +
> > -                                           MASK_ARRAY_SIZE_MIN);
> > +                                          MASK_ARRAY_SIZE_MIN);
>
> This is not aligned properly either, MASK_ARRAY_SIZE_MIN is added to
> ma->max and should be aligned to it.
>
> > @@ -448,16 +450,17 @@ int ovs_flow_tbl_init(struct flow_table *table)
> >
> >  static void flow_tbl_destroy_rcu_cb(struct rcu_head *rcu)
> >  {
> > -     struct table_instance *ti = container_of(rcu, struct table_instance, rcu);
> > +     struct table_instance *ti =
> > +             container_of(rcu, struct table_instance, rcu);
>
> The assignment could very well go on a separate line.
Hi Stefano
Sorry for missing the comment. I update the patch in v4. Thanks.

> --
> Stefano
>


-- 
Best regards, Tonghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ