netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	Milena Olech <milena.olech@intel.com>,
	przemyslaw.kitszel@intel.com, karol.kolacinski@intel.com,
	richardcochran@gmail.com, Josh Hay <joshua.a.hay@intel.com>,
	Samuel Salin <Samuel.salin@intel.com>
Subject: Re: [PATCH net-next 08/10] idpf: add Tx timestamp flows
Date: Tue, 25 Mar 2025 06:00:30 -0700	[thread overview]
Message-ID: <20250325060030.279c99bf@kernel.org> (raw)
In-Reply-To: <20250318161327.2532891-9-anthony.l.nguyen@intel.com>

On Tue, 18 Mar 2025 09:13:23 -0700 Tony Nguyen wrote:
> +/**
> + * struct idpf_tx_tstamp_stats - Tx timestamp statistics
> + * @tx_hwtstamp_lock: Lock to protect Tx tstamp stats
> + * @tx_hwtstamp_discarded: Number of Tx skbs discarded due to cached PHC time
> + *			   being too old to correctly extend timestamp
> + * @tx_hwtstamp_flushed: Number of Tx skbs flushed due to interface closed
> + */
> +struct idpf_tx_tstamp_stats {
> +	struct mutex tx_hwtstamp_lock;
> +	u32 tx_hwtstamp_discarded;
> +	u32 tx_hwtstamp_flushed;
> +};

>   * idpf_get_rxnfc - command to get RX flow classification rules
> @@ -479,6 +480,9 @@ static const struct idpf_stats idpf_gstrings_port_stats[] = {
>  	IDPF_PORT_STAT("tx-unicast_pkts", port_stats.vport_stats.tx_unicast),
>  	IDPF_PORT_STAT("tx-multicast_pkts", port_stats.vport_stats.tx_multicast),
>  	IDPF_PORT_STAT("tx-broadcast_pkts", port_stats.vport_stats.tx_broadcast),
> +	IDPF_PORT_STAT("tx-hwtstamp_skipped", port_stats.tx_hwtstamp_skipped),
> +	IDPF_PORT_STAT("tx-hwtstamp_flushed", tstamp_stats.tx_hwtstamp_flushed),
> +	IDPF_PORT_STAT("tx-hwtstamp_discarded", tstamp_stats.tx_hwtstamp_discarded),

I don't see you implementing .get_ts_stats ? If there is a reason
please explain in the commit msg. We require that standard stats
are reported if you want to report custom, more granular ones.

> +static int idpf_get_ts_info(struct net_device *netdev,
> +			    struct kernel_ethtool_ts_info *info)
> +{
> +	struct idpf_netdev_priv *np = netdev_priv(netdev);
> +	struct idpf_vport *vport;
> +	int err = 0;
> +
> +	if (!mutex_trylock(&np->adapter->vport_ctrl_lock))

Why trylock? This also needs a solid and well documented justification
to pass.
-- 
pw-bot: cr

  reply	other threads:[~2025-03-25 13:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 16:13 [PATCH net-next 00/10][pull request] idpf: add initial PTP support Tony Nguyen
2025-03-18 16:13 ` [PATCH net-next 01/10] " Tony Nguyen
2025-03-25 12:44   ` Jakub Kicinski
2025-03-25 21:05     ` Jacob Keller
2025-04-02 13:16       ` Olech, Milena
2025-03-18 16:13 ` [PATCH net-next 02/10] virtchnl: add PTP virtchnl definitions Tony Nguyen
2025-03-18 16:13 ` [PATCH net-next 03/10] idpf: move virtchnl structures to the header file Tony Nguyen
2025-03-18 16:13 ` [PATCH net-next 04/10] idpf: negotiate PTP capabilities and get PTP clock Tony Nguyen
2025-03-25 12:49   ` Jakub Kicinski
2025-03-25 21:07     ` Jacob Keller
2025-03-26  8:24     ` Przemek Kitszel
2025-04-02 15:23     ` Olech, Milena
2025-04-02 16:37       ` Jakub Kicinski
2025-03-18 16:13 ` [PATCH net-next 05/10] idpf: add mailbox access to read PTP clock time Tony Nguyen
2025-03-18 16:13 ` [PATCH net-next 06/10] idpf: add PTP clock configuration Tony Nguyen
2025-03-18 16:13 ` [PATCH net-next 07/10] idpf: add Tx timestamp capabilities negotiation Tony Nguyen
2025-03-18 16:13 ` [PATCH net-next 08/10] idpf: add Tx timestamp flows Tony Nguyen
2025-03-25 13:00   ` Jakub Kicinski [this message]
2025-03-25 21:10     ` Jacob Keller
2025-04-02 14:57     ` Olech, Milena
2025-03-18 16:13 ` [PATCH net-next 09/10] idpf: add support for Rx timestamping Tony Nguyen
2025-03-18 16:13 ` [PATCH net-next 10/10] idpf: change the method for mailbox workqueue allocation Tony Nguyen
2025-03-25 21:08   ` Jacob Keller
2025-04-02 13:22     ` Olech, Milena

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=20250325060030.279c99bf@kernel.org \
    --to=kuba@kernel.org \
    --cc=Samuel.salin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joshua.a.hay@intel.com \
    --cc=karol.kolacinski@intel.com \
    --cc=milena.olech@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.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).