Message ID | 20231114-feature_ptp_netnext-v7-7-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 t9csp1793732vqg; Tue, 14 Nov 2023 03:31:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEbeH2SScGss86VGXesAoJ1m71d8gwM4ifrbgd6+vNFDtvSgENRPlz9N7YbOrXqlgdKZI2 X-Received: by 2002:a05:6e02:1749:b0:34f:c7f7:18b with SMTP id y9-20020a056e02174900b0034fc7f7018bmr15308614ill.2.1699961469318; Tue, 14 Nov 2023 03:31:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699961469; cv=none; d=google.com; s=arc-20160816; b=sfSlSPTha2RGiB8o9o1Rmn2ukMD3F/AqtXKc/cdb5fhYW/WlU2MreXHYUl9RcMfi7m DEdG5cxWbKwcI8FqVFTwpcr2yka5spc3wEPHkp4qR+OHedNRg3lm34MMZ5zjnzGifObh HBY349VfwR4XgQbHCZe5RSugZ3XMUMNfscxDyXdrOYmLTWAbyzESy64qfdLEwR2s6NWw Cqspp2gkSMSfQohNc4NkBnaBHWdy7TzXKFDC8arwCIkvJzSlHivA4x/jyZXdyEsQr/9i 5aQ8tpGzFS+WU0q/368dszPhq1/FfTczJCGRNV0qcj1dYzFnFVk67DZrdCLnIiSgnRXL g44A== 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=10SiBN/4Fj+hMV2c6j8AN3pqV9PZiveL87TjssWFLBw=; fh=IL4Om7kRbYP5ILTMWk7kzVj5RVF0+t2ztL6E2Yzsl4U=; b=OWKnuU3SEfseNuGMAICc8CRwTGpbkN8ERASEUkfAOVuuc2hRwtpWjLGIMcFQc33WRx 8lsQ72tuC7oKdy7az3uTQynRqnjyQ68CBmAJY9EdwE6npI7uzL2nrzRwEohCl/HI3Py8 fnokBICwoK1Nzp/xoqh6CsCaYu8Hjadg+4h9KmQjmI2auEsApzYtVvGO5RnjNEPT1QYY WYsSrpUKt19fXRIti31Ss5SzEQETitK7RsF/UP/7+dv6mfho2QfjfVDti5ACtziNX8TA +Y4vnIUDrv5blgQFFsESNYTZPMJfUrkCAg73gujS8oCzr40q+QhQ+ZKpVUXS76LJ4our dbgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kX5BXEua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id z22-20020a63c056000000b00563f72935e3si7827716pgi.608.2023.11.14.03.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 03:31:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kX5BXEua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 2DA9B80A90D1; Tue, 14 Nov 2023 03:30:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232883AbjKNLaJ (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Tue, 14 Nov 2023 06:30:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232993AbjKNL3V (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 06:29:21 -0500 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9CD6D6B; Tue, 14 Nov 2023 03:29:00 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E88FC60011; Tue, 14 Nov 2023 11:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1699961339; 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=10SiBN/4Fj+hMV2c6j8AN3pqV9PZiveL87TjssWFLBw=; b=kX5BXEuakP80zkXB1Wo+QuoL8r+kM1cW+aefIK98bBhvLJMSosQHavmDq3e09P4HllWxNb 4TRSSYMKpKf4FP5WEEtmSX9zfBFpijdKI8pTuVIkyaBThZEZ0FmU9h4j/ms6NhyiuKQJTc +nKVdDMD/G9P+W0XnNavlY5QLlaPiQxADQFaLIGHWUILied92JsK8LfUBs5tRsZRZgN4Pf 2hSuEo8QXL4CMCGX9mI+HDCjPDGQHeL8c1gb25TXFtnDdxWqjyXC4894MeHWxvEcTB4h1U liJ/1geR+j5bLD153qeiB73bJRKh6mX+6U80y8EymPrIrwFIvf19wboU5aPOvQ== From: Kory Maincent <kory.maincent@bootlin.com> Date: Tue, 14 Nov 2023 12:28:35 +0100 Subject: [PATCH net-next v7 07/16] net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231114-feature_ptp_netnext-v7-7-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=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 14 Nov 2023 03:30:57 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782538797682925701 X-GMAIL-MSGID: 1782538797682925701 |
Series |
net: Make timestamping selectable
|
|
Commit Message
Köry Maincent
Nov. 14, 2023, 11:28 a.m. UTC
Timestamping software or hardware flags are often used as a group,
therefore adding these masks will easier future use.
I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and
not use at all.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
include/uapi/linux/net_tstamp.h | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
Kory Maincent wrote: > Timestamping software or hardware flags are often used as a group, > therefore adding these masks will easier future use. > > I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and > not use at all. > > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Willem de Bruijn <willemb@google.com>
On Tue, 14 Nov 2023 12:28:35 +0100 Kory Maincent wrote: > Timestamping software or hardware flags are often used as a group, > therefore adding these masks will easier future use. > > I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and > not use at all. Does this really need to be in uAPI?
On Sat, 18 Nov 2023 18:22:47 -0800 Jakub Kicinski <kuba@kernel.org> wrote: > On Tue, 14 Nov 2023 12:28:35 +0100 Kory Maincent wrote: > > Timestamping software or hardware flags are often used as a group, > > therefore adding these masks will easier future use. > > > > I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and > > not use at all. > > Does this really need to be in uAPI? I have put it in the same place as SOF_TIMESTAMPING_* flags but indeed I am not sure ethtool would need it. I can move it to include/linux/net_tstamp.h and we will move back to uapi if we see that it is necessary. What do you think?
On Mon, 20 Nov 2023 10:05:49 +0100 Köry Maincent wrote: > > Does this really need to be in uAPI? > > I have put it in the same place as SOF_TIMESTAMPING_* flags but indeed I am not > sure ethtool would need it. > I can move it to include/linux/net_tstamp.h and we will move back to uapi if > we see that it is necessary. What do you think? include/linux/net_tstamp.h sounds better to me, Willem may disagree..
Jakub Kicinski wrote: > On Mon, 20 Nov 2023 10:05:49 +0100 Köry Maincent wrote: > > > Does this really need to be in uAPI? > > > > I have put it in the same place as SOF_TIMESTAMPING_* flags but indeed I am not > > sure ethtool would need it. > > I can move it to include/linux/net_tstamp.h and we will move back to uapi if > > we see that it is necessary. What do you think? > > include/linux/net_tstamp.h sounds better to me, Willem may disagree.. Sounds like the right home to me for non uapi timestamping, too.
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h index a2c66b3d7f0f..df8091998c8d 100644 --- a/include/uapi/linux/net_tstamp.h +++ b/include/uapi/linux/net_tstamp.h @@ -48,6 +48,14 @@ enum { SOF_TIMESTAMPING_TX_SCHED | \ SOF_TIMESTAMPING_TX_ACK) +#define SOF_TIMESTAMPING_SOFTWARE_MASK (SOF_TIMESTAMPING_RX_SOFTWARE | \ + SOF_TIMESTAMPING_TX_SOFTWARE | \ + SOF_TIMESTAMPING_SOFTWARE) + +#define SOF_TIMESTAMPING_HARDWARE_MASK (SOF_TIMESTAMPING_RX_HARDWARE | \ + SOF_TIMESTAMPING_TX_HARDWARE | \ + SOF_TIMESTAMPING_RAW_HARDWARE) + /** * struct so_timestamping - SO_TIMESTAMPING parameter *