From: Stanislav Fomichev <stfomichev@gmail.com>
To: Michael Chan <michael.chan@broadcom.com>
Cc: Stanislav Fomichev <sdf@fomichev.me>,
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 v5 12/12] eth: bnxt: remove most dependencies on RTNL
Date: Wed, 19 Feb 2025 15:16:49 -0800 [thread overview]
Message-ID: <Z7ZmYcjUJaTx2OB8@mini-arch> (raw)
In-Reply-To: <CACKFLinkP2aakfuBP7rC0Z28qb6jf3_WKVS5W8Q5LPmHZAum7w@mail.gmail.com>
On 02/19, Michael Chan wrote:
> On Wed, Feb 19, 2025 at 12:30 PM Stanislav Fomichev <sdf@fomichev.me> wrote:
> >
> > Only devlink and sriov paths are grabbing rtnl explicitly. The rest is
> > covered by netdev instance lock which the core now grabs, so there is
> > no need to manage rtnl in most places anymore.
> >
> > On the core side we can now try to drop rtnl in some places
> > (do_setlink for example) for the drivers that signal non-rtnl
> > mode (TBD).
> >
> > Boot-tested and with `ethtool -L eth1 combined 24` to trigger reset.
> >
> > Cc: Saeed Mahameed <saeed@kernel.org>
> > Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
>
> A typo in a comment below. Otherwise it looks good to me.
>
> Reviewed-by: Michael Chan <michael.chan@broadcom.com>
>
> > @@ -13965,30 +13967,30 @@ static void bnxt_timer(struct timer_list *t)
> > mod_timer(&bp->timer, jiffies + bp->current_interval);
> > }
> >
> > -static void bnxt_rtnl_lock_sp(struct bnxt *bp)
> > +static void bnxt_lock_sp(struct bnxt *bp)
> > {
> > /* We are called from bnxt_sp_task which has BNXT_STATE_IN_SP_TASK
> > * set. If the device is being closed, bnxt_close() may be holding
> > - * rtnl() and waiting for BNXT_STATE_IN_SP_TASK to clear. So we
> > - * must clear BNXT_STATE_IN_SP_TASK before holding rtnl().
> > + * netdev instance lock and waiting for BNXT_STATE_IN_SP_TASK to clear.
> > + * So we must clear BNXT_STATE_IN_SP_TASK before holding rtnl().
>
> ... before holding netdev instance lock.
Thanks for the review! Will fix and repost tomorrow (unless Jakub pulls
and fixes on his side)
prev parent reply other threads:[~2025-02-19 23:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 20:27 [PATCH net-next v5 00/12] net: Hold netdev instance lock during ndo operations Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 01/12] net: hold netdev instance lock during ndo_open/ndo_stop Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 02/12] net: hold netdev instance lock during ndo_setup_tc Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 03/12] net: hold netdev instance lock during queue operations Stanislav Fomichev
2025-02-20 15:11 ` Sabrina Dubroca
2025-02-20 17:00 ` Stanislav Fomichev
2025-02-21 16:18 ` Sabrina Dubroca
2025-02-21 17:16 ` Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 04/12] net: hold netdev instance lock during rtnetlink operations Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 05/12] net: hold netdev instance lock during ioctl operations Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 06/12] net: hold netdev instance lock during sysfs operations Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 07/12] net: hold netdev instance lock during ndo_bpf Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 08/12] net: ethtool: try to protect all callback with netdev instance lock Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 09/12] net: replace dev_addr_sem " Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 10/12] net: add option to request " Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 11/12] docs: net: document new locking reality Stanislav Fomichev
2025-02-19 20:27 ` [PATCH net-next v5 12/12] eth: bnxt: remove most dependencies on RTNL Stanislav Fomichev
2025-02-19 21:28 ` Michael Chan
2025-02-19 23:16 ` Stanislav Fomichev [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=Z7ZmYcjUJaTx2OB8@mini-arch \
--to=stfomichev@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--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