History log of /external/linux-kselftest/tools/testing/selftests/bpf/sockmap_parse_prog.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
81ba4e1ac4f1d3e9d980ca0f003dd3038559b3fa 29-Oct-2017 Alexei Starovoitov <ast@fb.com> selftests/bpf: remove useless bpf_trace_printk

sockmap test is using two programs that use bpf_trace_printk()
which prints into trace_pipe, but nothing is reading it.
Remove it.

Fixes: 6f6d33f3b3d0 ("bpf: selftests add sockmap tests")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
/external/linux-kselftest/tools/testing/selftests/bpf/sockmap_parse_prog.c
6fd28865c2a7e5ea12cb1f7ef3edee5a2042905e 28-Aug-2017 John Fastabend <john.fastabend@gmail.com> bpf: additional sockmap self tests

Add some more sockmap tests to cover,

- forwarding to NULL entries
- more than two maps to test list ops
- forwarding to different map

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
/external/linux-kselftest/tools/testing/selftests/bpf/sockmap_parse_prog.c
464bc0fd6273d518aee79fbd37211dd9bc35d863 28-Aug-2017 John Fastabend <john.fastabend@gmail.com> bpf: convert sockmap field attach_bpf_fd2 to type

In the initial sockmap API we provided strparser and verdict programs
using a single attach command by extending the attach API with a the
attach_bpf_fd2 field.

However, if we add other programs in the future we will be adding a
field for every new possible type, attach_bpf_fd(3,4,..). This
seems a bit clumsy for an API. So lets push the programs using two
new type fields.

BPF_SK_SKB_STREAM_PARSER
BPF_SK_SKB_STREAM_VERDICT

This has the advantage of having a readable name and can easily be
extended in the future.

Updates to samples and sockmap included here also generalize tests
slightly to support upcoming patch for multiple map support.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
/external/linux-kselftest/tools/testing/selftests/bpf/sockmap_parse_prog.c
6f6d33f3b3d0f53799d120d28abd13ad90041549 16-Aug-2017 John Fastabend <john.fastabend@gmail.com> bpf: selftests add sockmap tests

This generates a set of sockets, attaches BPF programs, and sends some
simple traffic using basic send/recv pattern. Additionally, we do a bunch
of negative tests to ensure adding/removing socks out of the sockmap fail
correctly.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/external/linux-kselftest/tools/testing/selftests/bpf/sockmap_parse_prog.c