public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <anthony.l.nguyen@intel.com>, <horms@kernel.org>,
	<edumazet@google.com>, <sdf@fomichev.me>,
	<aleksandr.loktionov@intel.com>, <ast@kernel.org>,
	<john.fastabend@gmail.com>, <bpf@vger.kernel.org>,
	<netdev@vger.kernel.org>, <davem@davemloft.net>,
	<andrew+netdev@lunn.ch>, <hawk@kernel.org>,
	<nxne.cnse.osdt.itp.upstreaming@intel.com>,
	<magnus.karlsson@intel.com>, <pabeni@redhat.com>,
	<jacob.e.keller@intel.com>, <daniel@iogearbox.net>,
	<maciej.fijalkowski@intel.com>
Subject: Re: [net-next,3/5] ice: migrate to netdev ops lock
Date: Tue, 17 Mar 2026 16:30:26 +0100	[thread overview]
Message-ID: <a95fa7f2-909e-4b1c-b25a-1ee88b292ecf@intel.com> (raw)
In-Reply-To: <20260316161630.2d9ac04e@kernel.org>

From: Jakub Kicinski <kuba@kernel.org>
Date: Mon, 16 Mar 2026 16:16:30 -0700

> On Mon, 16 Mar 2026 16:10:49 +0100 Alexander Lobakin wrote:
>>> Does ice_dcb_ena_dis_vsi() need to acquire the netdev lock before calling
>>> ice_dis_vsi_locked() and ice_ena_vsi()?
>>>
>>> Looking at the disable path, ice_dis_vsi_locked() calls ice_vsi_close()
>>> which goes through ice_down() -> ice_napi_disable_all() ->
>>> napi_disable_locked(), and that function has netdev_assert_locked(n->dev) in
>>> net/core/dev.c. Similarly, ice_vsi_close() calls
>>> ice_vsi_clear_napi_queues_locked() -> netif_napi_set_irq_locked() which
>>> checks netdev_assert_locked_or_invisible().
>>>
>>> The enable path calls ice_ena_vsi() -> ice_open_internal() ->
>>> ice_vsi_open(), and that now calls ice_vsi_set_napi_queues_locked() ->
>>> netif_napi_set_irq_locked() (requires netdev lock) and ice_up_complete() ->
>>> ice_napi_enable_all() -> napi_enable_locked().
>>>
>>> The old code called ice_dis_vsi(vsi, locked) and ice_ena_vsi(vsi, locked)
>>> where the old ice_dis_vsi() only dealt with rtnl_lock. The new code switches
>>> to _locked variants that require the netdev lock but does not acquire it.
>>>
>>> Callers ice_pf_dcb_cfg() and ice_dcb_process_lldp_set_mib_change() hold
>>> rtnl_lock but not the netdev lock.  
>>
>> Doesn't the DCB core take the netdev lock just like netdev_ops? Or it
>> only takes the RTNL?
> 
> DCB is not covered by the instance lock.. but TBH purely because 
> I just always forget it exists. Feel free to make it take the lock
> if that makes more sense.

I'd leave as it is for this series to not increase the diffstat and room
for probably bugs (as other drivers would need adjustments in that
case). So I'll make ice to take the lock in its DCB code for now.

BTW, if it's not top secret, how do you run these AI reviews? Because
Tony used the same link as these reports provide to deploy a setup, but
we didn't manage to get as meaningful results as yours. That's why
several respins of this series only due to your AI reviews, sorry =\

Thanks,
Olek

  reply	other threads:[~2026-03-17 15:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 22:06 [PATCH net-next 0/5][pull request] ice: add support for devmem/io_uring Rx and Tx Tony Nguyen
2026-03-10 22:06 ` [PATCH net-next 1/5] libeth: pass Rx queue index to PP when creating a fill queue Tony Nguyen
2026-03-10 22:06 ` [PATCH net-next 2/5] libeth: handle creating pools with unreadable buffers Tony Nguyen
2026-03-10 22:06 ` [PATCH net-next 3/5] ice: migrate to netdev ops lock Tony Nguyen
2026-03-13  1:46   ` [net-next,3/5] " Jakub Kicinski
2026-03-16 15:10     ` Alexander Lobakin
2026-03-16 23:16       ` Jakub Kicinski
2026-03-17 15:30         ` Alexander Lobakin [this message]
2026-03-17 15:50           ` Jakub Kicinski
2026-03-17 16:15             ` Tony Nguyen
2026-03-17 17:29               ` Jakub Kicinski
2026-03-17 17:57                 ` Tony Nguyen
2026-03-10 22:06 ` [PATCH net-next 4/5] ice: implement Rx queue management ops Tony Nguyen
2026-03-10 22:06 ` [PATCH net-next 5/5] ice: add support for transmitting unreadable frags Tony Nguyen

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=a95fa7f2-909e-4b1c-b25a-1ee88b292ecf@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nxne.cnse.osdt.itp.upstreaming@intel.com \
    --cc=pabeni@redhat.com \
    --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