From patchwork Mon Feb 26 13:39:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?K=C3=B6ry_Maincent?= X-Patchwork-Id: 206625 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2081280dyb; Mon, 26 Feb 2024 05:40:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUneqwXhbiHN9+bHNeafhnMNL5wPvBCepjaf+hUrp1qt51S2UpeCLAJOqHbxMzgk9jl7kt30PGV15CwXX+00RAMLYlMGg== X-Google-Smtp-Source: AGHT+IGuYoY9ued94gTDDL0pyUKfOMJ1OJ9ec2baQfPaUgVHAxXueBnBLGUSqSwzsg+3RX5Mstsz X-Received: by 2002:a05:620a:4594:b0:787:86ab:1595 with SMTP id bp20-20020a05620a459400b0078786ab1595mr12964180qkb.31.1708954858330; Mon, 26 Feb 2024 05:40:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708954858; cv=pass; d=google.com; s=arc-20160816; b=QZZr+zym4sIfL76m2XOfDjGJvhZh4iX+Bwke/4O6jsE7TcV97w+qPU/+TOWPGdxt6h fgy/kW0/tVvdqyAop2vzGPEezrwlmqe5hdrdcHnrVrAjf6p2CUnIYuCzAdTrqzWMTBQp TAtapOurdrsLrxa+mWdJ9kauBj024pSOGV/j1gjYOHNMOWwFfmsVbYJbwgJME5SZDSuN TSt36FbM6JfIb164ONccGixkdyxCDeVWzkSOVydaETOsaEMrj/amaVnzHKyK8jkNXgRV 6KI9BaT5D0F8gQxsfHowJSjG2V3e9ZhN6MTvxZcGh5Ge8bTYS8aRMzYgL9xFgHebKbcv o/Cw== 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=zlphYMCGiuWzG6g1KZ1t25I7yaE6iY157kAjD3oGCXs=; fh=B/Vas2UyzAQlmG3a8HCI9IFncHXUfUPeSljtUrzFeCQ=; b=Cvq+U32M8+YrogWVHe8SsWCPMfezrBzAsRWa9POA5hkgPW/r1I/TMjWch1CVhDr/ke BiCeUWgLQvSWTEbV/GsZl8C1EDoZN+T4wlgfXPVMrOx2E7VLIs7KFy7Zz620K3ULqLue MLAb9P4PhoH4HlgK8X49ocF20I6kzx9Dg7ZcYcBqRw6USXmp4rhkta4LodImjPHyGjMq je7Sb02hjolaE66g4NJTbXrtYvN5PNEosexKfgN973OcQraCrtDtPmgGSrU88o0JZs/k ttwbx96bLtT6bFLIw3r0gaMcq+2sWCuz55JYHHwUa8PIDV94VkpIomO5SoG0r63sgUG9 VoRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jyWDgClZ; 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-81502-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81502-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u4-20020a05620a022400b007873af49bdcsi5021628qkm.427.2024.02.26.05.40.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 05:40:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81502-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jyWDgClZ; 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-81502-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81502-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 02DCE1C23461 for ; Mon, 26 Feb 2024 13:40:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 310D012A17C; Mon, 26 Feb 2024 13:40:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jyWDgClZ" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 316D47FBAA; Mon, 26 Feb 2024 13:40:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954816; cv=none; b=STo3lIML/daSBq3lmgvOrrp74cZYENig6qoNtytsBw/QkkKlf/IZ2A6jR1w/jJ2FmdRMfMjdmfvvdPFOw9BjWEr/BO0K5UgXJoe+EtVVjIlhQvZ4aqg6teTsQED4WyqMrSBvPIcIl8oPwlc6YICRn3qmTmI0STSzMPrnefBuXFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954816; c=relaxed/simple; bh=eb+a/Xv56Ez5octPTC/7XpVC8dSgZhMGBPcbfj0ToJk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=atdz5Ymw35Lblxcmy+mOUv0FweynT2chuHzOBDCnGNLJjvU1Ik0B2fo5f1ERyPPJx3B142N/A1YSPP1mX3My4xv8CHIbHsnfOCJjAQAafgoE8Rg3/KisnNXtBFVBCcpWSVYAn6nYg47cbb2a3q3zq+hwVpjvx5h8a3QdmePOKwQ= 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=jyWDgClZ; arc=none smtp.client-ip=217.70.183.194 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 406E64000E; Mon, 26 Feb 2024 13:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708954812; 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=zlphYMCGiuWzG6g1KZ1t25I7yaE6iY157kAjD3oGCXs=; b=jyWDgClZP97L8VV3isb8dRqNzyL64pE/CU3EgXwMCj3DMio8YdM7RIOtf1Tc+Mn9JvlyEO MNqRSYzmv3XQ5JbxVgZL2L9+UQ7zRLdTQkMWNhMyEqm1OkjxjJnoVTg2H5NP4qdvHElrvk qAv9BWn9qU/bB8JZrpcZvo/DAa5Ei6w355IRpwWk6ZKM0T53xaYnApe9M4CuhhaSKTZ4IB SEiPafQUi57iFYhSsiaNH2+qi/1v+itMECtdlnm04YRm4VoBLmoPzxtn6Cct587azi4SCp 03zgtbJ/u7IJnb5XGRG54XZKjkMBIildFeIVdpMT9oaR4p8PCpFxh+2RoxuwOg== From: Kory Maincent Date: Mon, 26 Feb 2024 14:39:52 +0100 Subject: [PATCH net-next v9 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 Message-Id: <20240226-feature_ptp_netnext-v9-1-455611549f21@bootlin.com> References: <20240226-feature_ptp_netnext-v9-0-455611549f21@bootlin.com> In-Reply-To: <20240226-feature_ptp_netnext-v9-0-455611549f21@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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791969049496164549 X-GMAIL-MSGID: 1791969049496164549 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,