From: Stanislav Fomichev <stfomichev@gmail.com>
To: Stanislav Fomichev <sdf@fomichev.me>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com,
Saeed Mahameed <saeed@kernel.org>
Subject: Re: [PATCH net-next v3 00/12] net: Hold netdev instance lock during ndo operations
Date: Mon, 17 Feb 2025 07:17:39 -0800 [thread overview]
Message-ID: <Z7NTE1DlI0nQjjwy@mini-arch> (raw)
In-Reply-To: <20250216233245.3122700-1-sdf@fomichev.me>
On 02/16, Stanislav Fomichev wrote:
> As the gradual purging of rtnl continues, start grabbing netdev
> instance lock in more places so we can get to the state where
> most paths are working without rtnl. Start with requiring the
> drivers that use shaper api (and later queue mgmt api) to work
> with both rtnl and netdev instance lock. Eventually we might
> attempt to drop rtnl. This mostly affects iavf, gve, bnxt and
> netdev sim (as the drivers that implement shaper/queue mgmt)
> so those drivers are converted in the process.
>
> call_netdevice_notifiers locking is very inconsistent and might need
> a separate follow up. Some notified events are covered by the
> instance lock, some are not, which might complicate the driver
> expectations.
>
> Changes since v2:
> - new patch to replace dev_addr_sem with instance lock (forwarding tests)
> - CONFIG_LOCKDEP around netdev_lock_cmp_fn (Jakub)
> - remove netif_device_present check from dev_setup_tc (bpf_offload.py)
> - reorder bpf_devs_locks and instance lock ordering in bpf map
> offload (bpf_offload.py)
>
> Changes since v1:
> - fix netdev_set_mtu_ext_locked in the wrong place (lkp@intel.com)
> - add missing depend on CONFIG_NET_SHAPER for dummy device
> (lkp@intel.com)
> - not sure we need to apply dummy device patch..
> - need_netdev_ops_lock -> netdev_need_ops_lock (Jakub)
> - remove netdev_assert_locked near napi_xxx_locked calls (Jakub)
> - fix netdev_lock_cmp_fn comment and line length (Jakub)
> - fix kdoc style of dev_api.c routines (Jakub)
> - reflow dev_setup_tc to avoid indent (Jakub)
> - keep tc_can_offload checks outside of dev_setup_tc (Jakub)
>
> Changes since RFC:
> - other control paths are protected
> - bntx has been converted to mostly depend on netdev instance lock
Teaming lock ordering is still not correct :-(
---
pw-bot: cr
next prev parent reply other threads:[~2025-02-17 15:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-16 23:32 [PATCH net-next v3 00/12] net: Hold netdev instance lock during ndo operations Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 01/12] net: hold netdev instance lock during ndo_open/ndo_stop Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 02/12] net: hold netdev instance lock during ndo_setup_tc Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 03/12] net: hold netdev instance lock during queue operations Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 04/12] net: hold netdev instance lock during rtnetlink operations Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 05/12] net: hold netdev instance lock during ioctl operations Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 06/12] net: hold netdev instance lock during sysfs operations Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 07/12] net: hold netdev instance lock during ndo_bpf Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 08/12] net: ethtool: try to protect all callback with netdev instance lock Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 09/12] net: replace dev_addr_sem " Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 10/12] net: dummy: add dummy shaper API Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 11/12] docs: net: document new locking reality Stanislav Fomichev
2025-02-16 23:32 ` [PATCH net-next v3 12/12] eth: bnxt: remove most dependencies on RTNL Stanislav Fomichev
2025-02-17 15:17 ` Stanislav Fomichev [this message]
2025-02-17 17:08 ` [PATCH net-next v3 00/12] net: Hold netdev instance lock during ndo operations Jakub Kicinski
2025-02-17 18:13 ` 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=Z7NTE1DlI0nQjjwy@mini-arch \
--to=stfomichev@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeed@kernel.org \
--cc=sdf@fomichev.me \
/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).