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: <MN2PR18MB25280B027FBABA5838DD1978D3A50@MN2PR18MB2528.namprd18.prod.outlook.com>
Date:   Thu, 22 Aug 2019 09:16:53 +0000
From:   Sudarsana Reddy Kalluru <skalluru@...vell.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     Joseph Qi <joseph.qi@...ux.alibaba.com>,
        Mark Fasheh <mark@...heh.com>,
        Joel Becker <jlbec@...lplan.org>,
        "ocfs2-devel@....oracle.com" <ocfs2-devel@....oracle.com>,
        Ariel Elior <aelior@...vell.com>,
        GR-everest-linux-l2 <GR-everest-linux-l2@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Colin Ian King <colin.king@...onical.com>
Subject: RE: [PATCH v1] ocfs2/dlm: Move BITS_TO_BYTES() to bitops.h for wider
 use


> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Sent: Thursday, August 22, 2019 2:39 PM
> To: Sudarsana Reddy Kalluru <skalluru@...vell.com>
> Cc: Joseph Qi <joseph.qi@...ux.alibaba.com>; Mark Fasheh
> <mark@...heh.com>; Joel Becker <jlbec@...lplan.org>; ocfs2-
> devel@....oracle.com; Ariel Elior <aelior@...vell.com>; GR-everest-linux-l2
> <GR-everest-linux-l2@...vell.com>; David S. Miller
> <davem@...emloft.net>; netdev@...r.kernel.org; Colin Ian King
> <colin.king@...onical.com>
> Subject: Re: [PATCH v1] ocfs2/dlm: Move BITS_TO_BYTES() to bitops.h for
> wider use
> 
> On Thu, Aug 22, 2019 at 05:46:07AM +0000, Sudarsana Reddy Kalluru wrote:
> >
> > > -----Original Message-----
> > > From: netdev-owner@...r.kernel.org <netdev-owner@...r.kernel.org>
> On
> > > Behalf Of Andy Shevchenko
> > > Sent: Wednesday, August 21, 2019 2:56 PM
> > > To: Joseph Qi <joseph.qi@...ux.alibaba.com>
> > > Cc: Mark Fasheh <mark@...heh.com>; Joel Becker <jlbec@...lplan.org>;
> > > ocfs2-devel@....oracle.com; Ariel Elior <aelior@...vell.com>;
> > > Sudarsana Reddy Kalluru <skalluru@...vell.com>; GR-everest-linux-l2
> > > <GR-everest- linux-l2@...vell.com>; David S. Miller
> > > <davem@...emloft.net>; netdev@...r.kernel.org; Colin Ian King
> > > <colin.king@...onical.com>
> > > Subject: Re: [PATCH v1] ocfs2/dlm: Move BITS_TO_BYTES() to bitops.h
> > > for wider use
> > >
> > > On Wed, Aug 21, 2019 at 09:29:04AM +0800, Joseph Qi wrote:
> > > > On 19/8/21 00:31, Andy Shevchenko wrote:
> > > > > There are users already and will be more of BITS_TO_BYTES() macro.
> > > > > Move it to bitops.h for wider use.
> 
> > > > > -#define BITS_TO_BYTES(x) ((x)/8)>
> > > > I don't think this is a equivalent replace, or it is in fact wrong
> > > > before?
> > >
> > > I was thinking about this one and there are two applications:
> > > - calculus of the amount of structures of certain type per PAGE
> > >   (obviously off-by-one error in the original code IIUC purpose of
> > > STRUCT_SIZE)
> > > - calculus of some threshold based on line speed in bytes per second
> > >   (I dunno it will have any difference on the Gbs / 100 MBs speeds)
> > >
> > I see that both the implementations (existing vs new) yield same value for
> standard speeds 10G (i.e.,10000), 1G (1000) that device supports. Hence the
> change look to be ok.
> 
> Thank you for testing, may I use your Tested-by tag?
Sorry, I didn't test the actual driver flows. Was only referring to the output values for 1000/10000 speed values.

> 
> --
> With Best Regards,
> Andy Shevchenko
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ