From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="pIM4bFxw" 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) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com 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