From: Simon Horman <horms@kernel.org>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Radu Pirea <radu-nicolae.pirea@oss.nxp.com>,
Jay Vosburgh <j.vosburgh@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
UNGLinuxDriver@microchip.com,
Vladimir Oltean <vladimir.oltean@nxp.com>,
donald.hunter@gmail.com, danieller@nvidia.com,
ecree.xilinx@gmail.com, Andrew Lunn <andrew+netdev@lunn.ch>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-doc@vger.kernel.org,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Willem de Bruijn <willemb@google.com>,
Shannon Nelson <shannon.nelson@amd.com>,
Alexandra Winter <wintera@linux.ibm.com>
Subject: Re: [PATCH net-next v20 4/6] net: ethtool: tsinfo: Enhance tsinfo to support several hwtstamp by net topology
Date: Fri, 6 Dec 2024 14:27:16 +0000 [thread overview]
Message-ID: <20241206142716.GT2581@kernel.org> (raw)
In-Reply-To: <20241204-feature_ptp_netnext-v20-4-9bd99dc8a867@bootlin.com>
On Wed, Dec 04, 2024 at 03:44:45PM +0100, Kory Maincent wrote:
> Either the MAC or the PHY can provide hwtstamp, so we should be able to
> read the tsinfo for any hwtstamp provider.
>
> Enhance 'get' command to retrieve tsinfo of hwtstamp providers within a
> network topology.
>
> Add support for a specific dump command to retrieve all hwtstamp
> providers within the network topology, with added functionality for
> filtered dump to target a single interface.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
...
> diff --git a/net/ethtool/ts.h b/net/ethtool/ts.h
> new file mode 100644
> index 000000000000..b7665dd4330d
> --- /dev/null
> +++ b/net/ethtool/ts.h
> @@ -0,0 +1,21 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +
> +#ifndef _NET_ETHTOOL_TS_H
> +#define _NET_ETHTOOL_TS_H
> +
> +#include "netlink.h"
> +
> +static const struct nla_policy
> +ethnl_ts_hwtst_prov_policy[ETHTOOL_A_TS_HWTSTAMP_PROVIDER_MAX + 1] = {
> + [ETHTOOL_A_TS_HWTSTAMP_PROVIDER_INDEX] =
> + NLA_POLICY_MIN(NLA_S32, 0),
> + [ETHTOOL_A_TS_HWTSTAMP_PROVIDER_QUALIFIER] =
> + NLA_POLICY_MAX(NLA_U32, HWTSTAMP_PROVIDER_QUALIFIER_CNT - 1)
> +};
Hi Kory,
It looks like ethnl_ts_hwtst_prov_policy is only used in tsinfo.c and could
be moved into that file. That would avoid a separate copy for each file
that includes ts.h and the following warning flagged by gcc-14 W=1 builds
with patch 5/6 applied.
CC net/ethtool/tsconfig.o
In file included from net/ethtool/tsconfig.c:10:
net/ethtool/ts.h:9:1: warning: 'ethnl_ts_hwtst_prov_policy' defined but not used [-Wunused-const-variable=]
9 | ethnl_ts_hwtst_prov_policy[ETHTOOL_A_TS_HWTSTAMP_PROVIDER_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +int ts_parse_hwtst_provider(const struct nlattr *nest,
> + struct hwtstamp_provider_desc *hwprov_desc,
> + struct netlink_ext_ack *extack,
> + bool *mod);
> +
> +#endif /* _NET_ETHTOOL_TS_H */
...
next prev parent reply other threads:[~2024-12-06 14:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 14:44 [PATCH net-next v20 0/6] net: Make timestamping selectable Kory Maincent
2024-12-04 14:44 ` [PATCH net-next v20 1/6] net: Make dev_get_hwtstamp_phylib accessible Kory Maincent
2024-12-04 14:44 ` [PATCH net-next v20 2/6] net: Make net_hwtstamp_validate accessible Kory Maincent
2024-12-04 14:44 ` [PATCH net-next v20 3/6] net: Add the possibility to support a selected hwtstamp in netdevice Kory Maincent
2024-12-04 14:44 ` [PATCH net-next v20 4/6] net: ethtool: tsinfo: Enhance tsinfo to support several hwtstamp by net topology Kory Maincent
2024-12-06 14:27 ` Simon Horman [this message]
2024-12-06 14:37 ` Kory Maincent
2024-12-04 14:44 ` [PATCH net-next v20 5/6] net: ethtool: Add support for tsconfig command to get/set hwtstamp config Kory Maincent
2024-12-04 14:44 ` [PATCH net-next v20 6/6] netlink: specs: Enhance tsinfo netlink attributes and add a tsconfig set command Kory Maincent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241206142716.GT2581@kernel.org \
--to=horms@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=andy@greyhouse.net \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=corbet@lwn.net \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=j.vosburgh@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=pabeni@redhat.com \
--cc=radu-nicolae.pirea@oss.nxp.com \
--cc=richardcochran@gmail.com \
--cc=rrameshbabu@nvidia.com \
--cc=shannon.nelson@amd.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=wintera@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).