Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2124255rdb; Mon, 20 Nov 2023 02:41:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKo7niaCYa9GFJhDz8EioMPk+w5g83dByBTmBmRwRaJxuVdfywmWX/B1Be9vFGpT6WItiq X-Received: by 2002:a9d:68cd:0:b0:6b9:b1b0:fcd1 with SMTP id i13-20020a9d68cd000000b006b9b1b0fcd1mr7865366oto.31.1700476911301; Mon, 20 Nov 2023 02:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700476911; cv=none; d=google.com; s=arc-20160816; b=yVNn3eZ3kKCdYRl1KBjrTcHFFH6KZLf4S7nW1Lh0f/FzyW9t62Wn591+oFLrEviBrl G+zs82cEl9GDohtKeDiSBoLU9xcthQvgmQOn5rTCL6LVtYAwiVUteCeLBQ4r0uIlLs9C cIpztzv+4OL4I1S7TAKNBJAU6avtZcAkwFSak+35oMKodDvatrbElwDU2rgumUnll7dI 4lIRkS5TTuEC3GrptRXjK7WXf+8Zs+0Z4TkZemIqyofgwfgxUyRrFGjau7PNiKJ5vyzT wGFcs0IcQHJwYg31ggVg1O2Qrmhs3f0OPyd52OlhxbI4UKfeXh8nhZky7tf4OyCW45Jw 0HeQ== 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=aFDoD/sf7hb9m2oDJulcbKCtm+j0do0V7EoRgM61mz8=; fh=3V4dYYsNT+1PCeNt5FoXe31DZT12ZCgQmUC/1eIyyho=; b=RdSbpDz6OaeYTnMhM/PY90qDG921NgCy/YRqwx/GD9ijgQkAqzooryrwIdc8RZoES2 6lx1UYczgIykve4YdQq1ZxLYjJ++DrR4XmYr+jkT++IsKi7Mu2awrlRmmfLmgFf9yOP+ kI7ZVCs5Fyd2udhINDDRSFDhhFBI+/scBJgzJ310DHkB3OWZsSwGmb8eXI2NPxvbl/5H VwKT4koMB+NvOR0KirJY8NjNrT0vBTHrRVp26dUnIXuVqhl6NT5I1lNl/I0TKgSPyRJO iOVlUzQ/gvTg08C3dnE7gRNiT8fznBjkOXgI+ARbpjPVz3xjBhPzzOqAMgMD0Sq+/X1g 9aIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Z2ChnBnC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q2-20020a635c02000000b005b96e63bc5esi7995568pgb.631.2023.11.20.02.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:41:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Z2ChnBnC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id BBB338093C85; Mon, 20 Nov 2023 02:40:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232881AbjKTKki (ORCPT + 99 others); Mon, 20 Nov 2023 05:40:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232305AbjKTKkg (ORCPT ); Mon, 20 Nov 2023 05:40:36 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E123A0; Mon, 20 Nov 2023 02:40:32 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 077931C000C; Mon, 20 Nov 2023 10:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700476830; 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=aFDoD/sf7hb9m2oDJulcbKCtm+j0do0V7EoRgM61mz8=; b=Z2ChnBnCRgpveBlmH6q0kxQZj4TWlnHNku1bMn3gvXiRdAdr4nw9jUBm3X9v8h59YiwTlT 1cXbxA4t0+FroaiA4ZCIEujF7pBP4RKzkGNcyEp3jDDn5J8HMvidEAAlWfHUDXYFRHpay9 2O2lvIEL55KN9K+13Rvj78ScZDtjBoJgS8+zJ4hMr5/nVl6trktyU3AE3RqZOgG7JAPbwI n2Gywn0BA9BZrGU+36aU78oFEb7tdCem/62vikQM4NsXOvN+eG5m9l+WTb3qecNBQbksTC fL3kYMp8auXKtDvN55Joc5QA6L9NuKiQvkDrQYE/3TnPqsSpriD1pW92QFSaWg== Date: Mon, 20 Nov 2023 11:40:27 +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 08/16] net: ethtool: Add a command to expose current time stamping layer Message-ID: <20231120114027.225442b5@kmaincent-XPS-13-7390> In-Reply-To: <20231120101757.7ecf40b2@kmaincent-XPS-13-7390> References: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> <20231114-feature_ptp_netnext-v7-8-472e77951e40@bootlin.com> <20231118182424.2d569940@kernel.org> <20231120101757.7ecf40b2@kmaincent-XPS-13-7390> 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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:40:56 -0800 (PST) On Mon, 20 Nov 2023 10:17:57 +0100 K=C3=B6ry Maincent wrote: > On Sat, 18 Nov 2023 18:24:24 -0800 > Jakub Kicinski wrote: >=20 > > On Tue, 14 Nov 2023 12:28:36 +0100 Kory Maincent wrote: =20 > > > + ops->get_ts_info(dev, &ts_info); > > > + if (ts_info.so_timestamping & > > > + SOF_TIMESTAMPING_HARDWARE_MASK) > > > + data->ts_layer =3D MAC_TIMESTAMPING; > > > + > > > + if (ts_info.so_timestamping & > > > + SOF_TIMESTAMPING_SOFTWARE_MASK) > > > + data->ts_layer =3D SOFTWARE_TIMESTAMPING; =20 > >=20 > > How does this work? so_timestamping is capabilities, not what's > > enabled now. So if driver supports SW stamping we always return > > SOFTWARE? =20 >=20 > Yes, the software timestamping comes from the MAC capabilities. > I decided to separate software and MAC timestamping. If we select PHY > timestamping we can't use software timestamping and for an user, selectin= g the > MAC as timestamping seems not logical to use software timestamping. >=20 > Indeed there is a mistake here I should have used "else if" condition. > Mmh in fact, maybe not, because it would breaks the access to software > timestamping until patch 13. > I will remove the SOFTWARE/MAC timestamping distinction from this patch. After thinking again, the "else if" condition works and won't break anythin= g as we could still access software timestamping within the MAC_TIMESTAMPING lay= er. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com