[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727224444.2987641-15-jonathan.lemon@gmail.com>
Date: Mon, 27 Jul 2020 15:44:37 -0700
From: Jonathan Lemon <jonathan.lemon@...il.com>
To: <netdev@...r.kernel.org>
CC: <kernel-team@...com>
Subject: [RFC PATCH v2 14/21] net/tcp: add netgpu ioctl setting up zero copy RX queues
From: Jonathan Lemon <bsd@...com>
Netgpu delivers iovecs to userspace for incoming data, but the
destination queue must be attached to the socket. Do this via
and ioctl call on the socket itself.
Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
---
net/ipv4/tcp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 27de9380ed14..261c28ccc8f6 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -279,6 +279,7 @@
#include <linux/uaccess.h>
#include <asm/ioctls.h>
#include <net/busy_poll.h>
+#include <net/netgpu.h>
struct percpu_counter tcp_orphan_count;
EXPORT_SYMBOL_GPL(tcp_orphan_count);
@@ -636,6 +637,10 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
answ = READ_ONCE(tp->write_seq) -
READ_ONCE(tp->snd_nxt);
break;
+#if IS_ENABLED(CONFIG_NETGPU)
+ case NETGPU_SOCK_IOCTL_ATTACH_QUEUES: /* SIOCPROTOPRIVATE */
+ return netgpu_attach_socket(sk, (void __user *)arg);
+#endif
default:
return -ENOIOCTLCMD;
}
--
2.24.1
Powered by blists - more mailing lists