From: John Fastabend Date: Mon, 22 Jan 2018 18:36:53 +0000 (-0800) Subject: bpf: sockmap put client sockets in blocking mode X-Git-Tag: v4.16-rc1~123^2~33^2~7^2~1 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=ede154776c8bf5b1032b1d619db15485b9f34387;p=linux.git 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 Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann --- 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) } /* Non-blocking sockets */ - for (i = 0; i < 4; i++) { + for (i = 0; i < 2; i++) { err = ioctl(*fds[i], FIONBIO, (char *)&one); if (err < 0) { perror("ioctl s1 failed()");