public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Przemek Kitszel <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>
Cc: <netdev@vger.kernel.org>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	<stable@vger.kernel.org>,
	Sunitha Mekala <sunithax.d.mekala@intel.com>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: Re: [PATCH net 10/13] i40e: fix napi_enable/disable skipping ringless q_vectors
Date: Thu, 16 Apr 2026 13:46:52 -0700	[thread overview]
Message-ID: <70776680-1b60-4898-b9cd-bcc48abaac76@intel.com> (raw)
In-Reply-To: <6cc3c5b2-fb71-42a4-8d5b-57cd85de2f02@intel.com>

On 4/15/2026 9:20 PM, Przemek Kitszel wrote:
> On 4/15/26 07:48, Jacob Keller wrote:
>> From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
>>
>> After ethtool -L reduces the queue count, i40e_napi_disable_all() sets
>> NAPI_STATE_SCHED on all q_vectors, then i40e_vsi_map_rings_to_vectors()
>> clears ring pointers on the excess ones.  i40e_napi_enable_all() skips
>> those with:
>>
>>     if (q_vector->rx.ring || q_vector->tx.ring)
>>         napi_enable(&q_vector->napi);
>>
>> leaving them on dev->napi_list with NAPI_STATE_SCHED permanently set.
>>
>> Writing to /sys/class/net/<iface>/threaded calls napi_stop_kthread()
>> on every entry in dev->napi_list.  The function loops on msleep(20)
>> waiting for NAPI_STATE_SCHED to clear -- which never happens for the
>> stale q_vectors.  The task hangs in D state forever; a concurrent write
>> deadlocks on dev->lock held by the first.
>>
>> Commit 13a8cd191a2b ("i40e: Do not enable NAPI on q_vectors that have no
>> rings") added the guard to prevent a divide-by-zero in i40e_napi_poll()
>> when epoll busy-poll iterated all device NAPIs (4.x era). Since
>> 7adc3d57fe2b ("net: Introduce preferred busy-polling"), from v5.11,
>> napi_busy_loop() polls by napi_id keyed to the socket, so ringless
>> q_vectors are never selected.  i40e_msix_clean_rings() also independently
>> avoids scheduling NAPI for them.  The guard is safe to remove.
>>
>> Add an early return in i40e_napi_poll() for num_ringpairs == 0 so the
>> function is self-defending against a NULL tx.ring dereference at the
>> WB_ON_ITR check, should the NAPI ever fire through an unexpected path.
>>
>> Reported-by: Jakub Kicinski <kuba@kernel.org>
>> Closes: https://lore.kernel.org/intel-wired-
>> lan/20260316133100.6054a11f@kernel.org/
> 
> Maciej developed a better fix for the problem, and he explicitly asked
> to not include this patch. Please drop it from this series.
> 
> Maciej's fix:
> https://lore.kernel.org/intel-wired-lan/20260414121405.631092-1-
> maciej.fijalkowski@intel.com/T/#u
> 
> ask for reject:
> https://lore.kernel.org/intel-wired-lan/
> PH0PR11MB75223C8A00C3183C5082A096A0252@PH0PR11MB7522.namprd11.prod.outlook.com/T/#mbac55f7219d7855a2e5d1527904b2da43ad080cb
> 

Ugh, sorry for failing to notice this when batching this series up :(

Thanks,
Jake

  reply	other threads:[~2026-04-16 20:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15  5:47 [PATCH net 00/13] Intel Wired LAN Driver Updates 2026-04-14 (ice, i40e, iavf, idpf, e1000e) Jacob Keller
2026-04-15  5:47 ` [PATCH net 01/13] ice: fix 'adjust' timer programming for E830 devices Jacob Keller
2026-04-15  5:47 ` [PATCH net 02/13] ice: update PCS latency settings for E825 10G/25Gb modes Jacob Keller
2026-04-15  5:47 ` [PATCH net 03/13] ice: fix double free in ice_sf_eth_activate() error path Jacob Keller
2026-04-15  5:47 ` [PATCH net 04/13] ice: fix double-free of tx_buf skb Jacob Keller
2026-04-15  5:48 ` [PATCH net 05/13] ice: fix PHY config on media change with link-down-on-close Jacob Keller
2026-04-15  5:48 ` [PATCH net 06/13] ice: fix ICE_AQ_LINK_SPEED_M for 200G Jacob Keller
2026-04-15  5:48 ` [PATCH net 07/13] ice: fix race condition in TX timestamp ring cleanup Jacob Keller
2026-04-15  5:48 ` [PATCH net 08/13] ice: fix potential NULL pointer deref in error path of ice_set_ringparam() Jacob Keller
2026-04-15  5:48 ` [PATCH net 09/13] i40e: don't advertise IFF_SUPP_NOFCS Jacob Keller
2026-04-15  5:48 ` [PATCH net 10/13] i40e: fix napi_enable/disable skipping ringless q_vectors Jacob Keller
2026-04-16  4:20   ` Przemek Kitszel
2026-04-16 20:46     ` Jacob Keller [this message]
2026-04-16 20:50       ` Jacob Keller
2026-04-15  5:48 ` [PATCH net 11/13] iavf: fix wrong VLAN mask for legacy Rx descriptors L2TAG2 Jacob Keller
2026-04-15  5:48 ` [PATCH net 12/13] idpf: fix xdp crash in soft reset error path Jacob Keller
2026-04-15  5:48 ` [PATCH net 13/13] e1000e: Unroll PTP in probe error handling Jacob Keller

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=70776680-1b60-4898-b9cd-bcc48abaac76@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=sunithax.d.mekala@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