Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2130088lqa; Tue, 30 Apr 2024 08:52:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUF4qkmxUkOBdVjV12KkVF//R/mO2QaTq3FaIWqBoC/sBxvrmsmAcIqunzP+UH8Bb0QCGH1kXKn9tGcf9EiKh8ZjhwX6Qo7PQmSmwJKmQ== X-Google-Smtp-Source: AGHT+IHCRxTGOsAzlqSwOoffrG+cxT7XZGt7PtOs52cP+m16HUlsQrbF1AhpXvizVoVmmMAptV1o X-Received: by 2002:a05:6a00:10d0:b0:6f0:b53c:dfb4 with SMTP id d16-20020a056a0010d000b006f0b53cdfb4mr41090pfu.22.1714492373525; Tue, 30 Apr 2024 08:52:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714492373; cv=pass; d=google.com; s=arc-20160816; b=vUlnhfS/1DN5BkcI3yKBSRHAz/uR6DfgulmbkqVkCzh35wz9ULUNScmaT0rLbQF4Ck n1XJKfgPyvJYJFYWZsRFzU7hAc9qDcX06FWPtpvXZuoweLF6huTSxaIuRgTIpan1L+ol qLShZVHNfpTgYe9fPlOYFrTlO7MSlEbSmYJvKe475+hjez1/L1vddfQUMvRuPcbZUxpI VoCOD8iid81D+QhekM0g7LPDW0j+SbS98IZVG+QiGwYBueZugCIlJXWVesiTcruG01au m+tLdjj+t75ERGfakqGnkbFoqzglihJtJ5BE/eZdvtVGpOi713h6rEgE1HNXEa+ndORR nWpw== 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=T3m6SWzBowqYgW3F20Hv8H6d2y+dBqna4SX7JBymPShiSABuhQdL1LTaLkUXiJWj8R c4AZ/HrM+kyOX6zp3wWkbJbXPXslV2ytiJJxBI5TGBtmhaYmMQhmEKe0Mj372tknkKsj PHWlUYlXLsVagblWm6WzEEroGOKJ+VxCmXl3LGxIOhXylAg5AdzndkfA9MqPG6lqEZsa BnW6odPzINzSQxnJMzFIGB4Lr9Pbes4oxJS6DJzmHs9f766OrpM0/Cj9ZudEAojpTOdz YWHfdQ/WzG5kQW5si2Yv7C84O9gvOofxEoA9xK/yEwKVFeHyKYngEhLQIdFhjG+7FkvY cBWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="mkk/wbPn"; 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-164312-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164312-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x190-20020a6363c7000000b005e857e42aa7si12681368pgb.55.2024.04.30.08.52.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 08:52:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164312-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="mkk/wbPn"; 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-164312-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164312-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4E7F428512C for ; Tue, 30 Apr 2024 15:52:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FEEB181302; Tue, 30 Apr 2024 15:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mkk/wbPn" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 ADE6C176FB2; Tue, 30 Apr 2024 15:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714492245; cv=none; b=jCRKy4ACXTs63gRhYb9lG040H6Jw/8IvFjw3YA38wV7jJmzexKo421CvKZ9Uv8B+927zOlRQhcF/LxwwKZdpWBMbIhlbYuzj6qYLju/lwZSjhOmANJ836BbSGQr3D1QVmUu/qswluZPINw6OFLdgxiZ52MFSiwHAthIMAm/a/lo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714492245; c=relaxed/simple; bh=fAoFXYYkIkdenvWHNgGiSslpve99mgAMustoo4fOjKM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HoqMpsBxZaNdFhu9n/4t6tbF727wunq2/1sDcrBEfqdxkK4WbQZ13DiKM4rmnCNRtrWxZuQdIlm6p6yLCDcXowfXSfX80k8MKMJUIU1PmeahmCaLWKmpZeBibbnnkiwHAjfPBBoWHqo6yUSao6TXPYgRU/lyDYXc7uuj4Qi/soY= 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=mkk/wbPn; arc=none smtp.client-ip=217.70.183.200 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 AFB9120005; Tue, 30 Apr 2024 15:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1714492226; 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=mkk/wbPnbXS+d1OeGcBbLV07AhUNugjgD24Fc63usL+pcQk0qKUZHIV84XD2p5xvlciOKn e6roHX+XxBT9RBzOOGWhxtH5IM/F2a7+wfJ1GY6kI9rcXbfX1qzX40zfcXlO/lssAiaqme tfK9n4UgCPInCjJIf0mkoFqqG/KaMZTjmo6vx6MgC+2Ju6fT3BhErLP27EI+AHmypwf/2w o2J+7s6348bxG0M2tEwaEAsTiOgYSV6sEHex97viQsZSgmQ//9ghD22Qv3g/A8Bm4BWQaZ Rbp0kHwSg9x3d33GHlhY7XvWICHiguqlUI1luMfRxgsvUQ9oWR2jRb6KHwqMUg== From: Kory Maincent Date: Tue, 30 Apr 2024 17:49:44 +0200 Subject: [PATCH net-next v12 01/13] 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: <20240430-feature_ptp_netnext-v12-1-2c5f24b6a914@bootlin.com> References: <20240430-feature_ptp_netnext-v12-0-2c5f24b6a914@bootlin.com> In-Reply-To: <20240430-feature_ptp_netnext-v12-0-2c5f24b6a914@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