From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD89928EA55; Tue, 22 Apr 2025 16:17:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745338643; cv=none; b=lbnyzWp2FCi5gWg9dfRW3wWJTY2OBwftGT9CvNtloGnnRYrexUfco8v2yRjiXWVV8SC8sL4DIx30Y90nHTZwLziIrp79kYdg0g1Zpi0IFi5yQ0scvWHdNkhR62BJi/Q/j28VbgDMfY7vIwvyXrxS5QjBP7Br9RJPMbS3P8bu30c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745338643; c=relaxed/simple; bh=qJiNOmQwooRML+BSkblDPU7S/goweeXQQD/ffBwLfvQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TS1+D/dBbhSjFe+rQDmi3nZXhhb5oJvaRQlfJPSYYi0LSUPF/7JlgA/V3rvJWCqWENP94zzcuimjoeiXviTAF1Redmm9e/yHN1xu8/fMHb/rz7xFnkaPr5v4P3dmlZ/QbldNX8Wxze6SFsCv0ZfROPsdMl7Eu89diLDrpWa+4ik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=JWq5ga6A; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="JWq5ga6A" Received: by mail.gandi.net (Postfix) with ESMTPSA id 74A5F1FCE9; Tue, 22 Apr 2025 16:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1745338639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=77TeXhBQpxJeDAesO4yr6iWR5ROTE8gul1nxKYyvCeM=; b=JWq5ga6AinY43OskxguYbX3wa15rNLKzPdstmmYlQW8tnf3L7PYK5wRkfrGLbss1a0+KG0 KnKZvbNai5LluhKeqc+m1ZUwNwndCLKPRHmfmtp6Qj1OJ3lDpkscEa79CzTGaoBRR46bHr A8+XPUQYs9Ed4tuV/Ga8RNUKFdAW2f4E0QNQRGU8SxaKeeZGSCbDyCLGDOI7JjMizwlPzV Q6jczEnUyA9cKsg9wW597KhhYqSaQAPaAM20LsSnPMVPzmZbQAgsEU7Nc5N+sz/tNe9vO/ uk1+UoSL73WqyvaV2x5M/zZI135KBFtrsAvvmK3YRV0DdEq+F8Odsqs+KMjYzg== From: Maxime Chevallier To: davem@davemloft.net, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Heiner Kallweit Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Russell King , Vladimir Oltean , =?UTF-8?q?K=C3=B6ry=20Maincent?= , Oleksij Rempel , Simon Horman , Romain Gantois , Piergiorgio Beruto Subject: [PATCH net-next v7 0/3] net: ethtool: Introduce ethnl dump helpers Date: Tue, 22 Apr 2025 18:17:13 +0200 Message-ID: <20250422161717.164440-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgeegudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhmvgcuvehhvghvrghllhhivghruceomhgrgihimhgvrdgthhgvvhgrlhhlihgvrhessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepjefhleeihefgffeiffdtffeivdehfeetheekudekgfetffetveffueeujeeitdevnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepvdgrtddumegtsgduleemkegugeehmeegledttdemieehieekmedvlegsudemlegvfhehmegvkegtjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudelmeekugegheemgeeltddtmeeiheeikeemvdelsgdumeelvghfheemvgektgejpdhhvghlohepfhgvughorhgrrdhhohhmvgdpmhgrihhlfhhrohhmpehmrgigihhmvgdrtghhvghvrghllhhivghrsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedvuddprhgtphhtthhopegurghvvghmsegurghvvghmlhhofhhtrdhnvghtpdhrtghpthhtoheprghnughrvgifsehluhhnnhdrtghhpdhrtghpthhtohepkhhusggrsehkvghrnhgvl hdrohhrghdprhgtphhtthhopegvughumhgriigvthesghhoohhglhgvrdgtohhmpdhrtghpthhtohepphgrsggvnhhisehrvgguhhgrthdrtghomhdprhgtphhtthhopehhkhgrlhhlfigvihhtudesghhmrghilhdrtghomhdprhgtphhtthhopehmrgigihhmvgdrtghhvghvrghllhhivghrsegsohhothhlihhnrdgtohhmpdhrtghpthhtohepnhgvthguvghvsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-GND-Sasl: maxime.chevallier@bootlin.com Hi everyone, This is V7 for per-phy DUMP helpers, improving support for ->dumpit() operations for PHY targetting commands. This V7 simply contains a conversion from dev_hold() to netdev_hold(), I also included a patch converting the original ->dumpit(). As this refcounting is still a bit obscure to me, let me know if I'm getting this wrong... Thanks, Maxime Changes in V7: - Move from dev_hold to netdev_hold() - Add an extra patch fr dev_hold() conversion. Changes in V6: - Squash pse and plca patches into the first one, to avoid unused functions (Jakub) Changes in V5: - Move to a less generic approach, focusing only on the PHY case. Changes in V4: - Don't grab rcu_read_lock when we already have a refcounter netdev on the filtered dump path (Paolo) - Move the dump_all stuff in a dedicated helper (Paolo) - Added patch 1 to set the dev in ctx->req_info Changes in V3: - Fixed some typos and xmas tree issues - Added a missing check for EOPNOTSUPP in patch 1 - Added missing kdoc - Added missing comments in phy_reply_size Changes in V2: - Rebased on the netdev_lock work by Stanislav and the fixes from Eric - Fixed a bissectability issue - Fixed kdoc for the new ethnl ops and fields V1: https://lore.kernel.org/netdev/20250305141938.319282-1-maxime.chevallier@bootlin.com/ V2: https://lore.kernel.org/netdev/20250308155440.267782-1-maxime.chevallier@bootlin.com/ V3: https://lore.kernel.org/netdev/20250313182647.250007-1-maxime.chevallier@bootlin.com/ V4: https://lore.kernel.org/netdev/20250324104012.367366-1-maxime.chevallier@bootlin.com/ V5: https://lore.kernel.org/netdev/20250410123350.174105-1-maxime.chevallier@bootlin.com/ V6: https://lore.kernel.org/netdev/20250415085155.132963-1-maxime.chevallier@bootlin.com/ Maxime Chevallier (3): net: ethtool: Introduce per-PHY DUMP operations net: ethtool: phy: Convert the PHY_GET command to generic phy dump net: ethtool: netlink: Use netdev_hold for dumpit() operations net/ethtool/netlink.c | 195 ++++++++++++++++++++++-- net/ethtool/netlink.h | 4 - net/ethtool/phy.c | 342 ++++++++++++------------------------------ 3 files changed, 276 insertions(+), 265 deletions(-) -- 2.49.0