af_smc.c (7df8bcb56053173e5e5c0e566391fa601e3e4778) | af_smc.c (741a49a4dc5fd7e61b37b259dde915083c2c5327) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Shared Memory Communications over RDMA (SMC-R) and RoCE 4 * 5 * AF_SMC protocol family socket handler keeping the AF_INET sock address type 6 * applies to SOCK_STREAM sockets only 7 * offers an alternative communication option for TCP-protocol sockets 8 * applicable with RoCE-cards only --- 338 unchanged lines hidden (view full) --- 347 rc = smc_llc_flow_initiate(lgr, SMC_LLC_FLOW_RKEY); 348 if (rc) 349 return rc; 350 /* protect against parallel smc_llc_cli_rkey_exchange() and 351 * parallel smcr_link_reg_rmb() 352 */ 353 mutex_lock(&lgr->llc_conf_mutex); 354 for (i = 0; i < SMC_LINKS_PER_LGR_MAX; i++) { | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Shared Memory Communications over RDMA (SMC-R) and RoCE 4 * 5 * AF_SMC protocol family socket handler keeping the AF_INET sock address type 6 * applies to SOCK_STREAM sockets only 7 * offers an alternative communication option for TCP-protocol sockets 8 * applicable with RoCE-cards only --- 338 unchanged lines hidden (view full) --- 347 rc = smc_llc_flow_initiate(lgr, SMC_LLC_FLOW_RKEY); 348 if (rc) 349 return rc; 350 /* protect against parallel smc_llc_cli_rkey_exchange() and 351 * parallel smcr_link_reg_rmb() 352 */ 353 mutex_lock(&lgr->llc_conf_mutex); 354 for (i = 0; i < SMC_LINKS_PER_LGR_MAX; i++) { |
355 if (lgr->lnk[i].state != SMC_LNK_ACTIVE) | 355 if (!smc_link_active(&lgr->lnk[i])) |
356 continue; 357 rc = smcr_link_reg_rmb(&lgr->lnk[i], rmb_desc); 358 if (rc) 359 goto out; 360 } 361 362 /* exchange confirm_rkey msg with peer */ 363 rc = smc_llc_do_confirm_rkey(link, rmb_desc); --- 1791 unchanged lines hidden --- | 356 continue; 357 rc = smcr_link_reg_rmb(&lgr->lnk[i], rmb_desc); 358 if (rc) 359 goto out; 360 } 361 362 /* exchange confirm_rkey msg with peer */ 363 rc = smc_llc_do_confirm_rkey(link, rmb_desc); --- 1791 unchanged lines hidden --- |