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:   Fri, 2 Dec 2022 11:53:33 +0000
From:   <Rakesh.Sankaranarayanan@...rochip.com>
To:     <kuba@...nel.org>
CC:     <andrew@...n.ch>, <olteanv@...il.com>, <davem@...emloft.net>,
        <Woojung.Huh@...rochip.com>, <linux-kernel@...r.kernel.org>,
        <f.fainelli@...il.com>, <netdev@...r.kernel.org>,
        <UNGLinuxDriver@...rochip.com>, <edumazet@...gle.com>,
        <pabeni@...hat.com>
Subject: Re: [RFC Patch net-next 3/5] net: dsa: microchip: add eth mac
 grouping for ethtool statistics

Hi Jakub,

Thanks for the review comment.

On Thu, 2022-12-01 at 20:02 -0800, Jakub Kicinski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Wed, 30 Nov 2022 18:59:00 +0530 Rakesh Sankaranarayanan wrote:
> > +     mac_stats->FramesTransmittedOK = ctr[ksz9477_tx_mcast] +
> > +                                      ctr[ksz9477_tx_bcast] +
> > +                                      ctr[ksz9477_tx_ucast] +
> > +                                      ctr[ksz9477_tx_pause];
> 
> do control frames count towards FramesTransmittedOK?
> Please check the standard I don't recall.
> 
Yeah, I will check with the documentation.

> > +     mac_stats->SingleCollisionFrames =
> > ctr[ksz9477_tx_single_col];
> > +     mac_stats->MultipleCollisionFrames =
> > ctr[ksz9477_tx_mult_col];
> > +     mac_stats->FramesReceivedOK = ctr[ksz9477_rx_mcast] +
> > +                                   ctr[ksz9477_rx_bcast] +
> > +                                   ctr[ksz9477_rx_ucast] +
> > +                                   ctr[ksz9477_rx_pause];
> > +     mac_stats->FrameCheckSequenceErrors =
> > ctr[ksz9477_rx_crc_err];
> > +     mac_stats->AlignmentErrors = ctr[ksz9477_rx_align_err];
> > +     mac_stats->OctetsTransmittedOK = ctr[ksz9477_tx_total_col];
> 
> OctetsTransmittedOK = ksz9477_tx_total_col[lisons] ?
> 
Sorry about this. It should be ksz9477_tx_total. I will review all the
parameters again for avoiding such mistakes.

> > +     mac_stats->InRangeLengthErrors = ctr[ksz9477_rx_oversize];
> 
> You use the same counter for RMON oversize statistic, the two
> definitely have different semantics, please check the standard
> and the datasheet.
> 
> Remember that you don't have to fill in all the stats, if the HW does
> not maintain a matching statistic - leave the field be. Kernel will
> not report to user space unset fields.

Sure Jacub, I will review my code against documentation and submit the
updated revision.

Thanks,
Rakesh S

Powered by blists - more mailing lists