lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Jun 2023 18:35:51 -0700
From:   Justin Chen <justin.chen@...adcom.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        bcm-kernel-feedback-list@...adcom.com,
        florian.fainelli@...adcom.com, davem@...emloft.net,
        edumazet@...gle.com, pabeni@...hat.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        opendmb@...il.com, andrew@...n.ch, hkallweit1@...il.com,
        linux@...linux.org.uk, richardcochran@...il.com,
        sumit.semwal@...aro.org, christian.koenig@....com,
        simon.horman@...igine.com
Subject: Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0
 Ethernet controller



On 6/6/2023 5:16 PM, Jakub Kicinski wrote:
> 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?
> 

Woops I got it mixed up. Yes these stats are redundant. What I was 
describing is
+	STAT_BCMASP_MIB_RX("rx_pkts", mib.rx.pkt),
and equivalent.

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

Not netdevs per se, but packets can be redirected to an offload 
co-processor.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4206 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ