From nobody Sun Feb 8 06:56:05 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 3BE403BB9F4 for ; Thu, 15 Jan 2026 17:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768497147; cv=none; b=bOSSg6tLUaLF3BGRN9UA2F3ELH4uM7IIbegcemGiNkTOsxXXnog0PzkzhwgMRfJvvUPS1k1WhfgzExJRuphbnyEo0fRnRtlrMboW3E3lnqmlKxQELM+yhQAH3HojCl6QRbQWHVwYY4FGPAWrglS+HvI02bZHmTSxlox4q28L/5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768497147; c=relaxed/simple; bh=LSh5hLuiJCxDRwJ+BQ+Xc7tCZE16QA/b770rYhc+vp8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LIzhuhtSdRopWETcNydF4DT0Ks1eCAu2i7KVmPVqjoSmtC189Oa4wXjC5fa92C6yYQytVpN8ryiPP/7xOY8/VnkJIWA3JS5N8CLz1d73h5fhzbWwJdZP2ClJzjTXwGeIaLJ27r57CZUvXPn+4RgXzmKLCeLj58NeLT6A2lVPXMQ= 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=BpSyJ0Nx; arc=none smtp.client-ip=209.85.128.51 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="BpSyJ0Nx" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-47ee937ecf2so9445945e9.0 for ; Thu, 15 Jan 2026 09:12:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768497144; x=1769101944; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BopLoWIhKj7xpDJExutQghL/d96/x+rVfP3p1ohtywE=; b=BpSyJ0NxtpRPZ6abZNisiXXoEYNXasXggd9O3OKVrGnHSKsViorbq/MWM0H+4+vazG wTWa6BJKsVkIsYVo4yw5n1V36rolO6khYXu1on9DSEl6H8AJa8Y7Z4y+Hr7EnSyAbAJL DtY/5SZojfLmswHJCdLMrYeVy16h5gtGQFlxzRL2Zfsd2Gh15s7MO/hW57pZ5JtvIdbB QsYiSaDzlLIQW0Vbt6yqGYOi1Tutq0LhPaSWhlPyAOp9WghftsjiYCqKgjEsBWG0k6oB BbZEJGFMCKC46d5tVENMJ26vXugK9oIXgKOBZgW8fSv6KqwRyAHOkGrBH/EbNo6QQyaj 5NMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768497144; x=1769101944; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BopLoWIhKj7xpDJExutQghL/d96/x+rVfP3p1ohtywE=; b=NZSBJ9jDQeIojJTqmgrjQ5SkSpJ3ZuqJMpuUZxBEPZ7FN07S7Wb8BcHkkPG+Khm7jV 5OLjwyKd+ehjpa1TEFhf47IEN4m1qINQjdfDRtjSCUonRl4bSKI7l0m7gXnhmU2ivnpr 3QDZEx/npBw71O/gmbmzFR6SqF0ZQnd4gEZgc9otrIV1tSckjEANgRnhbSUGl7v8n9KN 6Ieem1kJiwjZGP42zUIFY9UoXgDIaMm8kViFKxOwXBoMUpQ01iCYOvMHi4Vf3t1K6a5g 4FjzoLhWr56M1nrn7uo25U802Ti85/8tQg/q7iOrNu3XfdtaV8+sJjhlP57EapXxwNps ON+w== X-Forwarded-Encrypted: i=1; AJvYcCUeoRORAldCviGoUd1wUyrtAbtx/Vw0lToVXpaskDR7oncxNCKyGVURQaNcyWyREVyNlib7F2Wgd45pWq8=@vger.kernel.org X-Gm-Message-State: AOJu0YyvyWLRx+THupUowUTcQimp+ZAsCVAq6BwVBE37Fg3xqG1RO9uM Kf3ICrV5z+PtQCnO3p7P48dSKGIzw/5bgtCrKVretoEJOyfKWEEa08Db X-Gm-Gg: AY/fxX6U2sgKUuWKYP1QWparfXkopUXXW2VTobfu0vT9ZMjA2nx9dpt6uULsT4d79WW tdQZ5+38lJxtu4Jkafp/fpE0HTZOmZyvkN3BGvnc3pdDU/CeTyruFnrjrXu72Inw80a4FniRqXR 3t1CodHtpzHGPaTGesGJZGYzuHIj21VbuYLNuqzKRtmTH8u1P/CghDywYwjr6rBzZMGY7LZ/2Tz 42oHxs/hwe1mnHIHvvZnFYkDFrAlYertlpY/FOXVZ5nnZ2XrL9igLrbbb9iSWkfnmqwXzWhrEVR WEiq8U+Icbp5yqn5HWVZsQewyy1fviZF9NXlG4H5uRvoQTYCulXjQS4AQ63lNCzzA5Rl55UK8Mg 6mqVRjwvB2Dr4Zr/XTOmbk9ToMqYdYuGmZO/XkdRMrozEFKsZYgIAf8R3y9Q19gO6P43rf7CkLv bVRaqRThxw8S96DEfCruKoE3qVmo4oDHz6Bm/o0jhfO9XJY8sSOW+1oUABKzTto5is9jQ/EPnPn 6+M7lwNTZ3pYBYggA== X-Received: by 2002:a05:600d:640f:20b0:47d:6c36:a125 with SMTP id 5b1f17b1804b1-4801e7d2a3cmr1460515e9.17.1768497144306; Thu, 15 Jan 2026 09:12:24 -0800 (PST) Received: from 127.mynet ([2a01:4b00:bd21:4f00:7cc6:d3ca:494:116c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f429071a2sm54741645e9.11.2026.01.15.09.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 09:12:23 -0800 (PST) From: Pavel Begunkov To: netdev@vger.kernel.org Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Michael Chan , Pavan Chebbi , Andrew Lunn , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Joshua Washington , Harshitha Ramamurthy , Saeed Mahameed , Tariq Toukan , Mark Bloch , Leon Romanovsky , Alexander Duyck , Ilias Apalodimas , Shuah Khan , Willem de Bruijn , Ankit Garg , Tim Hostetler , Alok Tiwari , Ziwei Xiao , John Fraker , Praveen Kaligineedi , Mohsin Bashir , Joe Damato , Mina Almasry , Dimitri Daskalakis , Stanislav Fomichev , Kuniyuki Iwashima , Samiullah Khawaja , Alexander Lobakin , Pavel Begunkov , David Wei , Yue Haibing , Haiyue Wang , Jens Axboe , Simon Horman , Vishwanath Seshagiri , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, dtatulea@nvidia.com, kernel-team@meta.com, io-uring@vger.kernel.org Subject: [PATCH net-next v9 1/9] net: memzero mp params when closing a queue Date: Thu, 15 Jan 2026 17:11:54 +0000 Message-ID: <7073bb4b696f5593c1f2e0b9451f0120ca624182.1768493907.git.asml.silence@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Instead of resetting memory provider parameters one by one in __net_mp_{open,close}_rxq, memzero the entire structure. It'll be used to extend the structure. Signed-off-by: Pavel Begunkov --- net/core/netdev_rx_queue.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/core/netdev_rx_queue.c b/net/core/netdev_rx_queue.c index c7d9341b7630..a0083f176a9c 100644 --- a/net/core/netdev_rx_queue.c +++ b/net/core/netdev_rx_queue.c @@ -139,10 +139,9 @@ int __net_mp_open_rxq(struct net_device *dev, unsigned= int rxq_idx, =20 rxq->mp_params =3D *p; ret =3D netdev_rx_queue_restart(dev, rxq_idx); - if (ret) { - rxq->mp_params.mp_ops =3D NULL; - rxq->mp_params.mp_priv =3D NULL; - } + if (ret) + memset(&rxq->mp_params, 0, sizeof(rxq->mp_params)); + return ret; } =20 @@ -179,8 +178,7 @@ void __net_mp_close_rxq(struct net_device *dev, unsigne= d int ifq_idx, rxq->mp_params.mp_priv !=3D old_p->mp_priv)) return; =20 - rxq->mp_params.mp_ops =3D NULL; - rxq->mp_params.mp_priv =3D NULL; + memset(&rxq->mp_params, 0, sizeof(rxq->mp_params)); err =3D netdev_rx_queue_restart(dev, ifq_idx); WARN_ON(err && err !=3D -ENETDOWN); } --=20 2.52.0