From patchwork Fri Feb 16 15:52:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kory Maincent X-Patchwork-Id: 13560254 X-Patchwork-Delegate: kuba@kernel.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 BD71112F5AE; Fri, 16 Feb 2024 15:53:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098788; cv=none; b=UVqWo4ikJwFwArGq9icAJ8JDXefMbPCZjZU7ki7LvWL+MBdjg5idhKD9mQNDtMfNR7O0SGhwTDDAmrx9iqfBKjL/I8bH8juQqRqcPseCrefLGYgGwAKkuYwKuOZc8kQJwctgyTKVvlw2LPrMdBoQ2fZqDMHSstdd74Po5Up0fxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098788; c=relaxed/simple; bh=Fbj/2gyrWNa39AIruWxAlw+xq5h9FHnRkUSzy2mwA8E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L/AeCO7G8cQ0mWY8LNyEX9cjc2lVJPbsXaWTt2urxEaR7H+F9IfyJ8fuho+BhHM3xvwCdnZGfjyqqrBacpdDhdh5XOjz27fNri1up/BDpBYMNfpsxPjc91uxz+JhWcocjfk19cxwlS78kAMU/prulJGYc7D0kIhOhApkEL3/dDA= 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=ZbSlHd+0; arc=none smtp.client-ip=217.70.183.193 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="ZbSlHd+0" Received: by mail.gandi.net (Postfix) with ESMTPSA id 20AC3240005; Fri, 16 Feb 2024 15:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708098777; 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=3UZnngXwdr0LC2jpI0/oTtXDE8jw/GJHgrZURo6q588=; b=ZbSlHd+0aB3h/GrrffTuYcFRaGxCn38xYLNSY/j/NYuJeOlPzViqvkWxzm79QjKHiXk2or T17wMlrrgkctata2xwS582yJfd4svlhL1thE44yEfA3za6Y8KpJHeYneILVQI7hMSGs2EZ EDoy1UUl+qymthuAoag4LFRHuDvvOoQbMlPZzN7rOtj2dENYLppVraXvTJ8dmdIkNAzwBs wJkCuTW52WFBkFsZwpEdqV62QXISuQZNp+ipEQtTkRxevmIDkS9d8/CIHHJEe1dkNw1h9J 5Y2hnnKGb9XN3Wk3nQM8DWxkGh1VVETL1iwYNHAiQ8bebxRt6uk8a9PrVnXFzQ== From: Kory Maincent Date: Fri, 16 Feb 2024 16:52:19 +0100 Subject: [PATCH RFC net-next v8 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: <20240216-feature_ptp_netnext-v8-1-510f42f444fb@bootlin.com> References: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> In-Reply-To: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@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.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC 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. Reviewed-by: Willem de Bruijn Signed-off-by: Kory Maincent Reviewed-by: Florian Fainelli --- Changes in v7: - Move the masks out of uapi to include/linux/net_tstamp.h --- 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,