From: Daniel Borkmann Subject: Re: [PATCH bpf-next v2 7/8] bpf: add tls support for testing in test_sockmap Date: Tue, 16 Oct 2018 02:48:02 +0200 Message-ID: <319217df-3f2f-8c42-aea5-910dfd688433@iogearbox.net> References: <20181013004603.3747-1-daniel@iogearbox.net> <20181013004603.3747-8-daniel@iogearbox.net> <20181016004243.GA95609@rdna-mbp.dhcp.thefacebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "alexei.starovoitov@gmail.com" , Dave Watson , "netdev@vger.kernel.org" To: Andrey Ignatov , "john.fastabend@gmail.com" Return-path: Received: from www62.your-server.de ([213.133.104.62]:34068 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726914AbeJPIfx (ORCPT ); Tue, 16 Oct 2018 04:35:53 -0400 In-Reply-To: <20181016004243.GA95609@rdna-mbp.dhcp.thefacebook.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/16/2018 02:42 AM, Andrey Ignatov wrote: > Hi Daniel and John! > > Daniel Borkmann [Fri, 2018-10-12 17:46 -0700]: >> From: John Fastabend >> >> This adds a --ktls option to test_sockmap in order to enable the >> combination of ktls and sockmap to run, which makes for another >> batch of 648 test cases for both in combination. >> >> Signed-off-by: John Fastabend >> Signed-off-by: Daniel Borkmann >> --- >> tools/testing/selftests/bpf/test_sockmap.c | 89 ++++++++++++++++++++++++++++++ >> 1 file changed, 89 insertions(+) >> >> diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c >> index ac7de38..10a5fa8 100644 >> --- a/tools/testing/selftests/bpf/test_sockmap.c >> +++ b/tools/testing/selftests/bpf/test_sockmap.c >> @@ -71,6 +71,7 @@ int txmsg_start; >> int txmsg_end; >> int txmsg_ingress; >> int txmsg_skb; >> +int ktls; >> >> static const struct option long_options[] = { >> {"help", no_argument, NULL, 'h' }, >> @@ -92,6 +93,7 @@ static const struct option long_options[] = { >> {"txmsg_end", required_argument, NULL, 'e'}, >> {"txmsg_ingress", no_argument, &txmsg_ingress, 1 }, >> {"txmsg_skb", no_argument, &txmsg_skb, 1 }, >> + {"ktls", no_argument, &ktls, 1 }, >> {0, 0, NULL, 0 } >> }; >> >> @@ -112,6 +114,76 @@ static void usage(char *argv[]) >> printf("\n"); >> } >> >> +#define TCP_ULP 31 >> +#define TLS_TX 1 >> +#define TLS_RX 2 >> +#include > > This breaks selftest build for me: > test_sockmap.c:120:23: fatal error: linux/tls.h: No such file or directory > #include > ^ > compilation terminated. > > Should include/uapi/linux/tls.h be copied to tools/ not to depend on > host headers? Good point, yes, that should happen; will send a fix tomorrow morning. Thanks, Daniel