[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be086da3-061d-8f39-6e79-0e5d21771453@linux.ibm.com>
Date: Fri, 8 Sep 2023 11:42:36 +0200
From: Wenjia Zhang <wenjia@...ux.ibm.com>
To: Guangguan Wang <guangguan.wang@...ux.alibaba.com>, jaka@...ux.ibm.com,
kgraul@...ux.ibm.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com
Cc: tonylu@...ux.alibaba.com, alibuda@...ux.alibaba.com,
guwen@...ux.alibaba.com, linux-s390@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 1/2] net/smc: bugfix for smcr v2 server connect
success statistic
On 08.09.23 05:31, Guangguan Wang wrote:
> In the macro SMC_STAT_SERV_SUCC_INC, the smcd_version is used
> to determin whether to increase the v1 statistic or the v2
> statistic. It is correct for SMCD. But for SMCR, smcr_version
> should be used.
>
> Signed-off-by: Guangguan Wang <guangguan.wang@...ux.alibaba.com>
> ---
> net/smc/smc_stats.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/smc/smc_stats.h b/net/smc/smc_stats.h
> index b60fe1eb37ab..aa8928975cc6 100644
> --- a/net/smc/smc_stats.h
> +++ b/net/smc/smc_stats.h
> @@ -243,8 +243,9 @@ while (0)
> #define SMC_STAT_SERV_SUCC_INC(net, _ini) \
> do { \
> typeof(_ini) i = (_ini); \
> - bool is_v2 = (i->smcd_version & SMC_V2); \
> bool is_smcd = (i->is_smcd); \
> + u8 version = is_smcd ? i->smcd_version : i->smcr_version; \
> + bool is_v2 = (version & SMC_V2); \
> typeof(net->smc.smc_stats) smc_stats = (net)->smc.smc_stats; \
> if (is_v2 && is_smcd) \
> this_cpu_inc(smc_stats->smc[SMC_TYPE_D].srv_v2_succ_cnt); \
ohje, that is because the statistic was implemented first, then SMCR_v2.
Good catch! Thank you!
Powered by blists - more mailing lists