From patchwork Tue Apr 30 15:49:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kory Maincent X-Patchwork-Id: 13649564 X-Patchwork-Delegate: kuba@kernel.org 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mkk/wbPn" 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 X-Patchwork-Delegate: kuba@kernel.org 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,