From patchwork Fri Jun 7 07:18:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13689406 X-Patchwork-Delegate: kuba@kernel.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 9262715666D; Fri, 7 Jun 2024 07:18:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717744741; cv=none; b=YbREABuSb/XA17rW6q4bWTT3B406Vrt7LWtmpDm8o8ktAXt3iQvo7vy0uqCN34lZcx6lBIyw4IqcyjmdIgmEmNq6mkdjxdiFwsEbSsIsU2ugHGb21j0jHuH61Kjp1RhenWO7YewEdk0DitnXaBPkfU4GrhJrNIgJDwI6u4CM3Qg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717744741; c=relaxed/simple; bh=MOSUved5dJTjsW/e08011rYRD+JJTkhOLjH/Asc2Jlo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DWvQSu7q5yyLfSAJW67b2u657fINGd5bWkqygnrDhsuXpLAJLJvoehFzkWD3lk/QlMSzlJomVQr6uJ+udq1/3N/jGOrIfi2r5Nf5WhFj7tqjDKMdWewApLx3C6H4H3/6AZ/fEh4i872UIf2Yl/KkV7L3iYalI2QZ6WaKwqnAYPM= 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=hA9NiMuh; arc=none smtp.client-ip=217.70.183.201 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="hA9NiMuh" Received: by mail.gandi.net (Postfix) with ESMTPSA id 9CF471BF205; Fri, 7 Jun 2024 07:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1717744738; 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: in-reply-to:in-reply-to:references:references; bh=a+K5HZ0TX/4jhgoWeL41AioHWepkacjBGpBgmMLrFUY=; b=hA9NiMuhcZAGeT191n6FAKDclIk9g24zQsgb//pKp9SU/byztbfBEdKeCUihA4NKBVtiDH 17bAW7njDVLORK86EDDMa0XZhcCsBH6bebqPWuk4wIaeqtdeBpnonwx5YVctslwTAIx1Lm iEQpSnpHeDbopZQEFDMwnmmgqNaHR9Zjs3Fy9cAoX95ajAixrr5ateCX3wT4bMOx0QTUdv 8+BudUNUEFKPVJCzpfDJu/lYYDyAY4rD95tdNFPTiPE7ZXi3+3MicvCnZX4WosZrgZ/RgP M4OfdiBke27R/Px/Tw9f+3i8ZnCG9G7vTs6XqDCChZAdVEK/2U7op68OvcQMkg== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?utf-8?q?K=C3=B6ry_Maincent?= , Jesse Brandeburg , =?utf-8?q?Marek_Beh=C3=BAn?= , Piergiorgio Beruto , Oleksij Rempel , =?utf-8?q?Nicol=C3=B2_Veronese?= , Simon Horman , mwojtas@chromium.org, Nathan Chancellor , Antoine Tenart Subject: [PATCH net-next v13 08/13] netlink: specs: add ethnl PHY_GET command set Date: Fri, 7 Jun 2024 09:18:21 +0200 Message-ID: <20240607071836.911403-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240607071836.911403-1-maxime.chevallier@bootlin.com> References: <20240607071836.911403-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-Patchwork-Delegate: kuba@kernel.org The PHY_GET command, supporting both DUMP and GET operations, is used to retrieve the list of PHYs connected to a netdevice, and get topology information to know where exactly it sits on the physical link. Add the netlink specs corresponding to that command. Signed-off-by: Maxime Chevallier --- Documentation/netlink/specs/ethtool.yaml | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index 38c2ed0da739..92a89a70ed9e 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -20,6 +20,11 @@ definitions: name: header-flags type: flags entries: [ compact-bitsets, omit-reply, stats ] + - + name: phy-upstream-type + enum-name: + type: enum + entries: [ mac, phy ] attribute-sets: - @@ -978,6 +983,38 @@ attribute-sets: - name: burst-tmr type: u32 + - + name: phy + attributes: + - + name: header + type: nest + nested-attributes: header + - + name: index + type: u32 + - + name: drvname + type: string + - + name: name + type: string + - + name: upstream-type + type: u32 + enum: phy-upstream-type + - + name: upstream-index + type: u32 + - + name: upstream-sfp-name + type: string + - + name: downstream-sfp-name + type: string + - + name: id + type: u32 operations: enum-model: directional @@ -1733,3 +1770,25 @@ operations: name: mm-ntf doc: Notification for change in MAC Merge configuration. notify: mm-get + - + name: phy-get + doc: Get PHY devices attached to an interface + + attribute-set: phy + + do: &phy-get-op + request: + attributes: + - header + reply: + attributes: + - header + - index + - drvname + - name + - upstream-type + - upstream-index + - upstream-sfp-name + - downstream-sfp-name + - id + dump: *phy-get-op