Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2089898rdb; Mon, 20 Nov 2023 01:20:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqO9CWVBace0Trx97bICAh4fnGdxLVVlwPVV8Ig1EdcmghbM+JmsYnm8C+6LCRWygO4Smy X-Received: by 2002:a9d:6e19:0:b0:6bf:1f5f:ed18 with SMTP id e25-20020a9d6e19000000b006bf1f5fed18mr7061315otr.1.1700472008443; Mon, 20 Nov 2023 01:20:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700472008; cv=none; d=google.com; s=arc-20160816; b=FKP9JqSWbiMBNitlBe3dq0oEiHxXyYK6EuiZNAONAG/9kb6mLGTIl0vOpidyLd+iqw HROgMcGofIZzl9BccrIgJaUW6SnRg5Bp+lGS1+HBtUvwPf1RwNH7wYU1R9mZZbTmkruY 2BQPMpBwm1GdtoYtrJXx7LHNKB5vAGStQt89bymmiQU500wKVz8oboZri6Y+3EwWmYCf evHvrZlKPltL4oFcKLJKH8ngIImmFsKaW2KRnSZ5vrQRfW6gAvu4zQLl/8Adk4SqgxXW SnR2ShKpvW63iPAr8gMNnQ0jyWnPWG7Nhj5M4Sg4q/yxXLbe/LUcGDZplMWa8KtQuZ8R 2KJA== 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=POKstibQf2T728kxGgPI1aeq/54Lhb4ulb9k4+ErqNA=; fh=3V4dYYsNT+1PCeNt5FoXe31DZT12ZCgQmUC/1eIyyho=; b=yRCWwCsXhnd8OsN5JeOE+hbTSk7THQCb0KKEkIo8WcAjmcHQH33aTo1JOFIaPh5BJP Rz51dJYOdQutlHDDgUaOOQa9/VWjhti3N7lzU1xmgKwT61vncva3VdNKOCA8gBRV4hKb VWuA4W+lU5iWMaLcHgIlscFAf59jPuxRucHwca/vNcq9VjWnNubgvTKlah4eC60NjvT9 sNkLKqhypG50D5zlR6wSTWnxGt3PesARHYsrilDf49Wdos/mHW7lD/DDL5bzRpy6i9pR XE5lcOAod0bdClNZJe46a5WARqr1+EcQWN7ItUiky1a2XLXpcWDlDLdBugDabPR4oe+e e8OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pIM4bFxw; 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=bootlin.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s133-20020a632c8b000000b005b8f19be073si8058376pgs.416.2023.11.20.01.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 01:20:08 -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=@bootlin.com header.s=gm1 header.b=pIM4bFxw; 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=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5DE6F80658C5; Mon, 20 Nov 2023 01:18:10 -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 S232426AbjKTJSK (ORCPT + 99 others); Mon, 20 Nov 2023 04:18:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232495AbjKTJSI (ORCPT ); Mon, 20 Nov 2023 04:18:08 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4525BA; Mon, 20 Nov 2023 01:18:03 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B089940004; Mon, 20 Nov 2023 09:17:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700471880; 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=POKstibQf2T728kxGgPI1aeq/54Lhb4ulb9k4+ErqNA=; b=pIM4bFxwpNEJG2Z1NyAfaEWkMcj10QWyDQyFJWzibWpR+EkemNzXD3Y1CpsK6z2dVe2HW/ yvyM3sjRsFfZp310uKs2XAMnxeHHhrnqDnI6YPqrXPflerIKL191CD2Oumb8R4VYrlCjxv dkQ3wNabpXlA73TWCqeZSmn4EAAg+M+WAdOjB0eRXMevilOuryM2jbFLsZ/fGqU2g9R4EP Iy0pbdjjSs9ISOd15nivSuCoIQqFKor7nse6M2ljzhM+a+6mNGytOEXQ81CAjq0igNWsOW VzWJDyHOzpvqHlvFn+fkQnI7shRKiNMIy5Jei0NLq9fUcPl/GaTE5P2aB5sRug== Date: Mon, 20 Nov 2023 10:17:57 +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: <20231120101757.7ecf40b2@kmaincent-XPS-13-7390> In-Reply-To: <20231118182424.2d569940@kernel.org> References: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> <20231114-feature_ptp_netnext-v7-8-472e77951e40@bootlin.com> <20231118182424.2d569940@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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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]); Mon, 20 Nov 2023 01:18:10 -0800 (PST) On Sat, 18 Nov 2023 18:24:24 -0800 Jakub Kicinski wrote: > On Tue, 14 Nov 2023 12:28:36 +0100 Kory Maincent wrote: > > + 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? 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, selecting = the MAC as timestamping seems not logical to use software timestamping. 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. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com