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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0944cb6-eb63-b1e6-01da-4cddd2ab7f91@huawei.com>
Date:   Fri, 20 Dec 2019 10:19:34 +0800
From:   maowenan <maowenan@...wei.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
CC:     David Miller <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, <maximmi@...lanox.com>,
        Paolo Abeni <pabeni@...hat.com>, <yuehaibing@...wei.com>,
        Neil Horman <nhorman@...driver.com>,
        "Network Development" <netdev@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH net] af_packet: refactoring code for
 prb_calc_retire_blk_tmo



On 2019/12/19 21:56, Willem de Bruijn wrote:
> On Wed, Dec 18, 2019 at 8:37 PM Mao Wenan <maowenan@...wei.com> wrote:
>>
>> If __ethtool_get_link_ksettings() is failed and with
>> non-zero value, prb_calc_retire_blk_tmo() should return
>> DEFAULT_PRB_RETIRE_TOV firstly. Refactoring code and make
>> it more readable.
>>
>> Fixes: b43d1f9f7067 ("af_packet: set defaule value for tmo")
> 
> This is a pure refactor, not a fix.
yes , it is not a fix.
> 
> Code refactors make backporting fixes across releases harder, among
> other things. I think this code is better left as is. Either way, it
> would be a candidate for net-next, not net.
sorry, it would be net-next.
> 
>> -       unsigned int mbits = 0, msec = 0, div = 0, tmo = 0;
>> +       unsigned int mbits = 0, msec = 1, div = 0, tmo = 0;
> 
> Most of these do not need to be initialized here at all, really.
> 
some of them do not need to be initialized,
msec=1 can be reserved because it can indicate tmo is for millisecond and msec
initialized value is 1ms.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ