smc_wr.h (1758047057dbe329be712a31b79db7151b5871f8) | smc_wr.h (90cee52f2e780345d3629e278291aea5ac74f40f) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Shared Memory Communications over RDMA (SMC-R) and RoCE 4 * 5 * Work Requests exploiting Infiniband API 6 * 7 * Copyright IBM Corp. 2016 8 * --- 48 unchanged lines hidden (view full) --- 57 58static inline void smc_wr_tx_set_wr_id(atomic_long_t *wr_tx_id, long val) 59{ 60 atomic_long_set(wr_tx_id, val); 61} 62 63static inline bool smc_wr_tx_link_hold(struct smc_link *link) 64{ | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Shared Memory Communications over RDMA (SMC-R) and RoCE 4 * 5 * Work Requests exploiting Infiniband API 6 * 7 * Copyright IBM Corp. 2016 8 * --- 48 unchanged lines hidden (view full) --- 57 58static inline void smc_wr_tx_set_wr_id(atomic_long_t *wr_tx_id, long val) 59{ 60 atomic_long_set(wr_tx_id, val); 61} 62 63static inline bool smc_wr_tx_link_hold(struct smc_link *link) 64{ |
65 if (!smc_link_usable(link)) | 65 if (!smc_link_sendable(link)) |
66 return false; 67 atomic_inc(&link->wr_tx_refcnt); 68 return true; 69} 70 71static inline void smc_wr_tx_link_put(struct smc_link *link) 72{ 73 if (atomic_dec_and_test(&link->wr_tx_refcnt)) --- 67 unchanged lines hidden --- | 66 return false; 67 atomic_inc(&link->wr_tx_refcnt); 68 return true; 69} 70 71static inline void smc_wr_tx_link_put(struct smc_link *link) 72{ 73 if (atomic_dec_and_test(&link->wr_tx_refcnt)) --- 67 unchanged lines hidden --- |