From: Jakub Kicinski <kuba@kernel.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
Shigeru Yoshida <syoshida@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Phil Sutter <phil@nwl.cc>,
syzbot+5a66db916cdde0dbcc1c@syzkaller.appspotmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [PATCH net] net: flow_offload: protect driver_block_list in flow_block_cb_setup_simple()
Date: Tue, 17 Feb 2026 14:05:45 -0800 [thread overview]
Message-ID: <20260217140545.325067c0@kernel.org> (raw)
In-Reply-To: <aZRUFQGKzEdcjNHG@chamomile>
On Tue, 17 Feb 2026 12:42:13 +0100 Pablo Neira Ayuso wrote:
> > static int
> > mtk_eth_setup_tc_block(struct net_device *dev, struct flow_block_offload *f)
> > {
> > struct mtk_mac *mac = netdev_priv(dev);
> > struct mtk_eth *eth = mac->hw;
> > static LIST_HEAD(block_cb_list);
> > ~~~~~~
> > I have a question.
> >
> > [..]
> > f->driver_block_list = &block_cb_list;
> >
> > Now I have many questions!
> >
> > How is this supposed to work?
>
> Last time I met people, I asked how is hw offload actually working
> with netns (6 years ago?), someone told me: "maybe there is a driver
> that supports it...". I have never seen one, but I am very much
> outdates on how this has evolved TBH, I might be wrong.
>
> I don't think any driver really supports netns + hardware offload, so
> I suggest to restrict it, see attached patch.
>
> It would be better to add a helper function such as int net_setup_tc()
> for the myriad of ->ndo_setup_tc() calls in the code, then move this
> check in it to consolidate, but I think you want something you can
> pass to -stable at this stage?
I don't think we need this restriction for TC side, it should be under
rtnl_lock, IIUC. I have a... strong suspicion(?) that TC works, some
drivers explicitly support devlink reload into a specified netns.
I always assumed this is for the cases where something like OvS offload
is supposed to be handled outside init_net to avoid netdev explosion.
I could be wrong, tho, could be an RDMA thing.
prev parent reply other threads:[~2026-02-17 22:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-08 11:00 [PATCH net] net: flow_offload: protect driver_block_list in flow_block_cb_setup_simple() Shigeru Yoshida
2026-02-11 12:06 ` Florian Westphal
2026-02-13 2:34 ` Jakub Kicinski
2026-02-13 11:30 ` Florian Westphal
2026-02-13 16:17 ` Jakub Kicinski
2026-02-15 13:06 ` Florian Westphal
2026-02-17 11:42 ` Pablo Neira Ayuso
2026-02-17 22:05 ` Jakub Kicinski [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=20260217140545.325067c0@kernel.org \
--to=kuba@kernel.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=syoshida@redhat.com \
--cc=syzbot+5a66db916cdde0dbcc1c@syzkaller.appspotmail.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