]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: add checks on extack messages for eBPF hw offload tests
authorQuentin Monnet <quentin.monnet@netronome.com>
Tue, 23 Jan 2018 19:22:53 +0000 (11:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jan 2018 01:24:31 +0000 (20:24 -0500)
commitd815c0650e7350f425ba51e0fa6dd5e53aa9ff01
tree95e8ba486548979c4613c0c68b040ace36458d57
parent0e150098edea37401af636d4153d26fb34eb5c38
selftests/bpf: add checks on extack messages for eBPF hw offload tests

Add checks to test that netlink extack messages are correctly displayed
in some expected error cases for eBPF offload to netdevsim with TC and
XDP.

iproute2 may be built without libmnl support, in which case the extack
messages will not be reported.  Try to detect this condition, and when
enountered print a mild warning to the user and skip the extack validation.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/test_offload.py