On 10/16/2018 02:42 AM, Andrey Ignatov wrote: > Hi Daniel and John! > > Daniel Borkmann <dan...@iogearbox.net> [Fri, 2018-10-12 17:46 -0700]: >> From: John Fastabend <john.fastab...@gmail.com> >> >> 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 <john.fastab...@gmail.com> >> Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> >> --- >> 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 <linux/tls.h> > > This breaks selftest build for me: > test_sockmap.c:120:23: fatal error: linux/tls.h: No such file or directory > #include <linux/tls.h> > ^ > 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