From: Jakub Kicinski <kuba@kernel.org>
To: Stanislav Fomichev <stfomichev@gmail.com>
Cc: Stanislav Fomichev <sdf@fomichev.me>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, Saeed Mahameed <saeed@kernel.org>
Subject: Re: [PATCH net-next 02/11] net: hold netdev instance lock during ndo_setup_tc
Date: Tue, 11 Feb 2025 19:57:03 -0800 [thread overview]
Message-ID: <20250211195703.57b5a6d1@kernel.org> (raw)
In-Reply-To: <Z6waIoWA8EBllLVk@mini-arch>
On Tue, 11 Feb 2025 19:48:50 -0800 Stanislav Fomichev wrote:
> > The netfilter / flow table offloads don't seem to test tc_can_offload(),
> > should we make that part of the check optional in dev_setup_tc() ?
> > Add a bool argument to ignore tc_can_offload() ?
>
> Let me dig into it... I was assuming that tc_can_offload() is basically
> a runtime way to signal to the core that even though the device has
> ndo_setup_tc defined, the feature can't be used.
>
> I don't understand why some places care only about ndo_setup_tc
> while other test for both ndo_setup_tc/tc_can_offload. Do you by
> chance have any context on this? Does tc_can_offload cover only
> a subset of (TC_SETUP_BLOCK) the offload types?
>
> The easiest way is probably just to keep calls to tc_can_offload outside,
> as is, but I was thinking that doing both ndo_setup_tc and tc_can_offload
> is a bit more safe.
Off the top of my head the feature flag was added when John pioneered
the opportunistic offload of TC classifiers. It seems to have also
propagated to switch-like Qdisc offloads. The answer is probably some
mix of historic precedent (non-switch qdisc offload like mqprio exited
way before), features which are unambiguously HW-facing, and plain
omissions.
Let's do whatever is easiest here, the series touches half of the
stack, we can't possibly clean up all encountered.. mysteries.
next prev parent reply other threads:[~2025-02-12 3:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 19:20 [PATCH net-next 00/11] net: Hold netdev instance lock during ndo operations Stanislav Fomichev
2025-02-10 19:20 ` [PATCH net-next 01/11] net: hold netdev instance lock during ndo_open/ndo_stop Stanislav Fomichev
2025-02-12 2:06 ` Jakub Kicinski
2025-02-10 19:20 ` [PATCH net-next 02/11] net: hold netdev instance lock during ndo_setup_tc Stanislav Fomichev
2025-02-12 2:20 ` Jakub Kicinski
2025-02-12 3:48 ` Stanislav Fomichev
2025-02-12 3:57 ` Jakub Kicinski [this message]
2025-02-10 19:20 ` [PATCH net-next 03/11] net: hold netdev instance lock during queue operations Stanislav Fomichev
2025-02-12 2:21 ` Jakub Kicinski
2025-02-10 19:20 ` [PATCH net-next 04/11] net: hold netdev instance lock during rtnetlink operations Stanislav Fomichev
2025-02-11 15:06 ` kernel test robot
2025-02-11 16:32 ` Stanislav Fomichev
2025-02-12 2:33 ` Jakub Kicinski
2025-02-10 19:20 ` [PATCH net-next 05/11] net: hold netdev instance lock during ioctl operations Stanislav Fomichev
2025-02-10 19:20 ` [PATCH net-next 06/11] net: hold netdev instance lock during sysfs operations Stanislav Fomichev
2025-02-10 19:20 ` [PATCH net-next 07/11] net: hold netdev instance lock during ndo_bpf Stanislav Fomichev
2025-02-10 19:20 ` [PATCH net-next 08/11] net: ethtool: try to protect all callback with netdev instance lock Stanislav Fomichev
2025-02-10 19:20 ` [PATCH net-next 09/11] net: dummy: add dummy shaper API Stanislav Fomichev
2025-02-11 10:41 ` kernel test robot
2025-02-11 15:29 ` kernel test robot
2025-02-10 19:20 ` [PATCH net-next 10/11] docs: net: document new locking reality Stanislav Fomichev
2025-02-10 19:20 ` [PATCH net-next 11/11] eth: bnxt: remove most dependencies on RTNL Stanislav Fomichev
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=20250211195703.57b5a6d1@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeed@kernel.org \
--cc=sdf@fomichev.me \
--cc=stfomichev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.