* [PATCH net-next] net/smc: add the max value of fallback reason count
@ 2024-08-01 11:35 Zhengchao Shao
2024-08-02 2:38 ` D. Wythe
0 siblings, 1 reply; 6+ messages in thread
From: Zhengchao Shao @ 2024-08-01 11:35 UTC (permalink / raw)
To: linux-s390, netdev, davem, edumazet, kuba, pabeni
Cc: wenjia, jaka, alibuda, tonylu, guwen, weiyongjun1, yuehaibing,
shaozhengchao
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
enum {
SMC_BUF_8K,
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH net-next] net/smc: add the max value of fallback reason count
2024-08-01 11:35 [PATCH net-next] net/smc: add the max value of fallback reason count Zhengchao Shao
@ 2024-08-02 2:38 ` D. Wythe
2024-08-02 11:17 ` Wenjia Zhang
0 siblings, 1 reply; 6+ messages in thread
From: D. Wythe @ 2024-08-02 2:38 UTC (permalink / raw)
To: Zhengchao Shao, linux-s390, netdev, davem, edumazet, kuba, pabeni
Cc: wenjia, jaka, tonylu, guwen, weiyongjun1, yuehaibing
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,
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net-next] net/smc: add the max value of fallback reason count
2024-08-02 2:38 ` D. Wythe
@ 2024-08-02 11:17 ` Wenjia Zhang
2024-08-02 14:05 ` Wen Gu
2024-08-05 0:56 ` shaozhengchao
0 siblings, 2 replies; 6+ messages in thread
From: Wenjia Zhang @ 2024-08-02 11:17 UTC (permalink / raw)
To: D. Wythe, Zhengchao Shao, linux-s390, netdev, davem, edumazet,
kuba, pabeni
Cc: jaka, tonylu, guwen, weiyongjun1, yuehaibing
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net-next] net/smc: add the max value of fallback reason count
2024-08-02 11:17 ` Wenjia Zhang
@ 2024-08-02 14:05 ` Wen Gu
2024-08-05 0:55 ` shaozhengchao
2024-08-05 0:56 ` shaozhengchao
1 sibling, 1 reply; 6+ messages in thread
From: Wen Gu @ 2024-08-02 14:05 UTC (permalink / raw)
To: Wenjia Zhang, D. Wythe, Zhengchao Shao, linux-s390, netdev, davem,
edumazet, kuba, pabeni
Cc: jaka, tonylu, weiyongjun1, yuehaibing
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net-next] net/smc: add the max value of fallback reason count
2024-08-02 14:05 ` Wen Gu
@ 2024-08-05 0:55 ` shaozhengchao
0 siblings, 0 replies; 6+ messages in thread
From: shaozhengchao @ 2024-08-05 0:55 UTC (permalink / raw)
To: Wen Gu, Wenjia Zhang, D. Wythe, linux-s390, netdev, davem,
edumazet, kuba, pabeni
Cc: jaka, tonylu, weiyongjun1, yuehaibing
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] net/smc: add the max value of fallback reason count
2024-08-02 11:17 ` Wenjia Zhang
2024-08-02 14:05 ` Wen Gu
@ 2024-08-05 0:56 ` shaozhengchao
1 sibling, 0 replies; 6+ messages in thread
From: shaozhengchao @ 2024-08-05 0:56 UTC (permalink / raw)
To: Wenjia Zhang, D. Wythe, linux-s390, netdev, davem, edumazet, kuba,
pabeni
Cc: jaka, tonylu, guwen, weiyongjun1, yuehaibing
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-05 0:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 11:35 [PATCH net-next] net/smc: add the max value of fallback reason count Zhengchao Shao
2024-08-02 2:38 ` D. Wythe
2024-08-02 11:17 ` Wenjia Zhang
2024-08-02 14:05 ` Wen Gu
2024-08-05 0:55 ` shaozhengchao
2024-08-05 0:56 ` shaozhengchao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox