diff options
author | Alexandra Winter <wintera@linux.ibm.com> | 2025-09-18 13:04:48 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-09-23 11:13:21 +0200 |
commit | a4997e17d13767e67170f09bfa0b867862cad9d9 (patch) | |
tree | 41906e5e5d5da2477c78554c4e130ddf63e6a837 /net/smc/smc_ism.c | |
parent | 884eee8e43f3072db4111178c98b9aa5c57bcf92 (diff) |
net/smc: Decouple sf and attached send_buf in smc_loopback
Before this patch there was the following assumption in
smc_loopback.c>smc_lo_move_data():
sf (signalling flag) == 0 : data is already in an attached target dmb
sf == 1 : data is not yet in the target dmb
This is true for the 2 callers in smc client
smcd_cdc_msg_send() : sf=1
smcd_tx_rdma_writes() : sf=0
but should not be a general assumption.
Add a bool to struct smc_buf_desc to indicate whether an SMC-D sndbuf_desc
is an attached buffer. Don't call move_data() for attached send_buffers,
because it is not necessary.
Move the data in smc_lo_move_data() if len != 0 and signal when requested.
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Mahanta Jambigi <mjambigi@linux.ibm.com>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Link: https://patch.msgid.link/20250918110500.1731261-3-wintera@linux.ibm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/smc/smc_ism.c')
-rw-r--r-- | net/smc/smc_ism.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c index fca01b95b65a..503a9f93b392 100644 --- a/net/smc/smc_ism.c +++ b/net/smc/smc_ism.c @@ -274,6 +274,7 @@ int smc_ism_attach_dmb(struct smcd_dev *dev, u64 token, dmb_desc->cpu_addr = dmb.cpu_addr; dmb_desc->dma_addr = dmb.dma_addr; dmb_desc->len = dmb.dmb_len; + dmb_desc->is_attached = true; } return rc; } |