Message ID | 20240216-feature_ptp_netnext-v8-1-510f42f444fb@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-68912-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp606008dyb; Fri, 16 Feb 2024 07:55:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUm4/Q6/D7YUTDIpVnpxuzMzPt6VgWfVjOSO4XSw6CedCcLZET0AtViuJiZrIqyI7jrGwjUpwz1Pk3gs59Audz2PgP+WQ== X-Google-Smtp-Source: AGHT+IGf+BGRvi3Z7Yg4z5il45fwaX2G2RwViN9W8+9pdxI8wjyMb3KWr80VpFgf55EoEy6+XD/1 X-Received: by 2002:ad4:4ea4:0:b0:68c:777e:f1a1 with SMTP id ed4-20020ad44ea4000000b0068c777ef1a1mr6044662qvb.29.1708098904711; Fri, 16 Feb 2024 07:55:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708098904; cv=pass; d=google.com; s=arc-20160816; b=djcSXsUZwbWdq/UwW96Wx71Jr7/XfeDHZi3CGTL9Hn6qPzgzdB5YVKO5DF2Q/aCI6D lPDFzfCO3V1woPM4G+SQPU80369iM+04O2G24s0MBGYsb4r/YqIi0PEgqVm1rx3wA5B6 QyYOZy4qyB3bSVYYGvvKdpBllfFLYRSy6J8sZbsMtFbNGJTtR5m/MXF6HgkOtvxBqYW5 RbS7b7VdciFU+X2OBcb9AfGpdis6uNatGhsAtAzGpELUR/+HSZ+6MTNF5tGnuvy4XCPU Lb+28oWuiFV61QRtrB3yJmwjGMAQJZtQlfYIH4myPyz+98ZU5Bncuc1hYZz0r5WTg1kK ahKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=3UZnngXwdr0LC2jpI0/oTtXDE8jw/GJHgrZURo6q588=; fh=B/Vas2UyzAQlmG3a8HCI9IFncHXUfUPeSljtUrzFeCQ=; b=bA8ZN5Nz8bqP8sOKpi8BzmMfmy1F32VQ/A+BqgXp7WZmhtaIz+lWzJijzOyECHjhU/ /MPFJ2G/P6EzPnTwIn3euWFrOb3tujga4nOPjjUo58DRJ2zSvP5Wlb3Jy7cw5BLCc8WB ZaRGyQXrAMngzn8a1YUbdOIKm43nF8pqTK+0B//7Avo5EKqIFxKyIj5G9TCO0D1enM9Y iE3RxyRbDoRM7N4S0bZFpKPWGn6Qg05+lbpFFVIGkkQCzbhwxCtmkm+HV3ADuqxa4PhT avHegvROf/OWEyOqUjlCSkSDhqvLDeHVQ5y47w4vQrtg7urfp2HNegSwzs0joNqQqFtc O/Rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZbSlHd+0; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-68912-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68912-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jv15-20020a05621429ef00b0068d1475e73esi29194qvb.297.2024.02.16.07.55.04 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:55:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68912-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZbSlHd+0; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-68912-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68912-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8190D1C21A56 for <ouuuleilei@gmail.com>; Fri, 16 Feb 2024 15:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 626CA1332A7; Fri, 16 Feb 2024 15:53:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ZbSlHd+0" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 BD71112F5AE; Fri, 16 Feb 2024 15:53:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098788; cv=none; b=UVqWo4ikJwFwArGq9icAJ8JDXefMbPCZjZU7ki7LvWL+MBdjg5idhKD9mQNDtMfNR7O0SGhwTDDAmrx9iqfBKjL/I8bH8juQqRqcPseCrefLGYgGwAKkuYwKuOZc8kQJwctgyTKVvlw2LPrMdBoQ2fZqDMHSstdd74Po5Up0fxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098788; c=relaxed/simple; bh=Fbj/2gyrWNa39AIruWxAlw+xq5h9FHnRkUSzy2mwA8E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L/AeCO7G8cQ0mWY8LNyEX9cjc2lVJPbsXaWTt2urxEaR7H+F9IfyJ8fuho+BhHM3xvwCdnZGfjyqqrBacpdDhdh5XOjz27fNri1up/BDpBYMNfpsxPjc91uxz+JhWcocjfk19cxwlS78kAMU/prulJGYc7D0kIhOhApkEL3/dDA= 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=ZbSlHd+0; arc=none smtp.client-ip=217.70.183.193 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 Received: by mail.gandi.net (Postfix) with ESMTPSA id 20AC3240005; Fri, 16 Feb 2024 15:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708098777; 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=3UZnngXwdr0LC2jpI0/oTtXDE8jw/GJHgrZURo6q588=; b=ZbSlHd+0aB3h/GrrffTuYcFRaGxCn38xYLNSY/j/NYuJeOlPzViqvkWxzm79QjKHiXk2or T17wMlrrgkctata2xwS582yJfd4svlhL1thE44yEfA3za6Y8KpJHeYneILVQI7hMSGs2EZ EDoy1UUl+qymthuAoag4LFRHuDvvOoQbMlPZzN7rOtj2dENYLppVraXvTJ8dmdIkNAzwBs wJkCuTW52WFBkFsZwpEdqV62QXISuQZNp+ipEQtTkRxevmIDkS9d8/CIHHJEe1dkNw1h9J 5Y2hnnKGb9XN3Wk3nQM8DWxkGh1VVETL1iwYNHAiQ8bebxRt6uk8a9PrVnXFzQ== From: Kory Maincent <kory.maincent@bootlin.com> Date: Fri, 16 Feb 2024 16:52:19 +0100 Subject: [PATCH RFC net-next v8 01/13] net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240216-feature_ptp_netnext-v8-1-510f42f444fb@bootlin.com> References: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> In-Reply-To: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@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>, Rahul Rameshbabu <rrameshbabu@nvidia.com>, Kory Maincent <kory.maincent@bootlin.com>, Willem de Bruijn <willemb@google.com> X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791071517359556976 X-GMAIL-MSGID: 1791071517359556976 |
Series |
net: Make timestamping selectable
|
|
Commit Message
Köry Maincent
Feb. 16, 2024, 3:52 p.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. Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> --- Changes in v7: - Move the masks out of uapi to include/linux/net_tstamp.h --- include/linux/net_tstamp.h | 8 ++++++++ 1 file changed, 8 insertions(+)
Comments
On 2/16/24 07:52, Kory Maincent wrote: > Timestamping software or hardware flags are often used as a group, > therefore adding these masks will easier future use. s/easier/ease/ > > I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and > not use at all. s/use/used/ > > Reviewed-by: Willem de Bruijn <willemb@google.com> > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff --git a/include/linux/net_tstamp.h b/include/linux/net_tstamp.h index eb01c37e71e0..3799c79b6c83 100644 --- a/include/linux/net_tstamp.h +++ b/include/linux/net_tstamp.h @@ -5,6 +5,14 @@ #include <uapi/linux/net_tstamp.h> +#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) + enum hwtstamp_source { HWTSTAMP_SOURCE_NETDEV, HWTSTAMP_SOURCE_PHYLIB,