On October 2, 2026 3:07:43 PM GMT+02:00, Petr Oros <[email protected]> wrote:
>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 <[email protected]>
>---
> 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);
> 

Reviewed-by: Ivan Vecera <[email protected]>

Reply via email to