Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp404196rdb; Thu, 19 Oct 2023 07:48:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGl11Nnxk5Fr6a/Ec7OdkDS4nLNw+0NWe416fVZVYqYpfEnEaXjX4YyQgdUsy0CDtFEOVqb X-Received: by 2002:a17:902:e494:b0:1c9:fa50:fb8e with SMTP id i20-20020a170902e49400b001c9fa50fb8emr1885372ple.3.1697726935625; Thu, 19 Oct 2023 07:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697726935; cv=none; d=google.com; s=arc-20160816; b=L9bNWvkH906GIOkksj3QbUE/kH656XSvhMVu+WZf054fRGX04BtAf5CljSB3NVHaen ounPckWIv0F4+u+kmi+6A0BbGaoqajdTn3h3R+RqrcUSt/u9pifwTsv+b4gP3t8ZNfmG WEmbF9tTi/GDT6aXwTNBu31psnLKJUk+qSnjP70SnJYWk8y1nrBko1XvjwZDpx/AHooD J75uKQmMxf540KZXFPHjAMQTHXN1Q1PJKOIonIv7HimlYosk/i6uodUxVxRpZXmtBbxN gAaJkn2ZLqdE4WWfgfGlHaOzxXRi5qtgd1BzSevA75IYLv7F8KaH7LsRPiHwyV7L8PYz 5ASw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=b30rUo9xIidkzyjBtbhasOWY/ZbF9XIuRRAYaEaFhXU=; fh=cKv/dTqfJdqGnS5oQeQkBHxtZmEVlw+LnRSU6JihAeY=; b=sAe4TOiVT9BMco8wstGUqkDX35r07VxJo9nb1zeHDtLcSMizuCkwkSLnTG9YBDDzYA zwNFdAd4euL85lXhACeQGTpqi2vV1Eoc0dEt0qHvXIZrpBLpk5KBkudcD8nLoqkEYtcL MPz5CUo3mAExUz9iXYtdzdXwaWFRNRCCzyVG2U2lQWw0Wn7M5S6bGVOV26cCbbabqHgT vOuSQ7DGn3W26CTYtbQK4Q89sAOMCiiWmfdcbSNrevrs3DzRdrvGEovx7YT+CdPWCKfT 3sOumGLadEHxvZ1bzeImNdlLlUU0HPX/AZMJEavK+N3YwD25XyL0rHbG4jvgdttxq47r XwLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CCFevrp3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id jo23-20020a170903055700b001b878f9e11csi2263387plb.54.2023.10.19.07.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 07:48:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CCFevrp3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1A41A822B2F4; Thu, 19 Oct 2023 07:48:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345698AbjJSOsr (ORCPT + 99 others); Thu, 19 Oct 2023 10:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233200AbjJSOsp (ORCPT ); Thu, 19 Oct 2023 10:48:45 -0400 Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D7D1130; Thu, 19 Oct 2023 07:48:42 -0700 (PDT) Received: by mail-vs1-xe2f.google.com with SMTP id ada2fe7eead31-4587f9051e3so596151137.0; Thu, 19 Oct 2023 07:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697726921; x=1698331721; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=b30rUo9xIidkzyjBtbhasOWY/ZbF9XIuRRAYaEaFhXU=; b=CCFevrp3P7+zJ4FHC9QfN+qXJiLe1qBRNDg8HVSZBpk6gggPWwoP5PzFsx2NRApNlB OJcQoKwMtHZZYDKCQis+FsXb3P0lnqwQ/QEHpi3dvDRLHg/besvVP45PwUroVhw52K5u QDXCIJd1lL/++Pj11CNu+NkBAwp8xDZRILgiDJgEm89LnhT4m08UwMJzBQXWtlQfLbvT ckKGQTYkzK2nFu7RNd7TG38quijkUBhosu5xOyyCL8Q5FtEPkZCjukIFnSQ5nhGlLmpm GwVRO4e3AMs0hO+bu3vyTavC7beosYXyd+E1iSvFLvyXLDP90XWH0EWzlu4WQym7BVfa wTvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697726921; x=1698331721; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b30rUo9xIidkzyjBtbhasOWY/ZbF9XIuRRAYaEaFhXU=; b=XMe7fxQ88jbxaAv/6aJJGwiD8/O2VJ2OU/VubpmoGnD9p1h6H6My3RX5k/Z+SzmLmo bdC/q8Bg30UxDGq8QwJuPcjP2xnm5Ob2zd5x1dvuwp9xFqZAPTgZPmydSTm5W0O+rks5 RX8Y+T+FjAzAnrXlPT7mroE9shXcU4m8gHUCg+ztDdZRgC2IhFzNVpbPL9XPyGaLqdxU GmA5cpz53vPOzAUVWhlbZme15EW7sc187hWKfG30NCfZ/LBqYsyk5PJCrGb6t1fu4oz7 9BqiE1yb2E5Ub83jYVwViZeAELWLMTqk24iQw7OZ6dqVIpJnsK7jqrlKUXiUxU7EhtDl HBHQ== X-Gm-Message-State: AOJu0Yz+TCr7b4kFTDjN9K5OLUUqZtHjGagNKnQLTXzHy10EieZirT3u zSeaS9M3+6YJCmzkhP7LMqCV1rasAELgHYevyBs= X-Received: by 2002:a05:6102:100a:b0:457:6999:968a with SMTP id q10-20020a056102100a00b004576999968amr2145047vsp.7.1697726921465; Thu, 19 Oct 2023 07:48:41 -0700 (PDT) MIME-Version: 1.0 References: <20231019-feature_ptp_netnext-v6-0-71affc27b0e5@bootlin.com> <20231019-feature_ptp_netnext-v6-7-71affc27b0e5@bootlin.com> In-Reply-To: <20231019-feature_ptp_netnext-v6-7-71affc27b0e5@bootlin.com> From: Willem de Bruijn Date: Thu, 19 Oct 2023 10:48:04 -0400 Message-ID: Subject: Re: [PATCH net-next v6 07/16] net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask To: Kory Maincent Cc: 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 , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 19 Oct 2023 07:48:53 -0700 (PDT) On Thu, Oct 19, 2023 at 10:29=E2=80=AFAM Kory Maincent wrote: > > Timestamping software or hardware flags are often used as a group, > therefore adding these masks will easier future use. This assumes that device support for timestamping is often symmetric: a device supports both rx and tx, or neither. All devices support software receive timestamping, as that timestamp is taken in the core network stack. But to support transmit timestamps drivers have to call sbk_tstamp_tx in their ndo_start_xmit. For hardware timestamping it may be more common to support both or neither, not sure. > I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and > not use at all. > > Signed-off-by: Kory Maincent > --- > 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_tst= amp.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 > * > > -- > 2.25.1 >