From nobody Mon Feb 9 10:26:18 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E08EA32ABC8 for ; Sun, 18 Jan 2026 11:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768734038; cv=none; b=HgrN48vE+Jb5mbXkQFk0wis5FWewjb+hCcP1KDnRISUpbiUrJcqZY9tQ7WV1mAQ9uRwRTYFdLEuUQOhUpXBtrYl8aO2DlClRRfW9yLinQzAYVS11EoEjmYCvejMe5l/VKxxOkiM8GmAm5uz/rAcoRTJxaFbmlzVqcyW3Q1il+QM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768734038; c=relaxed/simple; bh=2IR9K9fFwUyb3vK1T1dQvAvM/jN1tGrfN72mQMj/cpo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D1xGsvznrlVi++eri7qEn64TVOrsKnRFRPc6cQot9BkYJ6SPPSsDbrVXiz98+YEE4Hwsc4XlAXLts6FHKbf6v+OFBEFaUaHCLewnLUI/41mDSKQrtIEWYto+Ux+hyICGpRLIwg2bEwiYgrBPzh4rdaHxbUdXTXzK2GTTZp2PgWI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gpbP/0VU; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gpbP/0VU" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-47ee3da7447so20501095e9.0 for ; Sun, 18 Jan 2026 03:00:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768734031; x=1769338831; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=+ZJpugnwNeH6pltmuI9tKkzaUCo5szMqMArK7fNoASs=; b=gpbP/0VUM7wN14tUSOCRuaNj7g8IhqrWgy1uMClUU6YkG4NEaitoH3D4DyU/Wmgxuc X7ZSKLRX3OvJ7rHjfYhP3vRUSJb9BhDm7SruURfY+wUt2UMFtPFDbDYkJtZWjVGPXjxG JnJXrjGWMm+SaHN7rIgGIbCGDvV+b80VtxnqwpFP3qL9J69WwIGrkh1wJRwrIrpRQJAJ zBSmXlkfqG63iuiz4auzsKAWCYi+pjyL54HEwaJC1nFnuM6HERnRVBQ17/jC3EL4lCH+ FVNXWMy7bifrWlg6btew66qssPs8KmUelJRVg8rXgzdHKawaEZ5bJJEjoVJKpGQJkVYf urRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768734031; x=1769338831; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+ZJpugnwNeH6pltmuI9tKkzaUCo5szMqMArK7fNoASs=; b=vRMZtNdI6WD/WIJ0EbzLDlF7HJQN/0MA5DK2d7FhESHd9oYwz+kD+DyP4w4X4sSd0v aEVrhDq8xk1XxhpI2kND3NbDFSGVWRJ70NH2sAQlVWw4gl5nVNBX+RXXBg0utVsf5Xfi Rw4H0m6RLb5lZxKDLwHnBOmIVZjmmhK2pBFhoqbOy5UaNJAXXFlDvqRLPVKMe9YwyaPK e0IjPitCMjNHknIvr5q/xvb4vr909DqiA45j7bLuB/N/2pxNFnHLMHtZPQ/D7nYi6eXL fKfYbXTDlLPjmimt1KZGg9/1RZ4afgrUY1nPxLComUZGqCIWcgZRiZ14GaIuTa2T3k8B B78w== X-Forwarded-Encrypted: i=1; AJvYcCVb7VNUDc+FWOnOSUHHKfD/c+HsrX/hgCee82FXelcQWo+MsFFTmcdVmpRYbJ+hR7bKk/L1+QCwIQhPbZk=@vger.kernel.org X-Gm-Message-State: AOJu0YyJPbruT+kmFlpdnyB8vFrMv6AxvxntqGzBiQEOHVElO3W8Cj8E MuBjIpHytqNxZf7ywb2u6QKx5OjCwRi/vttSzzn0Vn4EKHHOQUr6hQwg X-Gm-Gg: AY/fxX4JlHsY+Pjk83wnAQX9NMxhDRyBwxE5hp+8CC0GxhqcZPUEh7Otu/Le8itWWZ8 TwWw+4muiAOZorWVgqS5uR0hMsTsODlRsBWckhziP66rloidUkoKelVs3Qpc+DIfeyDbSui58ck C2bTc397ktGkeuGk6WSII5JLLG/BX0M4O1WVU9u+puX/k2dhF0ZtRo498t3U3HsVocm4HiwR/yi +I69s2STn4QxpLk4fN3qbOiLQ47KhTY7rvgeKZ/N5DoJ96iAdCwu2ACOs3NkV7B/HN99sF5MxkA edvoG1th1r0tC29cZU/JF7MCFmLsLgmD56E9NhCknsJWfyjY3Jc9YV7vX4225DlP+FJRiPMql4v 9MH46NgohPcRvTP/eWDPDZtVcextoed2hJwfG6LJ/wyEHy4WPe0MM1Q9Cs7JCMyieg+1L2lvA7p eKqAZ9CKqRyuyz3g== X-Received: by 2002:a5d:64e6:0:b0:432:dc23:34f with SMTP id ffacd0b85a97d-43569bd0b90mr11399255f8f.53.1768734031192; Sun, 18 Jan 2026 03:00:31 -0800 (PST) Received: from [192.168.1.243] ([143.58.192.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356992201csm16864635f8f.2.2026.01.18.03.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 03:00:30 -0800 (PST) From: Andre Carvalho Date: Sun, 18 Jan 2026 11:00:24 +0000 Subject: [PATCH net-next v11 4/7] netconsole: clear dev_name for devices bound by mac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260118-netcons-retrigger-v11-4-4de36aebcf48@gmail.com> References: <20260118-netcons-retrigger-v11-0-4de36aebcf48@gmail.com> In-Reply-To: <20260118-netcons-retrigger-v11-0-4de36aebcf48@gmail.com> To: Breno Leitao , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Simon Horman Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Andre Carvalho X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768734024; l=1518; i=asantostc@gmail.com; s=20250807; h=from:subject:message-id; bh=2IR9K9fFwUyb3vK1T1dQvAvM/jN1tGrfN72mQMj/cpo=; b=ZvsPAc1Nu3ncrw9ojdKCeN2DHwyPVw7plQa3n07vRyJd/cxxaUO+SA0AoD9lL2k2nzwCszWvh nW9AXxX1gTCCe+wxKObWzHnTXE+T7uhtZbLMIQUgtk/NLL5m5Yo7t1D X-Developer-Key: i=asantostc@gmail.com; a=ed25519; pk=eWre+RwFHCxkiaQrZLsjC67mZ/pZnzSM/f7/+yFXY4Q= This patch makes sure netconsole clears dev_name for devices bound by mac in order to allow calling setup_netpoll on targets that have previously been cleaned up (in order to support resuming deactivated targets). This is required as netpoll_setup populates dev_name even when devices are matched via mac address. The cleanup is done inside netconsole as bound by mac is a netconsole concept. Signed-off-by: Andre Carvalho Reviewed-by: Breno Leitao --- drivers/net/netconsole.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 7a1e5559fc0d..02a3463e8d24 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -242,6 +242,12 @@ static void populate_configfs_item(struct netconsole_t= arget *nt, } #endif /* CONFIG_NETCONSOLE_DYNAMIC */ =20 +/* Check if the target was bound by mac address. */ +static bool bound_by_mac(struct netconsole_target *nt) +{ + return is_valid_ether_addr(nt->np.dev_mac); +} + /* Allocate and initialize with defaults. * Note that these targets get their config_item fields zeroed-out. */ @@ -284,6 +290,8 @@ static void netconsole_process_cleanups_core(void) /* all entries in the cleanup_list needs to be disabled */ WARN_ON_ONCE(nt->state =3D=3D STATE_ENABLED); do_netpoll_cleanup(&nt->np); + if (bound_by_mac(nt)) + memset(&nt->np.dev_name, 0, IFNAMSIZ); /* moved the cleaned target to target_list. Need to hold both * locks */ --=20 2.52.0