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 5FAD3606A6A8 for ; Fri, 4 Dec 2026 08:40:08 +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=a/f4bI7a; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RbEoNofS Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3BD8840B21; Fri, 4 Dec 2026 08:40:08 +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 swKqZObtg32J; Fri, 4 Dec 2026 08:40:07 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 468DB40B62 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=1796373607; b=jCvL61OaSHukLGgYFygaQYcuV5QDFVphGpjfjnYnOdzQSMx1L5hVWy3ZLZukk+l4CMYu sFAGmOmhhEZtjfdPHrneVjenAMi4o+lbjiTpeoE4BQW7Xq5EtHSRBqiWh/9yVYuSFMvkm G1V1s3ZdQuaxGsG9NnTK4FXQGCQd00XwDs24ynvKLR280XlOVw+IiKgjc1wd3LwhhM+4r OKVNOloqIVtci7iikUkEOvDE6iLEm9d96XMieehA88XGCDDw64V9XjFJzfjvGFIM/RSwO f2rKHW/ohWMk329CZ+uPZL5/DriRfDvBzpdvYiCSWkQkhko119X7832S0j1Y/0MExBg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796373607; 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=/9YpWcbpUul7u6yzP6xoggN8FjgPT+l2T0M4wIT+znY=; b=HUi5CI77FBiSvr8gDW3R269vA3tSs3zR4sc9BwfZCFbahR1Ti4UGhu591w4gs2uNv5n2 XVqwBlqtWHUU068FtHy2OM+G5VPJeNENqUiypvCvjM56l6kFlfh8FQjGfQ96qMymkqBzv SGZw3DMxUg+CX2vapmy6i+2tlzC8KYiUwOXy1jIgM+9bFArTndSg0Kgf2liaAc3jRjvxR FJgeRKcmC8eiJVCzhjRBddkMUc5Fwec/UqfWBezSghjf1D/d3md3kIqLPps+DRbo9Lvv5 KGaiB5XWQVqNNLAUTH9sRyItxsFiUNjGuBGMxkhh0JzIAoBS4388AySovvJUoxXLZCQ== ARC-Authentication-Results: i=1; smtp4.osuosl.org; dmarc=pass header.from=kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RbEoNofS; 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=1796373607; bh=/9YpWcbpUul7u6yzP6xoggN8FjgPT+l2T0M4wIT+znY=; 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=a/f4bI7aaRvWJ8X3RkZnX1Y0GbdjhnHdMO9jAAQHtlXmTBjRDEm3C5IDfEccHZRmx 3L9OE5PYHF6G1GsEQVnmJo//Q0ZoOz/f21t1XhlHVOgDZ/AG9FJOq+EtAUoK+lEqXX 9d7QP85mQk9GU5XduiAq67ZIL1sH0eGPv8XT0XgskEw8YEf6s0j65w+LTj1QDBsQ8D QGAVMYXpUvAVZQUVNfmmLih5xqPdPzbnaxE0pWYw+HMd/PGnx4XUXJAodVkVdTznaS qO0nTOs8kddtS9bbc1N0DQN85bI43oTle79gUNlu+YvBP80WI9+Isw6GWlwl1yu5wq bTMpGX6iEa8Tw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 468DB40B62; Fri, 4 Dec 2026 08:40:07 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 0B0EA2A8 for ; Fri, 4 Dec 2026 08:40:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E590F40B62 for ; Fri, 4 Dec 2026 08:40:05 +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 MVb9GeJm-xl1 for ; Fri, 4 Dec 2026 08:40:05 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org ECA6340B21 Authentication-Results: smtp4.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: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp4.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=RbEoNofS Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by smtp4.osuosl.org (Postfix) with ESMTPS id ECA6340B21 for ; Fri, 4 Dec 2026 08:40:02 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 3CAB441944; Fri, 4 Dec 2026 08:40:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DF051F000C2; Fri, 4 Dec 2026 08:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796373602; bh=/9YpWcbpUul7u6yzP6xoggN8FjgPT+l2T0M4wIT+znY=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=RbEoNofSPsGHpt5XyV4A9T1oHkcwqUsvs2XUgVrVBnjiJuSgbctQEAPyh9LuvxV1z rGUsMCo6wfHPIyFsAApsKox7g7XaN7oniCu8d+kLIhOpNa+oCV4FfXBz/q7VzYmIN5 czAWGfwEzqTknOLw3mABkiJ7hpAD5A+/XfEtZ1XC0U0xSqgJKZv/qGPH8nQxsJPOA9 dsHCl4kHixAf0WSMWxCtNZpWyDXLX4wJ/3Qnfhi+p7+11wcnXOzOhcysxssM6an9IL rDYCtcTzop0kwDzOehE4NBtKmBthSMU0E+NgKoVxCHRhRKZ8+6N9m4fInq6VUDM0y2 qLQapZMGJ4Zww== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net] iavf: restore queues after failed VF reset To: "Alexander Lopintsev" Cc: intel-wired-lan@lists.osuosl.org In-Reply-To: <20261203083936.79920-1-cldlss@gmail.com> References: <20261203083936.79920-1-cldlss@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 08:40:01 +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_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] iavf: uninitialized addr_list_lock acquired in iavf_disable_vf() - [Medium] iavf: iavf_add_filter() can miss re-arming MAC filter AQ after VF recovery -- commit 4b2079495d73ccc01c58e17981bdaa6016d5f5fe Author: Alexander Lopintsev iavf: restore queues after failed VF reset This commit extracts queue startup from iavf_open() into iavf_start_queues(), runs it from iavf_finish_config() when an administratively up VF finishes reinitialization, and unsyncs the netdev unicast and multicast lists in iavf_disable_vf() so filters can be replayed. > diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/et= hernet/intel/iavf/iavf_main.c > index 4de3ea8525b3f..c235c408f0a5b 100644 > --- a/drivers/net/ethernet/intel/iavf/iavf_main.c > +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c [ ... ] > @@ -3068,7 +3082,11 @@ static void iavf_disable_vf(struct iavf_adapter *a= dapter) > iavf_free_all_rx_resources(adapter); > } > =20 > + /* Startup must be able to replay addresses whose VF filters are lost. = */ > + netif_addr_lock_bh(adapter->netdev); [Severity: Medium] Can this acquire an uninitialized adapter->netdev->addr_list_lock? alloc_netdev_mqs() leaves dev->addr_list_lock zeroed, and spin_lock_init(&dev->addr_list_lock) only runs in register_netdevice(), which iavf_probe() defers to iavf_finish_config(). Before registration completes, iavf_poll_virtchnl_msg() can schedule a reset during early VF startup, and a reset timeout in iavf_reset_step() calls iavf_disable_vf() before checking adapter->state <=3D __IAVF_INIT_FAILED. Locking the uninitialized spinlock triggers a bad-magic bug under CONFIG_DEBUG_SPINLOCK and a lockdep splat under CONFIG_LOCKDEP. Guarding netif_addr_lock_bh() and the unsync calls with adapter->netdev->reg_state =3D=3D NETREG_REGISTERED avoids locking before registration. > spin_lock_bh(&adapter->mac_vlan_list_lock); > + __dev_uc_unsync(adapter->netdev, NULL); > + __dev_mc_unsync(adapter->netdev, NULL); [Severity: Medium] If an rx-mode update runs while the VF is in __IAVF_COMM_FAILED, can recovery fail to re-arm IAVF_FLAG_AQ_ADD_MAC_FILTER and leave pending MAC filters unprogrammed on the PF? iavf_disable_vf() leaves IFF_UP set and netif_device_present() true, so netif_rx_mode_run() can still call iavf_set_rx_mode() during __IAVF_COMM_FAILED. If adapter->hw.mac.addr is also present in netdev->uc (for example, via a bridge or MACsec upper device), the following sequence drops IAVF_FLAG_AQ_ADD_MAC_FILTER: rx_mode work watchdog / finish_config iavf_disable_vf() __dev_uc_unsync() / __dev_mc_unsync() netif_rx_mode_run() iavf_set_rx_mode() adds filters (f->add =3D true) sets AQ_ADD_MAC_FILTER marks uc/mc synced iavf_watchdog_step() [__IAVF_COMM_FAILED] adapter->aq_required =3D 0 ... iavf_finish_config() iavf_start_queues() iavf_add_filter(hw.mac.addr) iavf_set_rx_mode() <-- no-op In iavf_start_queues(), iavf_add_filter() finds the existing entry for hw.mac.addr and only clears f->remove without re-setting IAVF_FLAG_AQ_ADD_MAC_FILTER, and iavf_configure() -> iavf_set_rx_mode() does nothing because uc and mc are already synced. All pending filters on adapter->mac_filter_list (including multicast filters such as IPv6 solicited-node multicast) then remain unsent after the VF returns to __IAVF_RUNNING, silently dropping matching traffic until a new address is added or the interface is cycled down and up. Setting IAVF_FLAG_AQ_ADD_MAC_FILTER in iavf_add_filter() when an existing entry still has f->add set would ensure those pending filters are replayed. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203083936.7992= 0-1-cldlss@gmail.com?part=3D1