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]
Message-ID: <439a499a-13ae-47e7-af54-3d9f064766af@linux.alibaba.com>
Date: Fri, 2 Aug 2024 22:05:57 +0800
From: Wen Gu <guwen@...ux.alibaba.com>
To: Wenjia Zhang <wenjia@...ux.ibm.com>, "D. Wythe"
 <alibuda@...ux.alibaba.com>, Zhengchao Shao <shaozhengchao@...wei.com>,
 linux-s390@...r.kernel.org, netdev@...r.kernel.org, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: jaka@...ux.ibm.com, tonylu@...ux.alibaba.com, weiyongjun1@...wei.com,
 yuehaibing@...wei.com
Subject: Re: [PATCH net-next] net/smc: add the max value of fallback reason
 count



On 2024/8/2 19:17, Wenjia Zhang wrote:
> 
> 
> On 02.08.24 04:38, D. Wythe wrote:
>>
>>
>> On 8/1/24 7:35 PM, Zhengchao Shao wrote:
>>> The number of fallback reasons defined in the smc_clc.h file has reached
>>> 36. For historical reasons, some are no longer quoted, and there's 33
>>> actually in use. So, add the max value of fallback reason count to 50.
>>>
>>> Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
>>> ---
>>>   net/smc/smc_stats.h | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/smc/smc_stats.h b/net/smc/smc_stats.h
>>> index 9d32058db2b5..ab5aafc6f44c 100644
>>> --- a/net/smc/smc_stats.h
>>> +++ b/net/smc/smc_stats.h
>>> @@ -19,7 +19,7 @@
>>>   #include "smc_clc.h"
>>> -#define SMC_MAX_FBACK_RSN_CNT 30
>>> +#define SMC_MAX_FBACK_RSN_CNT 50
>> It feels more like a fix ?
>>
>>>   enum {
>>>       SMC_BUF_8K,
>>
> 
> Hi Zhengchao,
> 
> IMO It should be 36 instead of 50 because of unnecessary smc_stats_fback element and  unnecessary scanning e.g. in smc_stat_inc_fback_rsn_cnt(). If there is any new reason code coming later, the one who are introducing the new reason code should update the the value correspondingly.

I wonder if it is really necessary to expand to 50, since generally
the reasons for fallback in a machine will be concentrated into a few,
normally less than 10, so there is almost no case of using up all 30
reason slots.

Thanks!

> Btw, I also it is a bug fix other than feature.
> 
> Thanks,
> Wenjia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ