diff mbox series

[net-next] net/smc: add the max value of fallback reason count

Message ID 20240801113549.98301-1-shaozhengchao@huawei.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net/smc: add the max value of fallback reason count | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 42 this patch: 42
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 43 this patch: 43
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 43 this patch: 43
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest warning net-next-2024-08-01--21-00 (tests: 346)

Commit Message

shaozhengchao Aug. 1, 2024, 11:35 a.m. UTC
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@huawei.com>
---
 net/smc/smc_stats.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

D. Wythe Aug. 2, 2024, 2:38 a.m. UTC | #1
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@huawei.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,
Wenjia Zhang Aug. 2, 2024, 11:17 a.m. UTC | #2
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@huawei.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.
Btw, I also it is a bug fix other than feature.

Thanks,
Wenjia
Wen Gu Aug. 2, 2024, 2:05 p.m. UTC | #3
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@huawei.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
shaozhengchao Aug. 5, 2024, 12:55 a.m. UTC | #4
On 2024/8/2 22:05, Wen Gu wrote:
> 
> 
> 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@huawei.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 Wen Gu:
     Thank you for you reply. As long as there are enough scenarios and
enough complexity, some unusual errors will be tested. :)

Thank you

Zhengchao Shao
>> 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
shaozhengchao Aug. 5, 2024, 12:56 a.m. UTC | #5
Hi Wenjia:
     I will fix it in V2.

Thank you

Zhengchao Shao

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@huawei.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.
> Btw, I also it is a bug fix other than feature.
> 
> Thanks,
> Wenjia
diff mbox series

Patch

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
 
 enum {
 	SMC_BUF_8K,