From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: "Loktionov, Aleksandr" <aleksandr.loktionov@intel.com>
Cc: "Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"Kitszel, Przemyslaw" <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
"Keller, Jacob E" <jacob.e.keller@intel.com>,
NXNE CNSE OSDT ITP Upstreaming
<nxne.cnse.osdt.itp.upstreaming@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH iwl-next] ice: fix system hang on `ethtool -L`
Date: Wed, 21 Jan 2026 17:00:19 +0100 [thread overview]
Message-ID: <905f01c8-6208-4baa-9507-87ba54158779@intel.com> (raw)
In-Reply-To: <IA3PR11MB89860B4F0CF5B396C86747D2E596A@IA3PR11MB8986.namprd11.prod.outlook.com>
From: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
Date: Wed, 21 Jan 2026 08:18:47 +0100
>
>
>> -----Original Message-----
>> From: Lobakin, Aleksander <aleksander.lobakin@intel.com>
>> Sent: Tuesday, January 20, 2026 6:34 PM
>> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; intel-wired-
>> lan@lists.osuosl.org
>> Cc: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Kitszel,
>> Przemyslaw <przemyslaw.kitszel@intel.com>; Andrew Lunn
>> <andrew+netdev@lunn.ch>; David S. Miller <davem@davemloft.net>; Eric
>> Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
>> Abeni <pabeni@redhat.com>; Simon Horman <horms@kernel.org>; Keller,
>> Jacob E <jacob.e.keller@intel.com>; Loktionov, Aleksandr
>> <aleksandr.loktionov@intel.com>; NXNE CNSE OSDT ITP Upstreaming
>> <nxne.cnse.osdt.itp.upstreaming@intel.com>; netdev@vger.kernel.org;
>> linux-kernel@vger.kernel.org
>> Subject: [PATCH iwl-next] ice: fix system hang on `ethtool -L`
>>
>> ice_set_channels() calls ice_vsi_rebuild() under the netdev lock
>> taken, but ice_vsi_rebuild() calls netif_napi_{add,del}() which take
>> the same lock.
>> Add ice_vsi_rebuild_locked() which uses the _locked counterparts of
>> these functions and use it in ice_set_channels().
>>
>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>> ---
>> Hey Tony, please amend to the patch I replied to.
>> ---
>> drivers/net/ethernet/intel/ice/ice_base.h | 2 +
>> drivers/net/ethernet/intel/ice/ice_lib.h | 1 +
>> drivers/net/ethernet/intel/ice/ice_base.c | 63 ++++++++++++---
>> drivers/net/ethernet/intel/ice/ice_lib.c | 94 ++++++++++++++++++++---
>> drivers/net/ethernet/intel/ice/ice_main.c | 5 +-
>> 5 files changed, 143 insertions(+), 22 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_base.h
>> b/drivers/net/ethernet/intel/ice/ice_base.h
>> index d28294247599..99b2c7232829 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_base.h
>> +++ b/drivers/net/ethernet/intel/ice/ice_base.h
>> @@ -12,8 +12,10 @@ int __ice_vsi_get_qs(struct ice_qs_cfg *qs_cfg);
>> int ice_vsi_ctrl_one_rx_ring(struct ice_vsi *vsi, bool ena, u16
>> rxq_idx, bool wait); int ice_vsi_wait_one_rx_ring(struct ice_vsi
>> *vsi, bool ena, u16 rxq_idx);
>> +int ice_vsi_alloc_q_vectors_locked(struct ice_vsi *vsi);
>> int ice_vsi_alloc_q_vectors(struct ice_vsi *vsi); void
>> ice_vsi_map_rings_to_vectors(struct ice_vsi *vsi);
>> +void ice_vsi_free_q_vectors_locked(struct ice_vsi *vsi);
>> void ice_vsi_free_q_vectors(struct ice_vsi *vsi); int
>> ice_vsi_cfg_single_txq(struct ice_vsi *vsi, struct ice_tx_ring
>> **tx_rings,
>> u16 q_idx);
>> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.h
>> b/drivers/net/ethernet/intel/ice/ice_lib.h
>> index 347b63e497e7..e55b72db72c4 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_lib.h
>> +++ b/drivers/net/ethernet/intel/ice/ice_lib.h
>> @@ -68,6 +68,7 @@ int ice_ena_vsi(struct ice_vsi *vsi, bool locked);
>> void ice_vsi_decfg(struct ice_vsi *vsi); void ice_dis_vsi(struct
>> ice_vsi *vsi, bool locked);
>>
>> +int ice_vsi_rebuild_locked(struct ice_vsi *vsi, u32 vsi_flags);
>> int ice_vsi_rebuild(struct ice_vsi *vsi, u32 vsi_flags); int
>> ice_vsi_cfg(struct ice_vsi *vsi); struct ice_vsi
>> *ice_vsi_alloc(struct ice_pf *pf); diff --git
>> a/drivers/net/ethernet/intel/ice/ice_base.c
>> b/drivers/net/ethernet/intel/ice/ice_base.c
>> index 7097324c38f3..65e19815bec5 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_base.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_base.c
>> @@ -153,8 +153,8 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi
>> *vsi, u16 v_idx)
>> * handler here (i.e. resume, reset/rebuild, etc.)
>> */
>> if (vsi->netdev)
>> - netif_napi_add_config(vsi->netdev, &q_vector->napi,
>> - ice_napi_poll, v_idx);
>> + netif_napi_add_config_locked(vsi->netdev, &q_vector-
>>> napi,
>> + ice_napi_poll, v_idx);
> If you converted ice_vsi_alloc_q_vector() into _locked, should it be lockdep_assert_held(&vsi->netdev->lock); then?
IIRC the core kernel functions check for this and warn already.
>
> Everything else looks fine.
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Thanks,
Olek
next prev parent reply other threads:[~2026-01-21 16:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 15:51 [PATCH iwl-next v2 0/5] ice: add support for devmem/io_uring Rx and Tx Alexander Lobakin
2025-12-04 15:51 ` [PATCH iwl-next v2 1/5] libeth: pass Rx queue index to PP when creating a fill queue Alexander Lobakin
2026-02-06 16:34 ` [Intel-wired-lan] " Nowlin, Alexander
2025-12-04 15:51 ` [PATCH iwl-next v2 2/5] libeth: handle creating pools with unreadable buffers Alexander Lobakin
2026-02-06 16:33 ` [Intel-wired-lan] " Nowlin, Alexander
2025-12-04 15:51 ` [PATCH iwl-next v2 3/5] ice: migrate to netdev ops lock Alexander Lobakin
2026-01-19 18:05 ` [Intel-wired-lan] " Alexander Lobakin
2026-01-20 17:34 ` [PATCH iwl-next] ice: fix system hang on `ethtool -L` Alexander Lobakin
2026-01-21 7:18 ` Loktionov, Aleksandr
2026-01-21 16:00 ` Alexander Lobakin [this message]
2026-02-06 16:35 ` [Intel-wired-lan] [PATCH iwl-next v2 3/5] ice: migrate to netdev ops lock Nowlin, Alexander
2025-12-04 15:51 ` [PATCH iwl-next v2 4/5] ice: implement Rx queue management ops Alexander Lobakin
2026-02-06 16:29 ` [Intel-wired-lan] " Nowlin, Alexander
2025-12-04 15:51 ` [PATCH iwl-next v2 5/5] ice: add support for transmitting unreadable frags Alexander Lobakin
2026-02-06 16:27 ` [Intel-wired-lan] " Nowlin, Alexander
2026-01-29 11:03 ` [PATCH iwl-next v2 0/5] ice: add support for devmem/io_uring Rx and Tx Alexander Lobakin
2026-01-29 17:07 ` Tony Nguyen
2026-02-04 15:04 ` Alexander Lobakin
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=905f01c8-6208-4baa-9507-87ba54158779@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nxne.cnse.osdt.itp.upstreaming@intel.com \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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