RE: [PATCH iwl-net 01/10] ice: replay UDP tunnel ports after a core or global reset

From: Loktionov, Aleksandr

Date: Mon Oct 05 2026 - 06:25:13 EST




> -----Original Message-----
> From: Petr Oros <poros@xxxxxxxxxx>
> Sent: Friday, October 2, 2026 3:08 PM
> 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 01/10] ice: replay UDP tunnel ports after a
> core or global reset
>
> A CORER, GLOBR or EMPR reloads the DDP package in ice_rebuild() and
> ice_init_pkg_hints() clears hw->tnl, so every offloaded VXLAN and
> GENEVE port is gone from both the boost TCAM and the driver table. The
> udp_tunnel_nic core is never told about it and still considers the
> ports programmed, so the Rx tunnel offloads silently stop working
> after the reset. With VXLAN port 4789 offloaded, 64 flows that differ
> only in the inner headers are spread over all six Rx queues of the
> test port by RSS, after a CORER they all land in a single queue, the
> same as without the port. Removing the port later trips the WARN_ON()
> in
> ice_destroy_tunnel() because its table entry is no longer valid:
>
> WARNING: ice_flex_pipe.c:524 at ice_udp_tunnel_unset_port+0x56/0x280
> [ice]
> ice 0000:04:00.3 enp4s0f3np3: Error removing UDP tunnel - -5
> ice 0000:04:00.3 enp4s0f3np3: UDP tunnel port sync failed port 4789
> type vxlan: -5
>
> Call udp_tunnel_nic_reset_ntf() once the main VSI is rebuilt so the
> core programs the ports again. A PF reset keeps the package and the
> table, so it is left alone. No rtnl_lock is needed since commit
> 1ead7501094c
> ("udp_tunnel: remove rtnl_lock dependency").
>
> i40e fixed the same problem in commit 1f190d936948 ("i40e: Reprogram
> port offloads after reset").
>
> Fixes: a4e82a81f573 ("ice: Add support for tunnel offloads")
> Assisted-by: LLM
> Signed-off-by: Petr Oros <poros@xxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index 8c4b0fbc790644..f2121e79fca993 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -7859,8 +7859,11 @@ static void ice_rebuild(struct ice_pf *pf, enum
> ice_reset_req reset_type)
> ice_rebuild_arfs(pf);
> }
>
> - if (vsi && vsi->netdev)
> + if (vsi && vsi->netdev) {
> netif_device_attach(vsi->netdev);
> + if (reset_type != ICE_RESET_PFR)
> + udp_tunnel_nic_reset_ntf(vsi->netdev);
> + }
>
> ice_update_pf_netdev_link(pf);
>
> --
> 2.55.0


Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>