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] [day] [month] [year] [list]
Message-ID: <CAKxU2N-AkTDOXt6mBS3Sk3jVFBY036P3+rPX7fM-mVstebYpXg@mail.gmail.com>
Date: Sun, 3 Nov 2024 16:08:53 -0800
From: Rosen Penev <rosenp@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Sudarsana Kalluru <skalluru@...vell.com>, 
	Manish Chopra <manishc@...vell.com>, Andrew Lunn <andrew+netdev@...n.ch>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Paolo Abeni <pabeni@...hat.com>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: bnx2x: use ethtool string helpers

On Sun, Nov 3, 2024 at 4:03 PM Rosen Penev <rosenp@...il.com> wrote:
>
> On Sun, Nov 3, 2024 at 2:00 PM Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > On Wed, 30 Oct 2024 13:51:47 -0700 Rosen Penev wrote:
> > > @@ -3220,13 +3212,13 @@ static void bnx2x_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
> > >                       start = 0;
> > >               else
> > >                       start = 4;
> > > -             memcpy(buf, bnx2x_tests_str_arr + start,
> > > -                    ETH_GSTRING_LEN * BNX2X_NUM_TESTS(bp));
> > > +             for (i = start; i < BNX2X_NUM_TESTS_SF; i++)
> > > +                     ethtool_puts(&buf, bnx2x_tests_str_arr[i]);
> >
> > There are three cases - MF, SF and VF.
> > You seem to have covered SF and MF, but not VF.
> #define BNX2X_NUM_TESTS_SF              7
> #define BNX2X_NUM_TESTS_MF              3
> #define BNX2X_NUM_TESTS(bp)             (IS_MF(bp) ? BNX2X_NUM_TESTS_MF : \
>                                              IS_VF(bp) ? 0 : BNX2X_NUM_TESTS_SF)
>
> VF is SF.
hrm so BNX2X_NUM_TESTS returns 0, 3, or 7. Makes sense to do an early exit.
> > --
> > pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ