Lines Matching refs:lgr

96 		if (link->lgr->smc_version != SMC_V2 ||  in smc_wr_tx_process_cqe()
104 memset(link->lgr->wr_tx_buf_v2, 0, in smc_wr_tx_process_cqe()
105 sizeof(*link->lgr->wr_tx_buf_v2)); in smc_wr_tx_process_cqe()
122 if (link->lgr->smc_version == SMC_V2) { in smc_wr_tx_process_cqe()
125 memset(link->lgr->wr_tx_buf_v2, 0, in smc_wr_tx_process_cqe()
126 sizeof(*link->lgr->wr_tx_buf_v2)); in smc_wr_tx_process_cqe()
201 struct smc_link_group *lgr = smc_get_lgr(link); in smc_wr_tx_get_free_slot() local
210 if (in_softirq() || lgr->terminating) { in smc_wr_tx_get_free_slot()
218 lgr->terminating || in smc_wr_tx_get_free_slot()
266 *wr_buf = link->lgr->wr_tx_buf_v2; in smc_wr_tx_get_v2_slot()
288 } else if (link->lgr->smc_version == SMC_V2 && in smc_wr_tx_put_slot()
293 memset(&link->lgr->wr_tx_buf_v2, 0, in smc_wr_tx_put_slot()
294 sizeof(link->lgr->wr_tx_buf_v2)); in smc_wr_tx_put_slot()
559 int sges_per_buf = (lnk->lgr->smc_version == SMC_V2) ? 2 : 1; in smc_wr_init_sge()
592 if (lnk->lgr->smc_version == SMC_V2) { in smc_wr_init_sge()
618 if (lnk->lgr->smc_version == SMC_V2) { in smc_wr_init_sge()
679 void smc_wr_free_lgr_mem(struct smc_link_group *lgr) in smc_wr_free_lgr_mem() argument
681 if (lgr->smc_version < SMC_V2) in smc_wr_free_lgr_mem()
684 kfree(lgr->wr_rx_buf_v2); in smc_wr_free_lgr_mem()
685 lgr->wr_rx_buf_v2 = NULL; in smc_wr_free_lgr_mem()
686 kfree(lgr->wr_tx_buf_v2); in smc_wr_free_lgr_mem()
687 lgr->wr_tx_buf_v2 = NULL; in smc_wr_free_lgr_mem()
722 int smc_wr_alloc_lgr_mem(struct smc_link_group *lgr) in smc_wr_alloc_lgr_mem() argument
724 if (lgr->smc_version < SMC_V2) in smc_wr_alloc_lgr_mem()
727 lgr->wr_rx_buf_v2 = kzalloc(SMC_WR_BUF_V2_SIZE, GFP_KERNEL); in smc_wr_alloc_lgr_mem()
728 if (!lgr->wr_rx_buf_v2) in smc_wr_alloc_lgr_mem()
730 lgr->wr_tx_buf_v2 = kzalloc(SMC_WR_BUF_V2_SIZE, GFP_KERNEL); in smc_wr_alloc_lgr_mem()
731 if (!lgr->wr_tx_buf_v2) { in smc_wr_alloc_lgr_mem()
732 kfree(lgr->wr_rx_buf_v2); in smc_wr_alloc_lgr_mem()
740 int sges_per_buf = link->lgr->smc_version == SMC_V2 ? 2 : 1; in smc_wr_alloc_link_mem()
792 if (link->lgr->smc_version == SMC_V2) { in smc_wr_alloc_link_mem()
865 if (lnk->lgr->smc_version == SMC_V2) { in smc_wr_create_link()
867 lnk->lgr->wr_rx_buf_v2, SMC_WR_BUF_V2_SIZE, in smc_wr_create_link()
875 lnk->lgr->wr_tx_buf_v2, SMC_WR_BUF_V2_SIZE, in smc_wr_create_link()