Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1189926rdb; Fri, 16 Feb 2024 07:54:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU8RkgqYLWD7T+jGvVTJ//+31nveIFY5JA3moifm3rkyi3lWOmCrj1FQNQXuMREV7h7UfnwxawqGo38fa01hJ9j8qHTT7ZZbsg+X4VAxg== X-Google-Smtp-Source: AGHT+IFprV5EouEBpE2GCtGG9zDc5r5CCCPC8djZK+ARG53nWjavUTjZRdKOR2oIGmxStaTaoE6X X-Received: by 2002:a17:902:7898:b0:1d9:3b98:2709 with SMTP id q24-20020a170902789800b001d93b982709mr3851613pll.5.1708098852244; Fri, 16 Feb 2024 07:54:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708098852; cv=pass; d=google.com; s=arc-20160816; b=Bjap7SqoKzhMur4He9vGC13iqLfY4kj8gNCxUlXB3TfrhQ6dwb3POsmk5YpvMpUI2R cb4Qi2qAfknrz4/c2n21oDJL2V4ma+vBCnFz/7X/ek/cKWygESnqoFFwi7XEwXg4+K57 WgXNkO1Rge8JdDd+iTJ+GXISSlJCAnVDGQylMat4ieezxpbVrs0SxFnQ9eYPwwU/7FOa A0QstzD0bAQtWMjLjHbNmupmrrjQs3Q7mbOIJFzWXU89eboJvxI90VDXGKWUyyefyB4P SzeVMcfBUw7QYGFolL7m+T2cyJg6fxTOJ/vDHQCcbbkzbzekTYFGqCkru1iOXLQuMH7L qM6w== 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=3UZnngXwdr0LC2jpI0/oTtXDE8jw/GJHgrZURo6q588=; fh=B/Vas2UyzAQlmG3a8HCI9IFncHXUfUPeSljtUrzFeCQ=; b=bA8ZN5Nz8bqP8sOKpi8BzmMfmy1F32VQ/A+BqgXp7WZmhtaIz+lWzJijzOyECHjhU/ /MPFJ2G/P6EzPnTwIn3euWFrOb3tujga4nOPjjUo58DRJ2zSvP5Wlb3Jy7cw5BLCc8WB ZaRGyQXrAMngzn8a1YUbdOIKm43nF8pqTK+0B//7Avo5EKqIFxKyIj5G9TCO0D1enM9Y iE3RxyRbDoRM7N4S0bZFpKPWGn6Qg05+lbpFFVIGkkQCzbhwxCtmkm+HV3ADuqxa4PhT avHegvROf/OWEyOqUjlCSkSDhqvLDeHVQ5y47w4vQrtg7urfp2HNegSwzs0joNqQqFtc O/Rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZbSlHd+0; 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-68912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68912-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z8-20020a170902ccc800b001db28c55f5fsi40236ple.407.2024.02.16.07.54.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:54:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZbSlHd+0; 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-68912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68912-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 9B1A228111A for ; Fri, 16 Feb 2024 15:54:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D09B130E54; Fri, 16 Feb 2024 15:53:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ZbSlHd+0" 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 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: 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: <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 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 --- 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, -- 2.25.1