Thread (35 messages) 35 messages, 5 authors, 2020-07-28

[RFC PATCH v2 14/21] net/tcp: add netgpu ioctl setting up zero copy RX queues

STALE2259d

From: Jonathan Lemon <hidden>
Date: 2020-07-27 22:46:16
Subsystem: networking [general], networking [tcp], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Neal Cardwell, Linus Torvalds

Revision v2 of 2 in this series.

Revisions (2)
  1. rfc [diff vs current]
  2. v2 current
From: Jonathan Lemon <redacted>

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help