mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-06 13:55:22 +02:00
net/smc: Correct smc link connection counter in case of smc client
[ Upstream commit64513d269e
] SMC clients may be assigned to a different link after the initial connection between two peers was established. In such a case, the connection counter was not correctly set. Update the connection counter correctly when a smc client connection is assigned to a different smc link. Fixes:07d51580ff
("net/smc: Add connection counters for links") Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Tested-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9b8f136b88
commit
e04669e14c
|
@ -757,7 +757,7 @@ static int smc_connect_rdma(struct smc_sock *smc,
|
|||
reason_code = SMC_CLC_DECL_NOSRVLINK;
|
||||
goto connect_abort;
|
||||
}
|
||||
smc->conn.lnk = link;
|
||||
smc_switch_link_and_count(&smc->conn, link);
|
||||
}
|
||||
|
||||
/* create send buffer and rmb */
|
||||
|
|
|
@ -916,7 +916,7 @@ static int smc_switch_cursor(struct smc_sock *smc, struct smc_cdc_tx_pend *pend,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void smc_switch_link_and_count(struct smc_connection *conn,
|
||||
void smc_switch_link_and_count(struct smc_connection *conn,
|
||||
struct smc_link *to_lnk)
|
||||
{
|
||||
atomic_dec(&conn->lnk->conn_cnt);
|
||||
|
|
|
@ -446,6 +446,8 @@ void smc_core_exit(void);
|
|||
int smcr_link_init(struct smc_link_group *lgr, struct smc_link *lnk,
|
||||
u8 link_idx, struct smc_init_info *ini);
|
||||
void smcr_link_clear(struct smc_link *lnk, bool log);
|
||||
void smc_switch_link_and_count(struct smc_connection *conn,
|
||||
struct smc_link *to_lnk);
|
||||
int smcr_buf_map_lgr(struct smc_link *lnk);
|
||||
int smcr_buf_reg_lgr(struct smc_link *lnk);
|
||||
void smcr_lgr_set_type(struct smc_link_group *lgr, enum smc_lgr_type new_type);
|
||||
|
|
Loading…
Reference in New Issue
Block a user