Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2100010rdb; Mon, 20 Nov 2023 01:45:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IGv27P2B2c0IuI3+QWlPwhtTGNJa0deIvOK/I+HDKl5Ai0KLaZ95josLvTBFo6uUwOS//IE X-Received: by 2002:a05:6808:189e:b0:3ad:fdfb:d384 with SMTP id bi30-20020a056808189e00b003adfdfbd384mr9341381oib.53.1700473499848; Mon, 20 Nov 2023 01:44:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700473499; cv=none; d=google.com; s=arc-20160816; b=GfLp72lbgXeCHMan5YwgJzyd952NuYk3CcJgXckDD0IwVQ49W5NWUZfEvZUGd2XYnx 3fzHDT62syOPiH205LCe8V/dUNNXG35kP7h5PTs0DOYbKI8IQK4l1A3MJ5bnX8vmahab kh/W54to9ww+BxyG2GQsgyVsgFV4DmuePHZgnA/KTNnbrtnApKxrdZo4BemaHKap8rwe Vj3ZVY9H/MX0BtV6vSFvLJ74Br7TSmOHDPomeZCjuq5rDS7JVZb3ngITjZBZ15DFAOtf vYwip2X5upWqQRQveoJSVahn51u5eqg1ulX8qnmsh7eEzvCkZsdaAaqqVIxNxb9z3ciz ueNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=KRwo00+jtt7LDV8N20Ju5aZbZkWbKyYh1LA49h3QOv0=; fh=3V4dYYsNT+1PCeNt5FoXe31DZT12ZCgQmUC/1eIyyho=; b=AchqVRuRRzSujZwox1BCj+DKgFXC8z3cAMNCtTEFJ0wbDRmabKJYwyUxnNPQUl4lIq E+pXeML+QMn7nEyTJDDxQSGze/JasDfOxP34nQxJk7YSZ2mxPB8FRerITM3lkkZZxJ4L V3wahW+fkLaJguqj07KCxtxG62GBQxmWw+Gicc91m62gvkkYF+GvCbJTLSeZGvyBNp7o 3ecOUU0vrdC+898yKIM/ZdEsjQzgsrxXUyjKBF9uFlFsY++uZFXDVw8vWs36U+2bsze9 mLr3r41isVZEJOwboKQIvRVOG0OYD/OcOz+X4q6rAA2JKB/w/4ML5qkm/aT9InUAAdmA FGSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=CgzvaRl9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id d3-20020a634f03000000b005b9a4673310si7805623pgb.326.2023.11.20.01.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 01:44:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=CgzvaRl9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2E52780A18C9; Mon, 20 Nov 2023 01:44:57 -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 S232370AbjKTJot (ORCPT + 99 others); Mon, 20 Nov 2023 04:44:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231997AbjKTJos (ORCPT ); Mon, 20 Nov 2023 04:44:48 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B800394; Mon, 20 Nov 2023 01:44:43 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5DD06C0007; Mon, 20 Nov 2023 09:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700473482; 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=KRwo00+jtt7LDV8N20Ju5aZbZkWbKyYh1LA49h3QOv0=; b=CgzvaRl9Tf8DVnPQ5vTuF4NUswYQSOr+/LRzIO4OVH9761SFi8DqK3q6umgXbPC7PvsrOf R6i9fUhyZkmwdJzMZj0vu95uyitf2mdnmE49UjpRV2O3zWvqfm7Q5nOriP61qTNWvnqnG6 95x9PRYTkhGS9t7PvN8ILkpSrmJARR0vHeGGjGI6VwF7kwzk38jmnDPceqdYMB0sQ2IAMj S5wpowHzmDyHW4SW8Dj1zIiBi2Ac9BVGBMX0sIgDqhcnaQbnIaYPzgwLZ5ctXZDS2x97nl fNNgtYVIj0+K4aQE5bTOxrELFrAr/yp9iES50Bl8CBh+nsH7F17rYwf0hgHnZQ== Date: Mon, 20 Nov 2023 10:44:39 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Jakub Kicinski Cc: 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 , Vladimir Oltean , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier Subject: Re: [PATCH net-next v7 15/16] net: ethtool: ts: Let the active time stamping layer be selectable Message-ID: <20231120104439.15bfdd09@kmaincent-XPS-13-7390> In-Reply-To: <20231118183433.30ca1d1a@kernel.org> References: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> <20231114-feature_ptp_netnext-v7-15-472e77951e40@bootlin.com> <20231118183433.30ca1d1a@kernel.org> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Mon, 20 Nov 2023 01:44:57 -0800 (PST) On Sat, 18 Nov 2023 18:34:33 -0800 Jakub Kicinski wrote: > On Tue, 14 Nov 2023 12:28:43 +0100 Kory Maincent wrote: > > + if (!tb[ETHTOOL_A_TS_LAYER]) > > + return 0; =20 >=20 > GENL_REQ_ATTR_CHECK(), not sure why anyone would issue this command > without any useful attr. >=20 > > + /* Disable time stamping in the current layer. */ > > + if (netif_device_present(dev) && > > + (dev->ts_layer =3D=3D PHY_TIMESTAMPING || > > + dev->ts_layer =3D=3D MAC_TIMESTAMPING)) { > > + ret =3D dev_set_hwtstamp_phylib(dev, &config, info->extack); > > + if (ret < 0) > > + return ret; =20 >=20 > So you only support PHYLIB? >=20 > The semantics need to be better documented :( Yes as we don't really know how each MAC deal with the timestamping before ndo_hwstamp_get/set. Using phylib only allows us to be sure these ND= O are implemented and the management of timestamping is coherent in the MAC. Also= It will push people to move on to these NDOs. Ok I will add documentation. --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com