From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: [bpf-next PATCH 6/7] bpf: sockmap put client sockets in blocking mode Date: Mon, 08 Jan 2018 10:06:31 -0800 Message-ID: <20180108180631.13647.7114.stgit@john-Precision-Tower-5810> References: <20180108180302.13647.13866.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: john.fastabend@gmail.com, ast@kernel.org, daniel@iogearbox.net Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:34068 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755147AbeAHSGm (ORCPT ); Mon, 8 Jan 2018 13:06:42 -0500 Received: by mail-pf0-f193.google.com with SMTP id e76so1719589pfk.1 for ; Mon, 08 Jan 2018 10:06:42 -0800 (PST) In-Reply-To: <20180108180302.13647.13866.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 bae85f8..0d8950f 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()");