rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Cc: "Joel Fernandes" <joel@joelfernandes.org>,
	"Johan Knöös" <jknoos@google.com>,
	"Gregory Rose" <gvrose8192@gmail.com>,
	"Uladzislau Rezki (Sony)" <urezki@gmail.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	dev@openvswitch.org,
	"Linux Kernel Network Developers" <netdev@vger.kernel.org>,
	rcu <rcu@vger.kernel.org>
Subject: Re: [PATCH] net: openvswitch: introduce common code for flushing flows
Date: Tue, 11 Aug 2020 17:47:59 -0700	[thread overview]
Message-ID: <CAM_iQpW5h=UCdhJQ7cKgihsn_NPRi8YjTes6R+TrA5WFfagSNA@mail.gmail.com> (raw)
In-Reply-To: <20200811011001.75690-1-xiangxia.m.yue@gmail.com>

On Mon, Aug 10, 2020 at 6:14 PM <xiangxia.m.yue@gmail.com> wrote:
>
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
>
> To avoid some issues, for example RCU usage warning, we should
> flush the flows under ovs_lock. This patch refactors
> table_instance_destroy and introduces table_instance_flow_flush
> which can be invoked by __dp_destroy or ovs_flow_tbl_flush.
>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>

Please add a Fixes tag here, I think it is probably your memory leak fix
which introduced this issue. And a Reported-by, to give credits to bug
reporters.

Plus one minor issue below:

> -static void table_instance_destroy(struct flow_table *table,
> -                                  struct table_instance *ti,
> -                                  struct table_instance *ufid_ti,
> -                                  bool deferred)
> +/* Must be called with OVS mutex held. */
> +void table_instance_flow_flush(struct flow_table *table,
> +                              struct table_instance *ti,
> +                              struct table_instance *ufid_ti)
>  {
>         int i;
>
> -       if (!ti)
> -               return;
> -
> -       BUG_ON(!ufid_ti);
>         if (ti->keep_flows)
> -               goto skip_flows;
> +               return;
>
>         for (i = 0; i < ti->n_buckets; i++) {
> -               struct sw_flow *flow;
>                 struct hlist_head *head = &ti->buckets[i];
>                 struct hlist_node *n;
> +               struct sw_flow *flow;

This is at most a coding style change, please do not mix
coding style changes in bug fixes. You can always push coding
style changes separately when net-next is open.

Thanks.

      parent reply	other threads:[~2020-08-12  0:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  1:10 [PATCH] net: openvswitch: introduce common code for flushing flows xiangxia.m.yue
2020-08-11 17:23 ` David Miller
2020-08-12  0:47 ` Cong Wang [this message]

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='CAM_iQpW5h=UCdhJQ7cKgihsn_NPRi8YjTes6R+TrA5WFfagSNA@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=dev@openvswitch.org \
    --cc=gvrose8192@gmail.com \
    --cc=jknoos@google.com \
    --cc=joel@joelfernandes.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=urezki@gmail.com \
    --cc=xiangxia.m.yue@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).