lkml.org 
[lkml]   [2020]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight
On Mon, 14 Sep 2020 03:24:13 +0200 Andrew Lunn wrote:
> > +static void gaudi_nic_get_internal_stats(struct net_device *netdev, u64 *data)
> > +{
> > + struct gaudi_nic_device **ptr = netdev_priv(netdev);
> > + struct gaudi_nic_device *gaudi_nic = *ptr;
> > + struct hl_device *hdev = gaudi_nic->hdev;
> > + u32 port = gaudi_nic->port;
> > + u32 num_spmus;
> > + int i;
> > +
> > + num_spmus = (port & 1) ? NIC_SPMU1_STATS_LEN : NIC_SPMU0_STATS_LEN;
> > +
> > + gaudi_sample_spmu_nic(hdev, port, num_spmus, data);
> > + data += num_spmus;
> > +
> > + /* first entry is title */
> > + data[0] = 0;
>
> You have been looking at statistics names recently. What do you think
> of this data[0]?

Highly counter-productive, users will commonly grep for statistics.
Header which says "TX stats:" is a bad idea.

\
 
 \ /
  Last update: 2020-09-14 22:07    [W:0.091 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site