Skip to content

Commit

Permalink
Merge branch 'smc-r-fixes'
Browse files Browse the repository at this point in the history
Guangguan Wang says:

====================
Two fixes for SMC-R
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 10, 2023
2 parents 88e69af + f5146e3 commit 6eadb0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions net/smc/smc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,7 @@ void smcr_port_add(struct smc_ib_device *smcibdev, u8 ibport)
{
struct smc_link_group *lgr, *n;

spin_lock_bh(&smc_lgr_list.lock);
list_for_each_entry_safe(lgr, n, &smc_lgr_list.list, list) {
struct smc_link *link;

Expand All @@ -1680,6 +1681,7 @@ void smcr_port_add(struct smc_ib_device *smcibdev, u8 ibport)
if (link)
smc_llc_add_link_local(link);
}
spin_unlock_bh(&smc_lgr_list.lock);
}

/* link is down - switch connections to alternate link,
Expand Down
3 changes: 2 additions & 1 deletion net/smc/smc_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down

0 comments on commit 6eadb0b

Please sign in to comment.