[PATCH 08/18] nvme-tcp: do not set MSG_SENDPAGE_NOTLAST
Hannes Reinecke
hare at suse.de
Mon Apr 17 06:02:52 PDT 2023
MSG_SENDPAGE_NOTLAST was introduced with commit 35f9c09fe9c7
("tcp: tcp_sendpages() should call tcp_push() once") to fix issues
with the ->sendfile() call, and the implication seems to be that
the flag should be strictly internal to sendfile.
Hence we shouldn't be setting it on nvme-tcp, and anyway doing
so will cause TLS sending invalid data.
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
drivers/nvme/host/tcp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 273c1f2760a4..732aa2296560 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -995,7 +995,7 @@ static int nvme_tcp_try_send_data(struct nvme_tcp_request *req)
if (last && !queue->data_digest && !nvme_tcp_queue_more(queue))
flags |= MSG_EOR;
else
- flags |= MSG_MORE | MSG_SENDPAGE_NOTLAST;
+ flags |= MSG_MORE;
if (sendpage_ok(page)) {
ret = kernel_sendpage(queue->sock, page, offset, len,
@@ -1049,7 +1049,7 @@ static int nvme_tcp_try_send_cmd_pdu(struct nvme_tcp_request *req)
int ret;
if (inline_data || nvme_tcp_queue_more(queue))
- flags |= MSG_MORE | MSG_SENDPAGE_NOTLAST;
+ flags |= MSG_MORE;
else
flags |= MSG_EOR;
@@ -1091,7 +1091,7 @@ static int nvme_tcp_try_send_data_pdu(struct nvme_tcp_request *req)
if (!req->h2cdata_left)
ret = kernel_sendpage(queue->sock, virt_to_page(pdu),
offset_in_page(pdu) + req->offset, len,
- MSG_DONTWAIT | MSG_MORE | MSG_SENDPAGE_NOTLAST);
+ MSG_DONTWAIT | MSG_MORE);
else
ret = sock_no_sendpage(queue->sock, virt_to_page(pdu),
offset_in_page(pdu) + req->offset, len,
--
2.35.3
More information about the Linux-nvme
mailing list