Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 Jun 2023 15:58:21 -0700 Justin Chen wrote:
> On 6/2/23 11:58 PM, Jakub Kicinski wrote:
> > On Thu,  1 Jun 2023 15:12:28 -0700 Justin Chen wrote:  
> >> +	/* general stats */
> >> +	STAT_NETDEV(rx_packets),
> >> +	STAT_NETDEV(tx_packets),
> >> +	STAT_NETDEV(rx_bytes),
> >> +	STAT_NETDEV(tx_bytes),
> >> +	STAT_NETDEV(rx_errors),
> >> +	STAT_NETDEV(tx_errors),
> >> +	STAT_NETDEV(rx_dropped),
> >> +	STAT_NETDEV(tx_dropped),
> >> +	STAT_NETDEV(multicast),  
> > 
> > please don't report standard interface stats in ethtool -S
> >   
> 
> These are not netdev statistics but MAC block counters. Guess it is not 
> clear with the naming here, will fix this. We have a use case where the 
> MAC traffic may be redirected from the associated net dev, so the 
> counters may not be the same.

You seem to be dumping straight from the stats member of struct
net_device:

+		if (s->type == BCMASP_STAT_NETDEV)
+			p = (char *)&dev->stats;

No?

Also - can you describe how you can have multiple netdevs for 
the same MAC?



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux