aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2018-01-22 13:36:53 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-24 04:46:59 -0500
commitede154776c8bf5b1032b1d619db15485b9f34387 (patch)
tree29c4e3e041182d7ce8172bbdb895dbcb890b8698
parentce5373be1aeac7889eb31f4bcf2b1dc2ad3c263c (diff)
bpf: sockmap put client sockets in blocking mode
Put client sockets in blocking mode otherwise with sendmsg tests its easy to overrun the socket buffers which results in the test being aborted. The original non-blocking was added to handle listen/accept with a single thread the client/accepted sockets do not need to be non-blocking. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--samples/sockmap/sockmap_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/sockmap/sockmap_user.c b/samples/sockmap/sockmap_user.c
index f9d3785fb183..fe943c903310 100644
--- a/samples/sockmap/sockmap_user.c
+++ b/samples/sockmap/sockmap_user.c
@@ -109,7 +109,7 @@ static int sockmap_init_sockets(void)
109 } 109 }
110 110
111 /* Non-blocking sockets */ 111 /* Non-blocking sockets */
112 for (i = 0; i < 4; i++) { 112 for (i = 0; i < 2; i++) {
113 err = ioctl(*fds[i], FIONBIO, (char *)&one); 113 err = ioctl(*fds[i], FIONBIO, (char *)&one);
114 if (err < 0) { 114 if (err < 0) {
115 perror("ioctl s1 failed()"); 115 perror("ioctl s1 failed()");