aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuoqing Jiang <[email protected]>2023-11-13 19:57:12 +0800
committerLeon Romanovsky <[email protected]>2023-11-15 15:58:13 +0200
commit2109ddf032ebc57e0cd43e4378474ea6f2a378c2 (patch)
tree0dfded5f3a6a3d01215957e24263f77851953d04
parenta2b64565e8ea9530cce8e1c528f53ca888c0a45b (diff)
RDMA/siw: Use iov.iov_len in kernel_sendmsg
We can pass iov.iov_len here. Acked-by: Bernard Metzler <[email protected]> Signed-off-by: Guoqing Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
-rw-r--r--drivers/infiniband/sw/siw/siw_qp_tx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/siw/siw_qp_tx.c b/drivers/infiniband/sw/siw/siw_qp_tx.c
index 86186cd3cca4..838123c621e2 100644
--- a/drivers/infiniband/sw/siw/siw_qp_tx.c
+++ b/drivers/infiniband/sw/siw/siw_qp_tx.c
@@ -292,8 +292,7 @@ static int siw_tx_ctrl(struct siw_iwarp_tx *c_tx, struct socket *s,
(char *)&c_tx->pkt.ctrl + c_tx->ctrl_sent,
.iov_len = c_tx->ctrl_len - c_tx->ctrl_sent };
- int rv = kernel_sendmsg(s, &msg, &iov, 1,
- c_tx->ctrl_len - c_tx->ctrl_sent);
+ int rv = kernel_sendmsg(s, &msg, &iov, 1, iov.iov_len);
if (rv >= 0) {
c_tx->ctrl_sent += rv;