From: John Fastabend <john.fastabend@gmail.com>
To: kuba@kernel.org, jannh@google.com, daniel@iogearbox.net
Cc: john.fastabend@gmail.com, borisp@nvidia.com, bpf@vger.kernel.org,
netdev@vger.kernel.org
Subject: [PATCH net 1/2] net: tls, update curr on splice as well
Date: Wed, 6 Dec 2023 15:27:05 -0800 [thread overview]
Message-ID: <20231206232706.374377-2-john.fastabend@gmail.com> (raw)
In-Reply-To: <20231206232706.374377-1-john.fastabend@gmail.com>
The curr pointer must also be updated on the splice similar to how
we do this for other copy types.
Fixes: d829e9c4112b ("tls: convert to generic sk_msg interface")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
---
net/tls/tls_sw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 316f76187962..e37b4d2e2acd 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -952,6 +952,8 @@ static int tls_sw_sendmsg_splice(struct sock *sk, struct msghdr *msg,
}
sk_msg_page_add(msg_pl, page, part, off);
+ msg_pl->sg.copybreak = 0;
+ msg_pl->sg.curr = msg_pl->sg.end;
sk_mem_charge(sk, part);
*copied += part;
try_to_copy -= part;
--
2.33.0
next prev parent reply other threads:[~2023-12-06 23:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 23:27 [PATCH net 0/2] fixes for ktls John Fastabend
2023-12-06 23:27 ` John Fastabend [this message]
2023-12-07 16:51 ` [PATCH net 1/2] net: tls, update curr on splice as well John Fastabend
2023-12-06 23:27 ` [PATCH net 2/2] bpf: sockmap, updating the sg structure should also update curr John Fastabend
2023-12-07 18:00 ` [PATCH net 0/2] fixes for ktls patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231206232706.374377-2-john.fastabend@gmail.com \
--to=john.fastabend@gmail.com \
--cc=borisp@nvidia.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jannh@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox