Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp515932lqb; Wed, 29 May 2024 02:42:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpSui4jgynCRcAix/w+9ii1k6KJlKruujoVPI9GyWH7h1/FF0M1SkHNGS7WU/NgYsbpmFzdSrn9hKg0j420iLuk78wkPMcag5Unp6lXA== X-Google-Smtp-Source: AGHT+IFnubnhvX7Gw9nACh+PIezsgjYBMZ92DnzdD0Apra6B7qwujdnhY3xn9vXipxsUtRiOhkme X-Received: by 2002:a17:906:6b1b:b0:a59:ee81:fd68 with SMTP id a640c23a62f3a-a626525cd08mr995864166b.71.1716975765781; Wed, 29 May 2024 02:42:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716975765; cv=pass; d=google.com; s=arc-20160816; b=THlWz0ajh1pX9blF0ct15EPH0mWdIBFgK5GfziPd7C2a5pWKsTY6ZCowmjQ1AF0oGf vxmqDZEEqs+v8ZjWcwvag80x7Cz+DXqV3RLeimzikUlEP1TaFd4F4ffdc1VuMG1v+Svq n5XNiJ8nH/4ELOHI4bgsHYMJH3yGwc4OC/eSW3YJVWwbLjM8qlcWULhHZS66F7DwJ/A3 v7I+X/RODf0qz3ng17+uNlEZPg77fWaa5zOrJFjpCIurJj3G9w/qS+2ox2EOmrjcbKtJ kRyEnr8ZF994xO1Hc23hAJoQegHkepNlE7z6hMlkx4M4FpcxzkJXRPSWhhENwshHbUBF 9jlA== 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=sxZnOBBfyANFislFCVDrdG2FPSJzX1eT/Js1VagpmHbOGzzWcGW/JxwdenW2n1Drdg x6lbwUjboaJjU3bb0aNT+LhRe3KvBTNAWw7SnKFO6BmmW3ZF2sA2u9jQXWYYhPXoJVyM AURp4RYojh40GQoq/1YJG4s7W54o9GfPTVq7R9eTFd4AqoSqNzTKNm3pBsr8Qe72WaG/ ARXu7qDKiFgd4wJDn/SHtCoD2Ujmx7UdrOl28C7FYbuaRqo8XMwFi2ARz0ioY/2/A2Fg CtbE/exFNW5h10H8jxYW2rpWTA/Jc34U6N9jAegjK9E4KDbVNtPGDDlYZRv/lKPk+6+R VZNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HRsEQO4v; 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-193863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c80104dsi620310666b.50.2024.05.29.02.42.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:42:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HRsEQO4v; 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-193863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193863-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 802B51F2603B for ; Wed, 29 May 2024 09:42:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5882171E4D; Wed, 29 May 2024 09:41:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="HRsEQO4v" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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 D3A3416A368; Wed, 29 May 2024 09:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716975707; cv=none; b=C9Ziq1+Gbf3TjGpN3c1ESJugcycQDpyBQu5BZgF8ApegB+nilzNU5kQOHV8/uRWTpZi+iGGAuDGUC0Vay/cbNPfQEE1GGsOVITfbGp+2X3Xl396ChhCQ8AhEPwU4adaYHpMBhEfIqGVRkW27xYz3cgiROEdANGIlLemF1oNEOtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716975707; c=relaxed/simple; bh=fAoFXYYkIkdenvWHNgGiSslpve99mgAMustoo4fOjKM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KKJk3EcZR5raopfUpFCZK7pLndo89Lbrkxv6twyPS4YIUe0OUdYGNG+Y7VjqX/z1wI22RL/sbb5+nQnk2aJP7VimRC3g79sLuUL4qdEr15LdqIb89njeYdTOFV9UhKT3RzrlOLW3ixzl7DFQ2LgzgE6gGlqvIUYd9CBjSASb2II= 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=HRsEQO4v; arc=none smtp.client-ip=217.70.183.195 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 64C656000A; Wed, 29 May 2024 09:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1716975697; 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=HRsEQO4vMsF2OnVj5wh3Kf9rYcsR09BdiByplDqZLRFR84nEMW0SE+7mf/bXCUr707XleL SAOZGMXBQJNgmocaygMlhRZR35pR0FVVx32iVynXX+PD0ALdMEroKKSoJk/jO60reZYn90 fOI1RKwkYhiVg7pBybpMuwhqeRJ0Gp2d/vfAlYWG2zeKmFMYGLeykcvf/o2ucom5C81Oq+ 1OwfUJbotBjn+483ugKuXmVV3wlWBhgaad/NT92EcqxHGtmqVL00XScmMFuhgGgpqO5ZKY OHNugsR/VzPUdB4fSoaHw51oae6nRyqzn8/50C2WTAKHMUEUQ36Yv8x4/Z9ldw== From: Kory Maincent Date: Wed, 29 May 2024 11:39:33 +0200 Subject: [PATCH net-next v13 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: <20240529-feature_ptp_netnext-v13-1-6eda4d40fa4f@bootlin.com> References: <20240529-feature_ptp_netnext-v13-0-6eda4d40fa4f@bootlin.com> In-Reply-To: <20240529-feature_ptp_netnext-v13-0-6eda4d40fa4f@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