net/smc: adapt cursor update when sndbuf and peer DMB are merged
authorWen Gu <guwen@linux.alibaba.com>
Sun, 28 Apr 2024 06:07:37 +0000 (14:07 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Apr 2024 11:24:48 +0000 (13:24 +0200)
commitcc0ab806fc52e77f961b275ebb58024bd0e7adf2
tree50fd18b817abecf8b21df061fe955025ce6a6c5a
parentae2be35cbed2c8385e890147ea321a3fcc3ca5fa
net/smc: adapt cursor update when sndbuf and peer DMB are merged

If the local sndbuf shares the same physical memory with peer DMB,
the cursor update processing needs to be adapted to ensure that the
data to be consumed won't be overwritten.

So in this case, the fin_curs and sndbuf_space that were originally
updated after sending the CDC message should be modified to not be
update until the peer updates cons_curs.

Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Reviewed-and-tested-by: Jan Karcher <jaka@linux.ibm.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/smc/smc_cdc.c