summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorGuoqing Jiang <guoqing.jiang@linux.dev>2023-11-13 12:57:12 +0100
committerLeon Romanovsky <leon@kernel.org>2023-11-15 14:58:13 +0100
commit2109ddf032ebc57e0cd43e4378474ea6f2a378c2 (patch)
tree0dfded5f3a6a3d01215957e24263f77851953d04 /drivers/infiniband/sw
parentRDMA/siw: Introduce siw_update_skb_rcvd (diff)
downloadlinux-2109ddf032ebc57e0cd43e4378474ea6f2a378c2.tar.xz
linux-2109ddf032ebc57e0cd43e4378474ea6f2a378c2.zip
RDMA/siw: Use iov.iov_len in kernel_sendmsg
We can pass iov.iov_len here. Acked-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> Link: https://lore.kernel.org/r/20231113115726.12762-4-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/sw')
-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;