Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1443314rdh; Fri, 24 Nov 2023 12:53:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyfSez+6KvOyXAf5bCOpYcFXMjdArM7beyZuTUD4t9MmjDyE12d5l8IU+p5zSw7ZVizvdl X-Received: by 2002:a17:90b:4a50:b0:285:940a:b9b1 with SMTP id lb16-20020a17090b4a5000b00285940ab9b1mr2916455pjb.26.1700859211372; Fri, 24 Nov 2023 12:53:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700859211; cv=none; d=google.com; s=arc-20160816; b=vjZeegURLj/AaqDGg03cyLqv7LJnptVyjt8zcVbHMHrxkgBXNrEbcjFGP6vMDgEhCu +HX/NNm/h2RAdK69Cn7SPFNT/xXEbR7U8NAxxxwicdzS8mmS5+3b5Cy7aclFQRQ/Culg g4VezgP92aEgXjPg9cWuURhI5B9lp7Da4WCbtgPStq1iOSlefJbT1XvA2ewyyD8RD1Vw AGgSP5enblCmSqYZ0bm50AbRYiO0K6BQ1RQnMzXvgIW8sJi7lmLX0f5nabMWTsznAcMw qxyWGTP4xX9vu55XT4u3GefuMxD7nYFGf2tivecFhXDasAGl78TC3lV8kk1HB1xG/Qb3 dIOQ== 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=tFQWMpDN2F24cc/J03f4NVx2U6EwlQXtQnJp1TM3/K8=; fh=9xI+Xmfi20USSYpa+XzFR4OjCe0ROPnJeLjg94fQhdo=; b=uZymGYaDeQjKy6Kr5OGuBW9ISCHhiyw1VwKNxstG8IO2tF1Y5UdPfhvPP0RhdEAN6a 5D1b/XNPN8JCkN/w7GehJ8gThxYmOM++odPW4T7bvIEDZqxYXiwhlRdMUZXCE+F4cXU3 EUK06WQw+GQyNOoNKs/DIb4cV79uDw/KnGLu13s8/khUm3orCCyQo+LNISGKPXwRn6gb XhU0ZSZRpcS55uF6lKQEO5BcwsiYoCYIyXUCo7u8fIiete+tREbZ0aVujVtvXe4R3YSV vl0kPN/n13MN1CGoHQHYR1vmxWHsEbLanC8m7Tjs8BYEaK9VmSdJHthP6Lp3atFaOL45 /Ngw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1LcHPJrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id hk8-20020a17090b224800b0027000086c93si4576245pjb.102.2023.11.24.12.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 12:53:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1LcHPJrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 7F0918069F04; Fri, 24 Nov 2023 12:52:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346041AbjKXUsS (ORCPT + 99 others); Fri, 24 Nov 2023 15:48:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjKXUsQ (ORCPT ); Fri, 24 Nov 2023 15:48:16 -0500 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F5F19A4 for ; Fri, 24 Nov 2023 12:48:22 -0800 (PST) Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-423a0a25222so102951cf.0 for ; Fri, 24 Nov 2023 12:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700858901; x=1701463701; 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=tFQWMpDN2F24cc/J03f4NVx2U6EwlQXtQnJp1TM3/K8=; b=1LcHPJrkSE6LmyHMrgDoIEpZNHn/ywCyZYHVujYiNCy8y8v5qEqT6rE/drq/47cIwa 4yfcCQKfCCfSy+UnOyeX3+nAPOvRqPInA7EJWxm6m1GpsIsdUo733GMKcvRBufgfZjDa Hyi6KwukEDyLeESd6CtwH8oGuWPzbUaN0jrkPf6UfaWubZpx4FX8kBmN7V/DRglmIwl0 NPcgFok1JYzrSMZp8Y5sVp4ms/ZycId2UIRAU1OJR5b8YPrarK1ipy/ATnbNqLvc57Mi HVCyuEohN3wMNlt6WJxkBQL9fUlQP85/c6ET6wYrQ2F/fPRcVMOzhQ3/+7fuUsrG992f vKxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700858901; x=1701463701; 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=tFQWMpDN2F24cc/J03f4NVx2U6EwlQXtQnJp1TM3/K8=; b=Mm/agt4l2Tm5LowflQIkRwUtEC9VGAuPNQCVevKDooTK+Ao/wh9KSy9LXpKa6qX354 u4vj54NUF7pj8meu3aDAQYeSSaLpFZL7jZQW9UVpWKM8YwAPrjz1uX9FCxLv5M2/jRMm wvXJXRIMdlWsicgPY8IGFR4TfDn7vSolziMD5cSctk7Yvjg33BgsCvTeSA5vQdxwDdCN PN/4ni1uhhj8DHRcL+p1jj/fHKvTEYXWMiCgKDwcrto/zQQInC+g0bAFA914Rm826Bht /sUw7R1RG7kAmpS8crIoQvuEwvKTxI4gAXAR09mHT3/GQKmXubawA4Id6J0V4Liqed5T EPgw== X-Gm-Message-State: AOJu0YzC64+2gKuBCKeR/Ol5vzNtxE48yMelNISs+auHslqE83uzOvTw fbdXa+TTxC+VElUYTswnAxqdZFGjsAElAbteFkyDHw== X-Received: by 2002:ac8:5885:0:b0:421:c8d7:58f1 with SMTP id t5-20020ac85885000000b00421c8d758f1mr705562qta.4.1700858900765; Fri, 24 Nov 2023 12:48:20 -0800 (PST) MIME-Version: 1.0 References: <20231120220549.cvsz2ni3wj7mcukh@skbuf> <20231121183114.727fb6d7@kmaincent-XPS-13-7390> <20231121094354.635ee8cd@kernel.org> <20231122144453.5eb0382f@kmaincent-XPS-13-7390> <20231122140850.li2mvf6tpo3f2fhh@skbuf> <20231122085000.79f2d14c@kernel.org> <20231122165517.5cqqfor3zjqgyoow@skbuf> <20231122100142.338a2092@kernel.org> <20231123160056.070f3311@kmaincent-XPS-13-7390> <20231123093205.484356fc@kernel.org> <20231124154343.sr3ajyueoshke6tn@skbuf> <20231124183431.5d4cc189@kmaincent-XPS-13-7390> In-Reply-To: <20231124183431.5d4cc189@kmaincent-XPS-13-7390> From: Willem de Bruijn Date: Fri, 24 Nov 2023 15:47:43 -0500 Message-ID: Subject: Re: [PATCH net-next v7 15/16] net: ethtool: ts: Let the active time stamping layer be selectable To: =?UTF-8?Q?K=C3=B6ry_Maincent?= Cc: Vladimir Oltean , Jakub Kicinski , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 24 Nov 2023 12:52:13 -0800 (PST) On Fri, Nov 24, 2023 at 12:34=E2=80=AFPM K=C3=B6ry Maincent wrote: > > On Fri, 24 Nov 2023 17:43:43 +0200 > Vladimir Oltean wrote: > > > On Thu, Nov 23, 2023 at 09:32:05AM -0800, Jakub Kicinski wrote: > > > On Thu, Nov 23, 2023 at 04:00:56PM +0100, K=C3=B6ry Maincent wrote: > > > > So, do we have a consensus? Vlad, do you agree on putting all under > > > > ethtool? > > > > > > > > ETHTOOL_GET_TS_INFO will be in charge of replacing the SIOCGHWSTAMP > > > > implementation. Need to add ETHTOOL_A_TSINFO_PHC_INDEX > > > > ETHTOOL_A_TSINFO_QUALIFIER to the request. > > > > > > > > ETHTOOL_GET_TS_INFO will list all the hwtstamp provider (aka "{phc_= index, > > > > qualifier}") through the dumpit callback. I will add a filter to be= able > > > > to list only the hwtstamp provider of one netdev. > > > > > > > > ETHTOOL_SET_TS_INFO will be in charge of replacing the SIOCSHWSTAMP > > > > implementation. > > > > > > If not we can do a vote/poll? Maybe others don't find the configurati= on > > > of timestamping as confusing as me. > > > > If you mean the ETHTOOL_MSG_TSINFO_GET netlink message (ETHTOOL_GET_TS_= INFO > > is an ioctl), you're saying that you want to move the entire contents o= f > > SIOCGHWSTAMP there, by making the kernel call ndo_hwtstamp_get() in > > addition to the existing __ethtool_get_ts_info()? > > Yes. > > > Yeah, I don't know, I don't have a real objection, I guess it's fine. > > > > What will be a bit of an "?!" moment for users is when ethtool gains > > support for the SIOCGHWSTAMP/SIOCSHWSTAMP netlink replacements, but not > > for the original ioctls. So hwstamp_ctl will be able to change timestam= ping > > configuration, but ethtool wouldn't - all on the same system. Unless > > ethtool gains an ioctl fallback for a ioctl that was never down its all= ey. > > Yes indeed. Would it break things if both ioctls and netlink can get and = set > the hwtstamps configuration? It is only configuration. Both happen under > rtnl_lock it should be alright. > > The question is which hwtstamp provider will the original ioctls be able = to > change? Maybe the default one (MAC with phy whitelist) and only this one. > > > But by all means, still hold a poll if you want to. I would vote for > > ethtool netlink, not because it's great, just because I don't have a > > better alternative to propose. > > If you agree on that choice, let's go. Jakub and your are the most proact= ive > reviewers in this patch series. Willem you are the timestamping maintaine= r do > you also agree on this? I don't have a strong opinion. Ethtool netlink SGTM. For new network configuration we are moving away from ioctl towards netlink in general. Ethtool itself made this move, where the old ioctl way of things continues to work, but will no longer be extended. Since one of the APIs we use already uses ethtool, converting the other two there makes sense to me. I'm not familiar enough with configuring CAN or wireless to know whether it would pose a problem for these mentioned cases. > If anyone have another proposition let them speak now, or forever remain > silent! ;)