From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: [bpf-next PATCH v2 6/7] bpf: sockmap put client sockets in blocking mode Date: Wed, 10 Jan 2018 10:40:27 -0800 Message-ID: <20180110184027.5930.86884.stgit@john-Precision-Tower-5810> References: <20180110183600.5930.68261.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: borkmann@iogearbox.net, john.fastabend@gmail.com, ast@kernel.org Return-path: Received: from mail-pg0-f67.google.com ([74.125.83.67]:33348 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752458AbeAJSki (ORCPT ); Wed, 10 Jan 2018 13:40:38 -0500 Received: by mail-pg0-f67.google.com with SMTP id i196so11547754pgd.0 for ; Wed, 10 Jan 2018 10:40:38 -0800 (PST) In-Reply-To: <20180110183600.5930.68261.stgit@john-Precision-Tower-5810> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- samples/sockmap/sockmap_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/sockmap/sockmap_user.c b/samples/sockmap/sockmap_user.c index eb19d14..9496b2c 100644 --- a/samples/sockmap/sockmap_user.c +++ b/samples/sockmap/sockmap_user.c @@ -110,7 +110,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()");