From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DD86606A32D for ; Fri, 4 Dec 2026 03:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=clyxaGT1; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QUyumTVK Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4DB1D4091B; Fri, 4 Dec 2026 03:54:23 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id K_wUheFvrJYC; Fri, 4 Dec 2026 03:54:22 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 6902F40954 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796356462; b=lipRaikyTHb74t190K1SHaPvMKUAYJsG3RZ6AvNBCmwFvY0Yo5+wi842jIhyuvSXNqBZ SxoYUw3cQ/GxKg52Lv+DSI3lErCA34TWf7uGNZO6/SieEh7GvLY1DSHelvEcuSoI5iFpt rpe8mg6nLO11R6d11guwIkjyXz3rESUZ6z9D6y7qK28jVF+cWdv3SRg5uOJmRHVXvyM6l f6pq667OSK7LJBM4TlUljlSE0KY1gOxbCf5vmNK/Ma4AZ3hGKHLoz+gt5M7YKDytg9pNp 80raVdZvDJtorsHu8gj3AhLUGhsPtqNrDtk6WsJPCs5sydkJ5zzpcVX7xm9rDnALM9w== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796356462; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:DKIM-Signature:Message-ID:From:Subject:To:Cc:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:Date:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Reply-To:Errors-To; bh=FuRB9X2nIzj+hYYd5bGicNXCbtLyWgb2uml9U7vZs5o=; b=IhCaKAoM0ldiXpjuffC+AtofPKkIxZrBt2VuD07XuLdxbYtyJd41CACh0yBfKMqOUaLN 1fhlsG7yDJgYeC5ceLzM5q5Ztsd6UTsvwR+dYR6GuEAcbRjU9GGXKFr4x9KeTWsDMx++W Bw3+URCdWX7WvQxqaWCHo4ATKDjh1oOxHDi2zexR2Aalm8ejSMo0Ny+qCs2s6h8UW+wg0 nLwGckIT1hJKJWoF3cWdcqV6FD5+DsvCcS9tqezkYfPGr7/620BHn2sMAVbRJ7dN3fKeB GyglPtHyrbQ5rky76dsFaLFhT82Z2pC8sNZ7KBANHXsHHR7LmMTtn9J6IAMhCqcyslQ== ARC-Authentication-Results: i=1; smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796356462; bh=FuRB9X2nIzj+hYYd5bGicNXCbtLyWgb2uml9U7vZs5o=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=clyxaGT1Qp3zcsUyoImuHZzEZjqfsvqAEPxjJteoikpCeIuQLbTQ2/4UMcJrQlHa+ J5ZzjN3TLELAHI6wPxD0E8fWaWMqFq1PFSW23Bysfk3cUiM8iHMmAP4gIgOKZ/IN5o esJfC6+yERBGSvaAiiPhc2JSBIkNv1NK+k+7sE4DhWwfzWIKjCxLSX9t/GeoyJ2xlC pHGPCNRZEplp4veFmBWzk7/q6feG5YKj8EQms2OGzie+R6fHE7rF0+jsjtO3rImJ39 64Q1OyeakPsdKzIaPcBe5qxp+0I4c6lNU+Bj3MsFiUm3OxIXbdshuWawAZEVJP49KN xUhOmMPLtkRlw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 6902F40954; Fri, 4 Dec 2026 03:54:22 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id D596E36A for ; Fri, 4 Dec 2026 03:54:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id BBBDE60DDD for ; Fri, 4 Dec 2026 03:54:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id JTkTsvnELlXa for ; Fri, 4 Dec 2026 03:54:21 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org BD3D360DD6 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QUyumTVK Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by smtp3.osuosl.org (Postfix) with ESMTPS id BD3D360DD6 for ; Fri, 4 Dec 2026 03:54:20 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id D692F42DB8; Fri, 4 Dec 2026 03:54:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A79461F0092C; Fri, 4 Dec 2026 03:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796356459; bh=FuRB9X2nIzj+hYYd5bGicNXCbtLyWgb2uml9U7vZs5o=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=QUyumTVKBQ+DqGdD7NUCvgNn7d2M+y3ax9FOGPFddaVk8EeObctR2PhTN3sQTlR23 vPfVBEOSSuNlnS9sVmCSnaGObK72SDQnufsr53GYmYOZ8ZjaYNOa2ICPZ0k6c2oxix 9vbWNKQXXZDrGXJKMS3/cVefeCMQfHQWRdCVJV4ve5fpumpI9jUWIIRZj8RfUw3shq MpePRzA67uNqnLjP8RTGpLiS7P9z68e4rFefdhkITvvIrciHNlRzZcRgpFgFhfDdFa kqg2CLQQk0yCiyQ5Q0hPA/WPz7oPsl7hmqaWQFGGbNv7Rq6bS+ZkJfP5m+Jow3b9Dw Y4p7k5bA7eRHA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v3 1/2] ice: restore DDP state during PFR recovery To: "Aaron Ma" Cc: intel-wired-lan@lists.osuosl.org In-Reply-To: <20261203035320.187412-1-aaron.ma@canonical.com> References: <20261203035320.187412-1-aaron.ma@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 03:54:19 +0000 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] ice: missing UDP tunnel replay and DVM restore on non-PFR resets in ice_rebuild() - [Medium] ice: UDP tunnel port table race and desync during PFR package reload -- commit dcc6ec010dfa80086a4a5aaaf02e06aab8b1448c Author: Aaron Ma ice: restore DDP state during PFR recovery This commit serializes PF configuration clearing and DDP package reload per adapter during ice_rebuild(), reloading the cached DDP package, restoring DVM state and default recipes, and replaying offloaded UDP tunnel ports on PFR. > diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ether= net/intel/ice/ice_ddp.c > index d50c555851fbd..bedb9362d4098 100644 > --- a/drivers/net/ethernet/intel/ice/ice_ddp.c > +++ b/drivers/net/ethernet/intel/ice/ice_ddp.c > @@ -2204,6 +2204,7 @@ enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, = u8 *buf, u32 len) > enum ice_ddp_state state; > struct ice_pkg_hdr *pkg; > struct ice_seg *seg; > + u16 i; > =20 > if (!buf || !len) > return ICE_DDP_PKG_ERR; > @@ -2234,7 +2235,14 @@ enum ice_ddp_state ice_init_pkg(struct ice_hw *hw,= u8 *buf, u32 len) > return state; > =20 > /* initialize package hints and then download package */ > - ice_init_pkg_hints(hw, seg); > + if (hw->seg !=3D seg) { > + ice_init_pkg_hints(hw, seg); > + } else { > + mutex_lock(&hw->tnl_lock); > + for (i =3D 0; i < hw->tnl.count; i++) > + hw->tnl.tbl[i].port =3D 0; > + mutex_unlock(&hw->tnl_lock); > + } > state =3D ice_download_pkg(hw, pkg, seg); [Severity: Medium] Can clearing hw->tnl.tbl[i].port here race with udp_tunnel_nic_device_sync_work() or leave hw->tnl.tbl[] out of sync if ice_reload_pkg_pfr() fails? Because ice does not set UDP_TUNNEL_NIC_INFO_OPEN_ONLY, udp_tunnel_nic_device_sync_work() can run concurrently under rtnl_lock() before ice_rebuild() reaches udp_tunnel_nic_reset_ntf(): CPU0 CPU1 (kworker) ice_rebuild() ice_reload_pkg_pfr() ice_init_pkg() mutex_lock(&hw->tnl_lock) hw->tnl.tbl[i].port =3D 0 mutex_unlock(&hw->tnl_lock) udp_tunnel_nic_device_sync_work() ... ice_udp_tunnel_unset_port() ice_destroy_tunnel() WARN_ON(hw->tnl.tbl[index].= port !=3D port) ice_download_pkg() rtnl_lock() udp_tunnel_nic_reset_ntf() rtnl_unlock() A concurrent UDP_TUNNEL_NIC_ENTRY_ADD in that window will also run ice_create_tunnel() -> ice_update_pkg() concurrently with ice_download_pkg() and ice_dvm_update_dflt_recipes(). In addition, if ice_reload_pkg_pfr() fails after hw->tnl.tbl[i].port is zeroed, ice_rebuild() skips udp_tunnel_nic_reset_ntf(), so later tunnel removal or driver unload will hit the same WARN_ON() in ice_destroy_tunnel() for every active entry. > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethe= rnet/intel/ice/ice_main.c > index 9644b25e79355..179516e4c419c 100644 > --- a/drivers/net/ethernet/intel/ice/ice_main.c > +++ b/drivers/net/ethernet/intel/ice/ice_main.c [ ... ] > @@ -7684,21 +7729,28 @@ static void ice_rebuild(struct ice_pf *pf, enum i= ce_reset_req reset_type) > goto err_init_ctrlq; > } > =20 > + mutex_lock(&pf->adapter->rebuild_lock); > + err =3D ice_clear_pf_cfg(hw); > + if (err) > + dev_err(dev, "clear PF configuration failed %d\n", err); > + > /* if DDP was previously loaded successfully */ > - if (!ice_is_safe_mode(pf)) { > - /* reload the SW DB of filter tables */ > - if (reset_type =3D=3D ICE_RESET_PFR) > - ice_fill_blk_tbls(hw); > - else > + if (!err && !ice_is_safe_mode(pf)) { > + if (reset_type =3D=3D ICE_RESET_PFR) { > + err =3D ice_reload_pkg_pfr(pf); > + if (!err && vsi && vsi->netdev) { > + rtnl_lock(); > + udp_tunnel_nic_reset_ntf(vsi->netdev); > + rtnl_unlock(); > + } > + } else { > /* Reload DDP Package after CORER/GLOBR reset */ > ice_load_pkg(NULL, pf); > + } > } [Severity: Medium] Does the non-PFR branch also need udp_tunnel_nic_reset_ntf() and DVM restoration? On CORER, GLOBR, or EMPR (including system resume on a bonded interface, where ice_reset_subtask() promotes ICE_RESET_PFR to ICE_RESET_CORER), ice_load_pkg(NULL, pf) calls ice_init_pkg(), which zeroes hw->tnl.tbl[i].port and reloads the package. Because udp_tunnel_nic_reset_ntf() and the DVM restore logic in ice_reload_pkg_pfr() only run for ICE_RESET_PFR, offloaded UDP tunnel ports and DVM recipes are not restored, and later tunnel removal hits WARN_ON() and returns -EIO in ice_destroy_tunnel() because hw->tnl.tbl[index].port is 0. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203035320.1874= 12-1-aaron.ma@canonical.com?part=3D1