RE: [PATCH iwl-net 04/10] ice: restore the default XPS map after a netdev TC change

From: Nowlin, Alexander

Date: Fri Nov 06 2026 - 23:53:45 EST


> -----Original Message-----
> From: Petr Oros <poros@xxxxxxxxxx>
> Sent: Friday, October 2, 2026 6:08 AM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: Oros, Petr <poros@xxxxxxxxxx>; Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; Andrew Lunn <andrew+netdev@xxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Lobakin, Aleksander <aleksander.lobakin@xxxxxxxxx>; Alexei Starovoitov <ast@xxxxxxxxxx>; Daniel Borkmann <daniel@xxxxxxxxxxxxx>; Jesper Dangaard Brouer <hawk@xxxxxxxxxx>; John Fastabend <john.fastabend@xxxxxxxxx>; Stanislav Fomichev <sdf@xxxxxxxxxxx>; Henry Tieman > <henry.w.tieman@xxxxxxxxx>; Anirudh Venkataramanan <anirudh.venkataramanan@xxxxxxxxx>; Michal Swiatkowski <michal.swiatkowski@xxxxxxxxxxxxxxx>; Jesse Brandeburg <jbrandeb@xxxxxxxxxx>; Preethi Banala <preethi.banala@xxxxxxxxx>; Kiran Patil <kiran.patil@xxxxxxxxx>; Dan Nowlin <dan.nowlin@xxxxxxxxx>; Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; bpf@xxxxxxxxxxxxxxx
> Subject: [PATCH iwl-net 04/10] ice: restore the default XPS map after a netdev TC change
>
> ice_cfg_xps_tx_ring() programs the default XPS map only once per ring, guarded by ICE_TX_XPS_INIT_DONE. netdev_reset_tc() and
> netdev_set_num_tc() drop all XPS maps of the device, but the bit is never cleared, so the default map is not programmed again.
>
> Since commit 122045ca7704 ("ice: config netdev tc before setting queues
> number") ice_vsi_open() calls ice_vsi_cfg_netdev_tc() after the Tx queues have been configured, so the map is wiped right after it was written on every open and stays empty:
>
> # cat /sys/class/net/enp4s0f0np0/queues/tx-*/xps_cpus
> 0000
> 0000
> ...
>
> A DCB reconfiguration ends the same way through ice_vsi_cfg_tc().
>
> Clear ICE_TX_XPS_INIT_DONE in ice_vsi_cfg_netdev_tc(), which resets the netdev TC state, and configure the netdev TCs in ice_vsi_open() before the Tx queues so the default map is applied after the reset, not before it.
>
> i40e fixed the same stale bit in commit 82e0572b2302 ("i40e: Fix not setting default xps_cpus after reset").
>
> Fixes: 122045ca7704 ("ice: config netdev tc before setting queues number")
> Assisted-by: LLM
> Signed-off-by: Petr Oros <poros@xxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++++ drivers/net/ethernet/intel/ice/ice_main.c | 6 +++---
> 2 files changed, 9 insertions(+), 3 deletions(-)

Tested-by: Alexander Nowlin <alexander.nowlin@xxxxxxxxx>