Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp93837rdd; Wed, 22 Nov 2023 10:11:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMFgYL8s44oFhGzDxKL36sALsPhuQAUMIP8KcODIsuhd5+icxltnAxCLpcAdUyJHiTPKPQ X-Received: by 2002:a17:902:d384:b0:1cc:4559:ea with SMTP id e4-20020a170902d38400b001cc455900eamr3060405pld.3.1700676716794; Wed, 22 Nov 2023 10:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700676716; cv=none; d=google.com; s=arc-20160816; b=YqPrlWGMkji9j78xDMLr7hw3XrD4pY0yHDMQbHkSPpANfs6GmGVdVlpYB5bwOxtXtr 1QNZ9dvej1uGldPG6Z7ouo+rwLWupOBGn22NkZ/14On/o4rOQRquTPbkqlwC7tAmU4qp bN2oVZsbH6dwhXFpCwu4M/EvHgUa+t4b+5u1h9o3kH4yV7A9GzJeW77MA6VA4GPs+lPx z+kSA9YJ6CCoGzQ1SXu6BTTBwdLAQYmnyktFCuKOSJN3m98JTdT88X1dqMnKxEseKvav RWpac3Syr+hPgjEZDRyLWE/1lxmNBfyJpwdSeN5NpP/34ws1qK8Xj4WQd2xssXpLQkg/ MtSQ== 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=RAQB8Hqqm5OvoGj9nVayTd/1ohNlYq2PenxVIqdoeMw=; fh=y+pTipdcR4orzk01VQ2huyzq3cwnYYml8V7yXk5LrMI=; b=UwYaknhrrozoppHXVUSe4CYcMyfDksCRf24gf4PkkIAGZUcnwMZulRVGx78WRcB9Uz ndyG9bkXfrYtWSX7EkqQmwjMdeWdXd2p3vDnKpQpvB3yK4dY+a7ZWrXpl+CYUUDRXvEr AFblhBsLo63blazlbFVYIkvtS/o30BphBjLNbEQ17WgbPge3F1j0FF0jQj/bkcpZ1A8s 6xW24sArUQqTOSzgjXsm25F8osFh1DIoo4V1u8YasFytU9KmPj7dTMEkDZjijnkWuu9f NCyVMeOnJZP1xVOHHjel/aep1x9RL/PPYuLZx85gkBLfVW+SbYpmJTQeaLE1kai1wPdC q/TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=fm2p2vQL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w22-20020a1709026f1600b001c3ea2bbebcsi12427673plk.322.2023.11.22.10.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:11:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=fm2p2vQL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 175FE8083DF5; Wed, 22 Nov 2023 10:11:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343840AbjKVSLr (ORCPT + 99 others); Wed, 22 Nov 2023 13:11:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbjKVSLp (ORCPT ); Wed, 22 Nov 2023 13:11:45 -0500 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF479F9 for ; Wed, 22 Nov 2023 10:11:41 -0800 (PST) Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-41ea9c5e83cso12591cf.0 for ; Wed, 22 Nov 2023 10:11:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700676701; x=1701281501; 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=RAQB8Hqqm5OvoGj9nVayTd/1ohNlYq2PenxVIqdoeMw=; b=fm2p2vQLatnCZwoh8euniQPcouWhq6w+hG12y3Zr5zi8FDkGjNbfmrCaRUHBgH6teP wFR+w1wM1oNoQL2q09ae+ckbFuL2L89lVWa9yB3yk2MLLd9czstvKxoXd9v9RPCk6UcV Oec+RLvRxtbETqebZPscvPP5++7vZGlJp6ny+SxqGLf3+vsW4hWoJr/K0k0C8AdMHP85 sZznmIqTOw7+MaT3Gw9Z39IIxlx8B8inISbxNaJzmXzdeZaqxBkP6W7GTHIqG8XavbYm 2MDDT4mAF+qxpfe/9XJI8+UIQnrmxNoYF+3P4QFBEgFaRzt3YHk/8garZlUKW0ff/vLz vKCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700676701; x=1701281501; 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=RAQB8Hqqm5OvoGj9nVayTd/1ohNlYq2PenxVIqdoeMw=; b=bAHTuxJCp42q1VmCfQAuONf5Sq9V8qOqbtebGTr38gyTscA+q0syNWPxLAtJW/EKoi fgtVOfP8SbU/7i2CHOAkcaysxFoX8m6YT1W/OXcuHnu0Zsfy7rf7KIrbO7WubulXdcMD Y7q6xZM+VMZU4+jZrbJ7nRPTEMVk81msjj6r+FV2ttILOnJQdXanCKJ494DKYrPFAoVG G7+BYlvSzhn8kUBJexGBsOWcfccStiMMM/e5cHY1fBgPjLr9XdVZyr6VRVmrrkf75Efo xyaE/gMUowXOoEiFxzTbfxxBvbGYOMd78acmGr3MIjk6fcWAiTLYgEcdOyy+uKlV3A/B CJug== X-Gm-Message-State: AOJu0Yy+me3nKaFftvXuKZhtLZPautgWqVRJ0Y+fqunpNDUUBfvSr1iK Cb0kbuaOOvtFJTR9Btw8Es/dgS3nLGkFBFJM5addJg== X-Received: by 2002:ac8:4e54:0:b0:420:d18c:ffd2 with SMTP id e20-20020ac84e54000000b00420d18cffd2mr306349qtw.24.1700676700854; Wed, 22 Nov 2023 10:11:40 -0800 (PST) MIME-Version: 1.0 References: <20231120115839.74ee5492@kernel.org> <20231120211759.j5uvijsrgt2jqtwx@skbuf> <20231120133737.70dde657@kernel.org> <20231120220549.cvsz2ni3wj7mcukh@skbuf> <20231121183114.727fb6d7@kmaincent-XPS-13-7390> <20231121094354.635ee8cd@kernel.org> <20231122144453.5eb0382f@kmaincent-XPS-13-7390> <20231122140850.li2mvf6tpo3f2fhh@skbuf> <20231122143618.cqyb45po7bon2xzg@skbuf> <20231122085459.1601141e@kernel.org> <20231122165955.tujcadked5bgqjet@skbuf> <20231122095525.1438eaa3@kernel.org> In-Reply-To: <20231122095525.1438eaa3@kernel.org> From: Willem de Bruijn Date: Wed, 22 Nov 2023 13:11:02 -0500 Message-ID: Subject: Re: [PATCH net-next v7 15/16] net: ethtool: ts: Let the active time stamping layer be selectable To: Jakub Kicinski Cc: Vladimir Oltean , =?UTF-8?Q?K=C3=B6ry_Maincent?= , Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , 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 , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Mahesh Bandewar Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 10:11:54 -0800 (PST) On Wed, Nov 22, 2023 at 12:55=E2=80=AFPM Jakub Kicinski w= rote: > > On Wed, 22 Nov 2023 18:59:55 +0200 Vladimir Oltean wrote: > > I wouldn't be so sure. The alternative interpretation "for PTP, give me > > timestamps from both sources" also sounds reasonable for the distant > > future where that will be possible (with proper cmsg identification). > > But I don't see how to distinguish the two - the filters, expressed in > > these terms, would be the same. > > We can add an attribute that explicitly says that the configuration > is only requesting one stamp. But feels like jumping the gun at this > stage, given we have no other option to express there. > > > So the ptp4l source code would have to be modified to still work with > > the same precision as before? I'm not seeing this through. > > We can do the opposite and add a socket flag which says "DMA is okay". There already is a disconnect between configuring hardware timestamp generation. Through the ioctl, which is a global admin-only interface. And requesting timestamps with SO_TIMESTAMPING. Today the user of ptp4l already has to know that the admin has configured the right RX and TX filters. That is no different if multiple filters can be installed? (PHY for PTP, DMA for everything else). If attribution becomes important, we could add another cmsg alongside the timestamp. On TX this already happens with IP_RECVERR/IPV6_RECVERR/PACKET_TX_TIMESTAMP. Maybe the sock_extended_err struct even still has a field that can be (ab)used for this purpose. Being able to pass multiple timestamps up to userspace eventually will be interesting. A large blocker is where to store these values in the sk_buff on the path between the driver and the socket (skb_ext?). At Google we already have this scenario, where the local TCP stack and userspace both want converted hardware timestamps -- but converted from raw to different timebases.