netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Vadim Fedorenko <vadfed@meta.com>
Cc: Michael Chan <michael.chan@broadcom.com>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] bnxt_en: add timestamping statistics support
Date: Sat, 1 Jun 2024 17:04:10 +0100	[thread overview]
Message-ID: <20240601160410.GR491852@kernel.org> (raw)
In-Reply-To: <20240530204751.99636-1-vadfed@meta.com>

On Thu, May 30, 2024 at 01:47:51PM -0700, Vadim Fedorenko wrote:
> The ethtool_ts_stats structure was introduced earlier this year. Now
> it's time to support this group of counters in more drivers.
> This patch adds support to bnxt driver.
> 
> Signed-off-by: Vadim Fedorenko <vadfed@meta.com>

...

> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> index 8763f8a01457..bf157f6cc042 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> @@ -5233,6 +5233,19 @@ static void bnxt_get_rmon_stats(struct net_device *dev,
>  	*ranges = bnxt_rmon_ranges;
>  }
>  
> +static void bnxt_get_ptp_stats(struct net_device *dev,
> +			       struct ethtool_ts_stats *ts_stats)
> +{
> +	struct bnxt *bp = netdev_priv(dev);
> +	struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;

Hi Vadim,

If you need to update this patch for some other reason,
please consider arranging these local variables in
reverse xmas tree order - longest line to shortest.

In this case I think that would mean separating
the declaration and assignment of ptp, like this
(completely untested!):

	struct bnxt *bp = netdev_priv(dev);
	struct bnxt_ptp_cfg *ptp;

	ptp = bp->ptp_cfg;

Edward Cree's tool can be helpful here:
https://github.com/ecree-solarflare/xmastree

...

  parent reply	other threads:[~2024-06-01 16:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 20:47 [PATCH net-next v2] bnxt_en: add timestamping statistics support Vadim Fedorenko
2024-05-30 22:02 ` Michael Chan
2024-06-01 16:04 ` Simon Horman [this message]
2024-06-01 23:20 ` patchwork-bot+netdevbpf

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=20240601160410.GR491852@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=vadfed@meta.com \
    --cc=vadim.fedorenko@linux.dev \
    /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).