From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [bpf-next PATCH v2 3/7] bpf: sockmap sample, use fork() for send and recv Date: Thu, 11 Jan 2018 02:31:28 +0100 Message-ID: References: <20180110183600.5930.68261.stgit@john-Precision-Tower-5810> <20180110183937.5930.36362.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 , borkmann@iogearbox.net, ast@kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:46911 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752473AbeAKBba (ORCPT ); Wed, 10 Jan 2018 20:31:30 -0500 In-Reply-To: <20180110183937.5930.36362.stgit@john-Precision-Tower-5810> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 01/10/2018 07:39 PM, John Fastabend wrote: > Currently for SENDMSG tests first send completes then recv runs. This > does not work well for large data sizes and/or many iterations. So > fork the recv and send handler so that we run both send and recv. In > the future we can add a parameter to do more than a single fork of > tx/rx. > > With this we can get many GBps of data which helps exercise the > sockmap code. > > Signed-off-by: John Fastabend > --- > samples/sockmap/Makefile | 2 + > samples/sockmap/sockmap_user.c | 58 +++++++++++++++++++++++++++++----------- > 2 files changed, 43 insertions(+), 17 deletions(-) > > diff --git a/samples/sockmap/Makefile b/samples/sockmap/Makefile > index 73f1da4..4fefd66 100644 > --- a/samples/sockmap/Makefile > +++ b/samples/sockmap/Makefile > @@ -8,7 +8,7 @@ HOSTCFLAGS += -I$(objtree)/usr/include > HOSTCFLAGS += -I$(srctree)/tools/lib/ > HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/ > HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include > -HOSTCFLAGS += -I$(srctree)/tools/perf > +HOSTCFLAGS += -I$(srctree)/tools/perf -g Slipped in here? > sockmap-objs := ../bpf/bpf_load.o $(LIBBPF) sockmap_user.o > > diff --git a/samples/sockmap/sockmap_user.c b/samples/sockmap/sockmap_user.c > index 2d51672..48fa09a 100644 > --- a/samples/sockmap/sockmap_user.c > +++ b/samples/sockmap/sockmap_user.c > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include [...]