From patchwork Tue Nov 14 11:28:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kory Maincent X-Patchwork-Id: 13455183 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 808B83E46A; Tue, 14 Nov 2023 11:29:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="kX5BXEua" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9CD6D6B; Tue, 14 Nov 2023 03:29:00 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E88FC60011; Tue, 14 Nov 2023 11:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1699961339; 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=10SiBN/4Fj+hMV2c6j8AN3pqV9PZiveL87TjssWFLBw=; b=kX5BXEuakP80zkXB1Wo+QuoL8r+kM1cW+aefIK98bBhvLJMSosQHavmDq3e09P4HllWxNb 4TRSSYMKpKf4FP5WEEtmSX9zfBFpijdKI8pTuVIkyaBThZEZ0FmU9h4j/ms6NhyiuKQJTc +nKVdDMD/G9P+W0XnNavlY5QLlaPiQxADQFaLIGHWUILied92JsK8LfUBs5tRsZRZgN4Pf 2hSuEo8QXL4CMCGX9mI+HDCjPDGQHeL8c1gb25TXFtnDdxWqjyXC4894MeHWxvEcTB4h1U liJ/1geR+j5bLD153qeiB73bJRKh6mX+6U80y8EymPrIrwFIvf19wboU5aPOvQ== From: Kory Maincent Date: Tue, 14 Nov 2023 12:28:35 +0100 Subject: [PATCH net-next v7 07/16] 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: <20231114-feature_ptp_netnext-v7-7-472e77951e40@bootlin.com> References: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> In-Reply-To: <20231114-feature_ptp_netnext-v7-0-472e77951e40@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 , Kory Maincent X-Mailer: b4 0.12.4 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 easier future use. I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and not use at all. Signed-off-by: Kory Maincent Reviewed-by: Willem de Bruijn --- include/uapi/linux/net_tstamp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h index a2c66b3d7f0f..df8091998c8d 100644 --- a/include/uapi/linux/net_tstamp.h +++ b/include/uapi/linux/net_tstamp.h @@ -48,6 +48,14 @@ enum { SOF_TIMESTAMPING_TX_SCHED | \ SOF_TIMESTAMPING_TX_ACK) +#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) + /** * struct so_timestamping - SO_TIMESTAMPING parameter *