diff options
author | David Howells <dhowells@redhat.com> | 2023-06-24 00:55:06 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-25 00:50:12 +0200 |
commit | 2f8bc2bbb0fa87bcf7fb9eeb65eb6d79c5a08895 (patch) | |
tree | 1fe40c1691dc7ff4064f4123ae22fc643374566d /net/smc/smc_tx.c | |
parent | nvmet-tcp: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage (diff) | |
download | linux-2f8bc2bbb0fa87bcf7fb9eeb65eb6d79c5a08895.tar.xz linux-2f8bc2bbb0fa87bcf7fb9eeb65eb6d79c5a08895.zip |
smc: Drop smc_sendpage() in favour of smc_sendmsg() + MSG_SPLICE_PAGES
Drop the smc_sendpage() code as smc_sendmsg() just passes the call down to
the underlying TCP socket and smc_tx_sendpage() is just a wrapper around
its sendmsg implementation.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Karsten Graul <kgraul@linux.ibm.com>
cc: Wenjia Zhang <wenjia@linux.ibm.com>
cc: Jan Karcher <jaka@linux.ibm.com>
cc: "D. Wythe" <alibuda@linux.alibaba.com>
cc: Tony Lu <tonylu@linux.alibaba.com>
cc: Wen Gu <guwen@linux.alibaba.com>
cc: Jens Axboe <axboe@kernel.dk>
cc: Matthew Wilcox <willy@infradead.org>
Link: https://lore.kernel.org/r/20230623225513.2732256-10-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/smc/smc_tx.c')
-rw-r--r-- | net/smc/smc_tx.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c index 9b9e0a190734..3b0ff3b589c7 100644 --- a/net/smc/smc_tx.c +++ b/net/smc/smc_tx.c @@ -297,25 +297,6 @@ out_err: return rc; } -int smc_tx_sendpage(struct smc_sock *smc, struct page *page, int offset, - size_t size, int flags) -{ - struct msghdr msg = {.msg_flags = flags}; - char *kaddr = kmap(page); - struct kvec iov; - int rc; - - if (flags & MSG_SENDPAGE_NOTLAST) - msg.msg_flags |= MSG_MORE; - - iov.iov_base = kaddr + offset; - iov.iov_len = size; - iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, &iov, 1, size); - rc = smc_tx_sendmsg(smc, &msg, size); - kunmap(page); - return rc; -} - /***************************** sndbuf consumer *******************************/ /* sndbuf consumer: actual data transfer of one target chunk with ISM write */ |