From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Paul Moses <p@1g4.org>, Victor Nogueira <victor@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Vladimir Oltean <olteanv@gmail.com>
Subject: Re: [PATCH net v8 1/1] net/sched: act_gate: snapshot parameters with RCU on replace
Date: Fri, 27 Feb 2026 03:31:51 +0200 [thread overview]
Message-ID: <20260227013151.qaw4hvb4fyt5roeq@skbuf> (raw)
In-Reply-To: <CAM0EoMmr0SUf7U3CTqd=MSYX=D60zYOfBS-L=GJOsWB-cxZHcg@mail.gmail.com>
On Wed, Feb 25, 2026 at 08:55:30AM -0500, Jamal Hadi Salim wrote:
> On Mon, Feb 23, 2026 at 10:05 AM Paul Moses <p@1g4.org> wrote:
> >
> > The gate action can be replaced while the hrtimer callback or dump path is
> > walking the schedule list.
> >
> > Convert the parameters to an RCU-protected snapshot and swap updates under
> > tcf_lock, freeing the previous snapshot via call_rcu(). When REPLACE omits
> > the entry list, preserve the existing schedule so the effective state is
> > unchanged.
> >
> > Fixes: a51c328df310 ("net: qos: introduce a gate control flow action")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Paul Moses <p@1g4.org>
>
> Looks good - but can we have Vlad (added to Cc) review this as well in
> case it breaks anything in the offload case? More specifically,
> regarding an update policy..
>
> cheers,
> jamal
I've regression-tested this with tools/testing/selftests/drivers/net/ocelot/psfp.sh
and haven't noticed issues.
However, that doesn't test very much of the action possibilities - no dynamic gate
parameters change (as part of standalone action or bound to filter).
The ocelot/felix driver doesn't offload standalone actions (TC_SETUP_ACT) so it
doesn't notice changes made to the action using the "tc action" command.
If I make changes to the "tc gate" action parameters using "tc filter replace ...",
then I trigger the "The stream is added on this port" extack error in the offload
driver, which seems to not have been written to handle parameter changes very well.
I don't get any lockdep warnings on tcfa_lock, if that's of interest.
To the extent that the testing above is relevant:
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
next prev parent reply other threads:[~2026-02-27 1:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 15:05 [PATCH net v8 0/1] net/sched: act_gate: snapshot parameters with RCU on replace Paul Moses
2026-02-23 15:05 ` [PATCH net v8 1/1] " Paul Moses
2026-02-25 13:55 ` Jamal Hadi Salim
2026-02-27 1:31 ` Vladimir Oltean [this message]
2026-02-27 12:07 ` Paul Moses
2026-02-27 13:16 ` Jamal Hadi Salim
2026-02-27 14:56 ` Vladimir Oltean
2026-02-27 13:29 ` Victor Nogueira
2026-02-28 1:20 ` [PATCH net v8 0/1] " 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=20260227013151.qaw4hvb4fyt5roeq@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=p@1g4.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=victor@mojatatu.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