[net-next,v7,11/16] netlink: specs: Introduce new netlink command to list available time stamping layers
Message ID | 20231114-feature_ptp_netnext-v7-11-472e77951e40@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1794077vqg; Tue, 14 Nov 2023 03:31:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNFYnN6FqQKFVVpJyuoc6+ek0bvdIEBjl/GswlWBg+uSHnMD/tOaChgEv8iU+PYcpe5mab X-Received: by 2002:a05:6a20:8e08:b0:186:7509:7f2c with SMTP id y8-20020a056a208e0800b0018675097f2cmr8154704pzj.21.1699961508274; Tue, 14 Nov 2023 03:31:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699961508; cv=none; d=google.com; s=arc-20160816; b=VFbfs+UOiivhBMzM0Apovr/YwusNxaCdUhJVG/BNLsMN0tsOcTw7wRcKp3eWytg6Ok 6FE9VnWYoYVUGDyVdQIMhvb2I+OEhn5Stl2AjEgf7iSYrdoRm1SwPkg8kxVosDt7WIV1 +sY3WZPpHyYwJDs5GF5LUoxjKB9mCWafPTbL6VpGRsyHxLTXA4ys+E4x8jlKKKjTnMB1 qp4BU9xg9m65ZltEK0m7kS4AnBSgv1hX4pFLkI39eZ1cWFSZWXJKsvK6778jJ5hmnHt7 pAGTC64FcirsqDkyAn6FKkGYgC9+SPUfO2m8yqHP5/7/Wcj87Lno6Hyi4Sls28TCXKWy VMjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=l+SY8AKnRFrNOxgVIzZVyhyhuZrxEQtFskw3kq2cJaM=; fh=IL4Om7kRbYP5ILTMWk7kzVj5RVF0+t2ztL6E2Yzsl4U=; b=f4HdwruJTB9sO4dn85J3xUdo6v0fooN/dvxkhwP27NP10Wy0PIOn7GRAPxRaHdYL7N ro41XERqFUZ1gRvU8TaUeopYqi0ujz8Dgc34DGxa5MhFXy+aC4/VsPCkvtMo8S2/vQDC rH9kZRTRGahJuVvowD0qFUMndL1734OL/Y+/Aeb6tj+zTyTiwwdKVLeF+7feqAyY6GU7 j01fB0yCwIlooi2FUilZA2kPOH/9v/Hjv3i7DdVwh5kB1w4pju+b70DjpkS9zEkRlIik 99wEHI8Ed0uA/Dq8ALez6y4X/t8ObvBS8TtUIpjrzxHbNo5h01tGr3wsrA1zRBSA0dOf mIbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lWf88vpf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id cl22-20020a056a02099600b005b7d9aace9dsi8580001pgb.46.2023.11.14.03.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 03:31:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lWf88vpf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8752C8066651; Tue, 14 Nov 2023 03:30:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbjKNLab (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Tue, 14 Nov 2023 06:30:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232913AbjKNL3e (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 06:29:34 -0500 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD181171A; Tue, 14 Nov 2023 03:29:05 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 15F8C60006; Tue, 14 Nov 2023 11:29:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1699961344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l+SY8AKnRFrNOxgVIzZVyhyhuZrxEQtFskw3kq2cJaM=; b=lWf88vpftvGUGvU6lZvAPaIUeayDQzIwOFLsDEwKw4Mp/CSeCsLsO2NV45nZ7llBj1OXJp /EyclrBAdU8ojAOn8I3H/n06jIy0BNzx6+bGwuXmCxdSJCGF5gfx+rDc1sC1RwxCvgsw6a k8TrYnIgy7jZqBUNS3VkppBPFZBN5zv+MuxoIY+ztQM+F3AjPZ1CX1sXJCAIiIo4bfJ9m9 sTm5UwUGdowfanQBZkn9Sau3//uYJeXJtLKd1qCChR0IgK6YL98MOgOXzyccOsFEe5e0iQ wTxsrnEDkdfqyrdRRzDUkGuUAvEq6eOgrpCSZZCE5OebMlwSHIRgXqlx6mg63g== From: Kory Maincent <kory.maincent@bootlin.com> Date: Tue, 14 Nov 2023 12:28:39 +0100 Subject: [PATCH net-next v7 11/16] netlink: specs: Introduce new netlink command to list available time stamping layers MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231114-feature_ptp_netnext-v7-11-472e77951e40@bootlin.com> References: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> In-Reply-To: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> To: Florian Fainelli <florian.fainelli@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Richard Cochran <richardcochran@gmail.com>, Radu Pirea <radu-nicolae.pirea@oss.nxp.com>, Jay Vosburgh <j.vosburgh@gmail.com>, Andy Gospodarek <andy@greyhouse.net>, Nicolas Ferre <nicolas.ferre@microchip.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Willem de Bruijn <willemdebruijn.kernel@gmail.com>, Jonathan Corbet <corbet@lwn.net>, Horatiu Vultur <horatiu.vultur@microchip.com>, UNGLinuxDriver@microchip.com, Simon Horman <horms@kernel.org>, Vladimir Oltean <vladimir.oltean@nxp.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier <maxime.chevallier@bootlin.com>, Kory Maincent <kory.maincent@bootlin.com> X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 14 Nov 2023 03:30:50 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782538838381658167 X-GMAIL-MSGID: 1782538838381658167 |
Series |
net: Make timestamping selectable
|
|
Commit Message
Köry Maincent
Nov. 14, 2023, 11:28 a.m. UTC
Add a new commands allowing to list available time stamping layers on a
netdevice's link.
Example usage :
./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema \
--do ts-list-get \
--json '{"header":{"dev-name":"eth0"}}'
{'header': {'dev-index': 3, 'dev-name': 'eth0'},
'ts-list-layer': b'\x01\x00\x00\x00\x05\x00\x00\x00'}
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Documentation/netlink/specs/ethtool.yaml | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index 61b30701fdad..591425f7fa76 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -949,6 +949,16 @@ attribute-sets: - name: ts-layer type: u32 + - + name: ts-list + attributes: + - + name: header + type: nest + nested-attributes: header + - + name: ts-list-layer + type: binary operations: enum-model: directional @@ -1713,3 +1723,17 @@ operations: attributes: &ts - header - ts-layer + - + name: ts-list-get + doc: Get list of timestamp devices available on an interface + + attribute-set: ts-list + + do: + request: + attributes: + - header + reply: + attributes: + - header + - ts-list-layer