On 10/25/23 20:33, Bernard Metzler wrote:
-----Original Message-----
From: Guoqing Jiang<guoqing.jiang@xxxxxxxxx>
Sent: Monday, October 9, 2023 9:18 AM
To: Bernard Metzler<BMT@xxxxxxxxxxxxxx>;jgg@xxxxxxxx;leon@xxxxxxxxxx
Cc:linux-rdma@xxxxxxxxxxxxxxx
Subject: [EXTERNAL] [PATCH 02/19] RDMA/siw: Introduce siw_srx_update_skb
There are some places share the same logic, factor a common
helper for it.
Signed-off-by: Guoqing Jiang<guoqing.jiang@xxxxxxxxx>
---
drivers/infiniband/sw/siw/siw_qp_rx.c | 31 +++++++++++----------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/drivers/infiniband/sw/siw/siw_qp_rx.c
b/drivers/infiniband/sw/siw/siw_qp_rx.c
index 33e0fdb362ff..aa7b680452fb 100644
--- a/drivers/infiniband/sw/siw/siw_qp_rx.c
+++ b/drivers/infiniband/sw/siw/siw_qp_rx.c
@@ -881,6 +881,13 @@ int siw_proc_rresp(struct siw_qp *qp)
return rv;
}
+static void siw_srx_update_skb(struct siw_rx_stream *srx, u16 length)
+{
+ srx->skb_offset += length;
+ srx->skb_new -= length;
+ srx->skb_copied += length;
+}
+
better call it siw_update_skb_rcvd()?
We are not updating the skb here, but our state
referencing an skb.
Sure, thanks for the naming!
Thanks,
Guoqing