Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: David Miller <davem@davemloft.net>,
Pravin Shelar <pshelar@ovn.org>,
Cong Wang <xiyou.wangcong@gmail.com>,
ovs dev <dev@openvswitch.org>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v3 1/3] net: openvswitch: improve coding style
Date: Tue, 1 Sep 2020 19:54:14 +0800 [thread overview]
Message-ID: <CAMDZJNWW96=XsLrV1GvOg_dRKhUr62473ftXdXc1BKWPMk2gUg@mail.gmail.com> (raw)
In-Reply-To: <20200825235121.0d8bd3d0@elisabeth>
On Wed, Aug 26, 2020 at 5:51 AM Stefano Brivio <sbrivio@redhat.com> wrote:
>
> On Tue, 25 Aug 2020 13:06:34 +0800
> xiangxia.m.yue@gmail.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
next prev parent reply other threads:[~2020-09-01 11:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 5:06 [PATCH net-next v3 0/3] net: openvswitch: improve codes xiangxia.m.yue
2020-08-25 5:06 ` [PATCH net-next v3 1/3] net: openvswitch: improve coding style xiangxia.m.yue
2020-08-25 21:51 ` Stefano Brivio
2020-09-01 11:54 ` Tonghao Zhang [this message]
2020-08-25 5:06 ` [PATCH net-next v3 2/3] net: openvswitch: refactor flow free function xiangxia.m.yue
2020-08-26 19:23 ` Pravin Shelar
2020-08-25 5:06 ` [PATCH net-next v3 3/3] net: openvswitch: remove unnused keep_flows xiangxia.m.yue
2020-08-26 19:23 ` Pravin Shelar
2020-08-25 16:37 ` [PATCH net-next v3 0/3] net: openvswitch: improve codes David Miller
2020-08-26 7:09 ` Pravin Shelar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMDZJNWW96=XsLrV1GvOg_dRKhUr62473ftXdXc1BKWPMk2gUg@mail.gmail.com' \
--to=xiangxia.m.yue@gmail.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@ovn.org \
--cc=sbrivio@redhat.com \
--cc=xiyou.wangcong@gmail.com \
--subject='Re: [PATCH net-next v3 1/3] net: openvswitch: improve coding style' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).