Skip to content

Commit 81840b3

Browse files
dhowellskuba-moo
authored andcommitted
tls: Allow MSG_SPLICE_PAGES but treat it as normal sendmsg
Allow MSG_SPLICE_PAGES to be specified to sendmsg() but treat it as normal sendmsg for now. This means the data will just be copied until MSG_SPLICE_PAGES is handled. Signed-off-by: David Howells <[email protected]> cc: Chuck Lever <[email protected]> cc: Boris Pismenny <[email protected]> cc: John Fastabend <[email protected]> cc: Jens Axboe <[email protected]> cc: Matthew Wilcox <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4fe38ac commit 81840b3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

net/tls/tls_device.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,8 @@ static int tls_push_data(struct sock *sk,
447447
long timeo;
448448

449449
if (flags &
450-
~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | MSG_SENDPAGE_NOTLAST))
450+
~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | MSG_SENDPAGE_NOTLAST |
451+
MSG_SPLICE_PAGES))
451452
return -EOPNOTSUPP;
452453

453454
if (unlikely(sk->sk_err))

net/tls/tls_sw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
955955
int pending;
956956

957957
if (msg->msg_flags & ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL |
958-
MSG_CMSG_COMPAT))
958+
MSG_CMSG_COMPAT | MSG_SPLICE_PAGES))
959959
return -EOPNOTSUPP;
960960

961961
ret = mutex_lock_interruptible(&tls_ctx->tx_lock);

0 commit comments

Comments
 (0)