Received: by 2002:a05:7208:2202:b0:86:316c:7444 with SMTP id s2csp2374386rbb; Tue, 4 Jun 2024 03:37:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU3SJmIuSf20d44STkjJK0yzGkxwLIA5wVHIcevtitsJljtNoP/FH2+BRflEjdy3o0BCW8xdPf5K1s/F8eRXqgYK4na91khbmQeDR7c1Q== X-Google-Smtp-Source: AGHT+IEbJR615fhK8ss2NZxCVxrszLaL/SOeFo0sUQMCUmW3PjaZr4TvKRFhhbVnxpX8HAD9/Pf8 X-Received: by 2002:a17:90a:e50a:b0:2bf:b499:2491 with SMTP id 98e67ed59e1d1-2c1dc5de144mr9717762a91.48.1717497476835; Tue, 04 Jun 2024 03:37:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717497476; cv=pass; d=google.com; s=arc-20160816; b=ohrWg6S/+8Ez9ATixbzDXC9SsX2LfwVe9uDoeoaoaW21cbGZZZz3FLPjKRIgmWa8VE LNEG4d0qwocvgnoj+iJl2H7WnFQInxvlUzZdjpyE/Q2vyUikW/2TP/74yBx/nLjyK98j kaCtyGnGTvTPJODzujPlMRI2fOaMPlludAGhGgyumzf7H3nvnTQW/eGpXh5gKuJhHbz8 6Q9anzMfqi/4+DgU/wrlBuVHCyJeBOgLD7Muk0W6RpmY5eIy1eDhotbQMNHaP2WZGhLj yMB4JodMS/vbtLL/1RgVDpaMFBgM/PHdYtj/UfzRcWc9wjWPd6C8mGWnfh35oep9tgb6 lR5g== 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=fA411foyqLMzZ1hKOUW4fEs/FNUN6uX3elekeFZ7ooQ=; fh=B/Vas2UyzAQlmG3a8HCI9IFncHXUfUPeSljtUrzFeCQ=; b=xtbY1rgwqKx4xrh3mZmjMKDnzrUFHTT8GYxl7zLfBck8UPqWvX10IPIwN9MzWmla9A zfZyv40rPnbt97yVsA4FvVNmVcbUEaDwZqFxsGDNPebdxdU2qxxSIpq2sktC/wAW3TC9 yVszjT5ww+vNZuxKU68DWPvxnzy9uzrX01Ey0TpnBkeJ5iXdP4zGyqwhZuoSllIM/P6B UQ9nlfjXtcoI3dmtQ9V/X+giXidT7Yrroo2ayGJAFyonBuLvKKCuPQwHK7ClHwdTZw1S 9HxV1rfGUpuEIjdZQCy39Q3bdc+Rn3zOm8T2sMNWsI1LeWrJouQ5xBroscTkJz9MifmJ xdiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=X7N4nvDB; 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-200428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1c2851dfesi1783265a91.178.2024.06.04.03.37.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 03:37:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=X7N4nvDB; 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-200428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200428-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B53BDB210B4 for ; Tue, 4 Jun 2024 10:36:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B942145335; Tue, 4 Jun 2024 10:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="X7N4nvDB" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 0898B1448C9; Tue, 4 Jun 2024 10:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717497376; cv=none; b=CCG9C6L2Afgg9xSSLooY0c/Jn0KtuKnv8WDVXQt8GsgVkOX4TkV5EENY89/iZTiNY7kaOOezs8SIZFw/ybSLzPVEwUpEid+xpr2g0ekxBm+MGCBsAnyC8riRLgg655VCgxfV/kSfkBGMzREMV/cAj8YzQPUspVAZnMPIYCiuz/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717497376; c=relaxed/simple; bh=fAoFXYYkIkdenvWHNgGiSslpve99mgAMustoo4fOjKM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E5Pr8FgAhVIoI6VJ4Gi9d+8nTCQenImx+ODAkzXHv8xJMEA44V+HBOIvtj3YlxXrr1eACSGeR8atPT5p2j/1OWNPY7i3mn3W+onAWP9B+NfQ/OAXN+yEP3X5J6kl8TEkjenDqFNwuFpwr6UtA4ryQ52TPPQEbOEPk3yBqW9Ny68= 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=X7N4nvDB; arc=none smtp.client-ip=217.70.183.196 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 C3CC0E0009; Tue, 4 Jun 2024 10:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1717497372; 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=fA411foyqLMzZ1hKOUW4fEs/FNUN6uX3elekeFZ7ooQ=; b=X7N4nvDBmnw4RYWneE5CtUu3qx19bfW2W4250fsTMXFe6jFiWec0T/VnjVewnrLKDLBrtR MjtespVLF57sWVij73AS/HAQxnI3Mf1SEF+c3giOqJ3uFrCz1wqEbbUx6L1OYk4jU3jtC6 vLD2Vdn4o4KNeFaRIlJX7RoQo3lvCYEz30GENbZWXAuQRnVKidqkCBJpz26wjnnojWNQFM Fkayj7j2VgbS48X54m27vCV5wqYBI19sIjasEkIqo6L6M2ONxLxQ0GPvUNkU2ETvpY3hvo yIgdsR5JAe/GYK8F1d6GIIGfa9+T650WqNcqiduSZVGFd0TLjijvbFNfAsDCpQ== From: Kory Maincent Date: Tue, 04 Jun 2024 12:36:01 +0200 Subject: [PATCH net-next v14 01/14] net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240604-feature_ptp_netnext-v14-1-bfb4632429db@bootlin.com> References: <20240604-feature_ptp_netnext-v14-0-bfb4632429db@bootlin.com> In-Reply-To: <20240604-feature_ptp_netnext-v14-0-bfb4632429db@bootlin.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Kory Maincent , Willem de Bruijn X-Mailer: b4 0.13.0 X-GND-Sasl: kory.maincent@bootlin.com Timestamping software or hardware flags are often used as a group, therefore adding these masks will ease future use. I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and not used at all. Reviewed-by: Willem de Bruijn Reviewed-by: Florian Fainelli Signed-off-by: Kory Maincent --- Changes in v7: - Move the masks out of uapi to include/linux/net_tstamp.h Changes in v9: - Fix commit message typos --- include/linux/net_tstamp.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 +#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, -- 2.34.1