netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Vlad Buslov <vladbu@mellanox.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, jiri@resnulli.us, pablo@netfilter.org,
	kadlec@blackhole.kfki.hu, fw@strlen.de, ast@kernel.org,
	daniel@iogearbox.net, edumazet@google.com, keescook@chromium.org
Subject: Re: [PATCH net-next 13/14] net: core: add new/replace rate estimator lock parameter
Date: Tue, 7 Aug 2018 22:37:28 -0300	[thread overview]
Message-ID: <20180808013724.GE14666@localhost.localdomain> (raw)
In-Reply-To: <1533538465-23199-14-git-send-email-vladbu@mellanox.com>

On Mon, Aug 06, 2018 at 09:54:24AM +0300, Vlad Buslov wrote:
> Extend rate estimator 'new' and 'replace' APIs with additional spinlock
> parameter to be used by rtnl-unlocked actions to protect rate_est pointer
> from concurrent modification.

I'm wondering if this additional parameter is really needed. So far,
the only case in which it is not NULL, the same lock that is used to
protect the stats is also used in this new parameter.

...

> --- a/net/sched/act_police.c
> +++ b/net/sched/act_police.c
> @@ -138,7 +138,7 @@ static int tcf_act_police_init(struct net *net, struct nlattr *nla,
>  
>  	if (est) {
>  		err = gen_replace_estimator(&police->tcf_bstats, NULL,
> -					    &police->tcf_rate_est,
> +					    &police->tcf_rate_est, NULL,
>  					    &police->tcf_lock,
>  					    NULL, est);

Which is here, and this new NULL arg is replaced by &police->tcf_lock
in the next patch.

Do you foresee a case in which a different lock will be used?
Or maybe it is because the current one is explicitly aimed towards the
stats?

  Marcelo

  reply	other threads:[~2018-08-08  3:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06  6:54 [PATCH net-next 00/14] Remove rtnl lock dependency from all action implementations Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 01/14] net: sched: act_bpf: remove dependency on rtnl lock Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 02/14] net: sched: act_csum: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 03/14] net: sched: act_gact: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 04/14] net: sched: act_ife: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 05/14] net: sched: act_ipt: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 06/14] net: sched: act_pedit: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 07/14] net: sched: act_sample: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 08/14] net: sched: act_simple: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 09/14] net: sched: act_skbmod: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 10/14] net: sched: act_tunnel_key: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 11/14] net: sched: act_vlan: " Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 12/14] net: sched: act_mirred: " Vlad Buslov
2018-08-07 16:36   ` Jiri Pirko
2018-08-08  7:40     ` Vlad Buslov
2018-08-08  8:03       ` Jiri Pirko
2018-08-08  8:47         ` Vlad Buslov
2018-08-08  8:54           ` Jiri Pirko
2018-08-08 11:21             ` Vlad Buslov
2018-08-06  6:54 ` [PATCH net-next 13/14] net: core: add new/replace rate estimator lock parameter Vlad Buslov
2018-08-08  1:37   ` Marcelo Ricardo Leitner [this message]
2018-08-08 12:30     ` Vlad Buslov
2018-08-08 14:18       ` Marcelo Ricardo Leitner
2018-08-06  6:54 ` [PATCH net-next 14/14] net: sched: act_police: remove dependency on rtnl lock Vlad Buslov

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=20180808013724.GE14666@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=keescook@chromium.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=vladbu@mellanox.com \
    --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).