Netdev List
 help / color / mirror / Atom feed
From: Larysa Zaremba <larysa.zaremba@intel.com>
To: Pedro Tammela <pctammela@mojatatu.com>
Cc: <netdev@vger.kernel.org>, <jhs@mojatatu.com>,
	<xiyou.wangcong@gmail.com>, <jiri@resnulli.us>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <ldir@darbyshire-bryant.me.uk>,
	<toke@redhat.com>
Subject: Re: [PATCH net] net/sched: act_ctinfo: use percpu stats
Date: Mon, 13 Feb 2023 16:10:47 +0100	[thread overview]
Message-ID: <Y+pS94Zw93k/cs6V@lincoln> (raw)
In-Reply-To: <20230210200824.444856-1-pctammela@mojatatu.com>

On Fri, Feb 10, 2023 at 05:08:25PM -0300, Pedro Tammela wrote:
> The tc action act_ctinfo was using shared stats, fix it to use percpu stats
> since bstats_update() must be called with locks or with a percpu pointer argument.
> 
> tdc results:
> 1..12
> ok 1 c826 - Add ctinfo action with default setting
> ok 2 0286 - Add ctinfo action with dscp
> ok 3 4938 - Add ctinfo action with valid cpmark and zone
> ok 4 7593 - Add ctinfo action with drop control
> ok 5 2961 - Replace ctinfo action zone and action control
> ok 6 e567 - Delete ctinfo action with valid index
> ok 7 6a91 - Delete ctinfo action with invalid index
> ok 8 5232 - List ctinfo actions
> ok 9 7702 - Flush ctinfo actions
> ok 10 3201 - Add ctinfo action with duplicate index
> ok 11 8295 - Add ctinfo action with invalid index
> ok 12 3964 - Replace ctinfo action with invalid goto_chain control
> 
> Fixes: 24ec483cec98 ("net: sched: Introduce act_ctinfo action")
> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>

Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>

> ---
>  net/sched/act_ctinfo.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/sched/act_ctinfo.c b/net/sched/act_ctinfo.c
> index 4b1b59da5..4d15b6a61 100644
> --- a/net/sched/act_ctinfo.c
> +++ b/net/sched/act_ctinfo.c
> @@ -93,7 +93,7 @@ TC_INDIRECT_SCOPE int tcf_ctinfo_act(struct sk_buff *skb,
>  	cp = rcu_dereference_bh(ca->params);
>  
>  	tcf_lastuse_update(&ca->tcf_tm);
> -	bstats_update(&ca->tcf_bstats, skb);
> +	tcf_action_update_bstats(&ca->common, skb);
>  	action = READ_ONCE(ca->tcf_action);
>  
>  	wlen = skb_network_offset(skb);
> @@ -212,8 +212,8 @@ static int tcf_ctinfo_init(struct net *net, struct nlattr *nla,
>  	index = actparm->index;
>  	err = tcf_idr_check_alloc(tn, &index, a, bind);
>  	if (!err) {
> -		ret = tcf_idr_create(tn, index, est, a,
> -				     &act_ctinfo_ops, bind, false, flags);
> +		ret = tcf_idr_create_from_flags(tn, index, est, a,
> +						&act_ctinfo_ops, bind, flags);
>  		if (ret) {
>  			tcf_idr_cleanup(tn, index);
>  			return ret;
> -- 
> 2.34.1
> 

  reply	other threads:[~2023-02-13 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 20:08 [PATCH net] net/sched: act_ctinfo: use percpu stats Pedro Tammela
2023-02-13 15:10 ` Larysa Zaremba [this message]
2023-02-14  7:00 ` patchwork-bot+netdevbpf

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=Y+pS94Zw93k/cs6V@lincoln \
    --to=larysa.zaremba@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=ldir@darbyshire-bryant.me.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pctammela@mojatatu.com \
    --cc=toke@redhat.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