[net-next,v6,09/16] netlink: specs: Introduce new netlink command to get current timestamp
Message ID | 20231019-feature_ptp_netnext-v6-9-71affc27b0e5@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp425122vqb; Thu, 19 Oct 2023 07:31:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8VxzZF9/0zYBY6LOcYC4SbBiXO8o+Rm6y06l6IjD1j9F7AmUNCFBAt0Snxlr3eFX9Qg3S X-Received: by 2002:a17:90a:cb98:b0:27d:2763:a13a with SMTP id a24-20020a17090acb9800b0027d2763a13amr2065006pju.48.1697725868520; Thu, 19 Oct 2023 07:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697725868; cv=none; d=google.com; s=arc-20160816; b=t4irkinkKh1DClXLgkszYrwohuaT+XgSH4pT9pEkMd4l/BaFz/fVx+0w5YmZ/SMYq8 XplEi1SFQucGkMaTRBKcmZF19z3yMymY5i9Hle1saQKvs7aaYAWywwX8jEeGNGx/sexK MfNSSiD0YW20ezstufLptbZRLmCF2+FEYHcFcQCjzlE6ZfRilbJJ3RqNOJdSE63vmwtf emBpRhp2HGthHIbhwjWeebilNOYlw0+eDxisDrRKaHOGOGVs7xpSlfzDjQKuZMmehUKx ehMi8h93mM+CQaVlYv0NOLiEf86o9isbQ1zyrxbZuVjOk1fBG3j7JjsD8fvy8L8I7Svh J7vg== 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=sa/BMAPjdibMp7a6uAHIuRY7wsT4sAFdEpwtOTUVtjo=; fh=IL4Om7kRbYP5ILTMWk7kzVj5RVF0+t2ztL6E2Yzsl4U=; b=vVJfae+zGL+i7RTsr3bnxZdMHRSTnP/JPaXinSecgJr8j8v8ILJn3rezaHWG3gAhba C+yWXyZziBGfyZ88AU0F5gVXKA2qjw/PVnff0OGGukYp7uLvzbQpheuv8c9jQkCA9pxr zdqUETKB3R6XiFJrC/6Gt7GBDBKK6MXZc/WzRWEE/FaHLxTbHxbg0XE2/eE+ZyS+J6wi OOfNbA+UcPm5ZYOjS70m25toS/bYiv2CqP0X2k79mLnta10rI4OdMmmRoU+PXNXfqsEb RUSn75y/T9mI625of9k/F6GYpboUL+gy4xT+dB9hqJOaOcFYZDFolw+YxFrsosOGkcWr NAGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=MrW0+v9R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bu23-20020a632957000000b005655e87c8aasi4476199pgb.192.2023.10.19.07.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 07:31:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=MrW0+v9R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 763768088A55; Thu, 19 Oct 2023 07:30:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346027AbjJSOaV (ORCPT <rfc822;lkml4gm@gmail.com> + 25 others); Thu, 19 Oct 2023 10:30:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346121AbjJSO34 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Oct 2023 10:29:56 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A3AD18B; Thu, 19 Oct 2023 07:29:53 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id F03E660004; Thu, 19 Oct 2023 14:29:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697725792; 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=sa/BMAPjdibMp7a6uAHIuRY7wsT4sAFdEpwtOTUVtjo=; b=MrW0+v9R9WtBjTYkzv16CJrNc9tDAoKkbOUU+KGqO8W+Yk4rna+ZJMqgMSNt1CYcnCdP8l /aGUjxP3dSpbjlaOLyRcbuaqY8YByCgC29BTV4firAUaCZFOyc98lTjJoKi3D1ijFFsRNr tkzuPWl97cO/SzYOUtraE72E2SSRHR258buBUC42zbPuOo8CQE3w6/FrgjfdyhmYQfNa22 RtbXlw25FRuhkVrQq9ynBDmiJzipq2X89YOOU3pvTcqIIBzNFjKhXIhDj7SuduOaj30MvJ ykPveZuiJjbZ5o+L5VcJuCAf1W6s73h80d9FiZNtD0xhYqxbUSzEm4QpOCi2wQ== From: Kory Maincent <kory.maincent@bootlin.com> Date: Thu, 19 Oct 2023 16:29:24 +0200 Subject: [PATCH net-next v6 09/16] netlink: specs: Introduce new netlink command to get current timestamp MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231019-feature_ptp_netnext-v6-9-71affc27b0e5@bootlin.com> References: <20231019-feature_ptp_netnext-v6-0-71affc27b0e5@bootlin.com> In-Reply-To: <20231019-feature_ptp_netnext-v6-0-71affc27b0e5@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.3 X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 19 Oct 2023 07:30:36 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780194600054713724 X-GMAIL-MSGID: 1780194600054713724 |
Series |
net: Make timestamping selectable
|
|
Commit Message
Köry Maincent
Oct. 19, 2023, 2:29 p.m. UTC
Add a new commands allowing to get the current time stamping on a
netdevice's link.
Example usage :
./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do ts-get \
--json '{"header":{"dev-name":"eth0"}}'
{'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'ts-layer': 1}
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 837b565577ca..49ee028e97ca 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -942,6 +942,16 @@ attribute-sets: - name: burst-tmr type: u32 + - + name: ts + attributes: + - + name: header + type: nest + nested-attributes: header + - + name: ts-layer + type: u32 operations: enum-model: directional @@ -1692,3 +1702,17 @@ operations: name: mm-ntf doc: Notification for change in MAC Merge configuration. notify: mm-get + - + name: ts-get + doc: Get current timestamp + + attribute-set: ts + + do: + request: + attributes: + - header + reply: + attributes: &ts + - header + - ts-layer