From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Vlad Buslov <vladbu@mellanox.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
wenxu@ucloud.cn, pablo@netfilter.org
Subject: Re: [PATCH net-next] net: flow_offload: convert block_ing_cb_list to regular list type
Date: Fri, 16 Aug 2019 12:58:01 -0700 [thread overview]
Message-ID: <20190816125801.095bfd23@cakuba.netronome.com> (raw)
In-Reply-To: <20190816150654.22106-1-vladbu@mellanox.com>
On Fri, 16 Aug 2019 18:06:54 +0300, Vlad Buslov wrote:
> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
> index 64c3d4d72b9c..cf52d9c422fa 100644
> --- a/net/core/flow_offload.c
> +++ b/net/core/flow_offload.c
> @@ -391,6 +391,8 @@ static void flow_indr_block_cb_del(struct flow_indr_block_cb *indr_block_cb)
> kfree(indr_block_cb);
> }
>
> +static DEFINE_MUTEX(flow_indr_block_ing_cb_lock);
I'd be tempted to place this definition next to:
static LIST_HEAD(block_ing_cb_list);
as it seems this is the list it protects. The reason for the name
discrepancy between the two is not immediately obvious to me :S
but you're not changing that.
Otherwise makes sense, so FWIW:
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> static void flow_block_ing_cmd(struct net_device *dev,
> flow_indr_block_bind_cb_t *cb,
> void *cb_priv,
> @@ -398,11 +400,11 @@ static void flow_block_ing_cmd(struct net_device *dev,
> {
> struct flow_indr_block_ing_entry *entry;
>
> - rcu_read_lock();
> - list_for_each_entry_rcu(entry, &block_ing_cb_list, list) {
> + mutex_lock(&flow_indr_block_ing_cb_lock);
> + list_for_each_entry(entry, &block_ing_cb_list, list) {
> entry->cb(dev, cb, cb_priv, command);
> }
> - rcu_read_unlock();
> + mutex_unlock(&flow_indr_block_ing_cb_lock);
> }
next prev parent reply other threads:[~2019-08-16 19:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 15:06 [PATCH net-next] net: flow_offload: convert block_ing_cb_list to regular list type Vlad Buslov
2019-08-16 19:58 ` Jakub Kicinski [this message]
2019-08-17 5:27 ` Jiri Pirko
2019-08-19 20:03 ` David Miller
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=20190816125801.095bfd23@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=vladbu@mellanox.com \
--cc=wenxu@ucloud.cn \
--cc=xiyou.wangcong@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).