lkml.org 
[lkml]   [2022]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC,net-next v2 6/8] net: ip: Support MSG_NTCOPY
Date
Support nontemporal copies of IP data when applications set the
MSG_NTCOPY flag and checksumming is offloaded.

ip_generic_getfrag is used by UDP and raw sockets, so this change
effectively enables MSG_NTCOPY support for both.

Signed-off-by: Joe Damato <jdamato@fastly.com>
---
net/ipv4/ip_output.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 00b4bf2..75c8627 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -933,6 +933,7 @@ ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk
struct msghdr *msg = from;

if (skb->ip_summed == CHECKSUM_PARTIAL) {
+ msg_set_iter_copy_type(msg);
if (!copy_from_iter_full(to, len, &msg->msg_iter))
return -EFAULT;
} else {
--
2.7.4
\
 
 \ /
  Last update: 2022-06-12 11:02    [W:0.079 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site