Skip to content

Commit 4e1e3dd

Browse files
Showrya M Njgunthorpe
authored andcommitted
RDMA/siw: Add sendpage_ok() check to disable MSG_SPLICE_PAGES
While running ISER over SIW, the initiator machine encounters a warning from skb_splice_from_iter() indicating that a slab page is being used in send_page. To address this, it is better to add a sendpage_ok() check within the driver itself, and if it returns 0, then MSG_SPLICE_PAGES flag should be disabled before entering the network stack. A similar issue has been discussed for NVMe in this thread: https://lore.kernel.org/all/[email protected]/ WARNING: CPU: 0 PID: 5342 at net/core/skbuff.c:7140 skb_splice_from_iter+0x173/0x320 Call Trace: tcp_sendmsg_locked+0x368/0xe40 siw_tx_hdt+0x695/0xa40 [siw] siw_qp_sq_process+0x102/0xb00 [siw] siw_sq_resume+0x39/0x110 [siw] siw_run_sq+0x74/0x160 [siw] kthread+0xd2/0x100 ret_from_fork+0x34/0x40 ret_from_fork_asm+0x1a/0x30 Link: https://patch.msgid.link/r/[email protected] Signed-off-by: Showrya M N <[email protected]> Signed-off-by: Potnuri Bharat Teja <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 5069d7e commit 4e1e3dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/infiniband/sw/siw/siw_qp_tx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ static int siw_tcp_sendpages(struct socket *s, struct page **page, int offset,
331331
msg.msg_flags &= ~MSG_MORE;
332332

333333
tcp_rate_check_app_limited(sk);
334+
if (!sendpage_ok(page[i]))
335+
msg.msg_flags &= ~MSG_SPLICE_PAGES;
334336
bvec_set_page(&bvec, page[i], bytes, offset);
335337
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, size);
336338

0 commit comments

Comments
 (0)