diff options
author | Weqaar Janjua <weqaar.janjua@gmail.com> | 2020-12-08 00:53:31 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-12-09 18:44:45 +0300 |
commit | 9103a8594d9324d8e1512442ba580e4e91d42c2d (patch) | |
tree | 4a880824b12765b2bac99a2af13a7d50f6f76c9f /tools/testing/selftests/bpf/test_xsk.sh | |
parent | facb7cb2e909ad2d21ebbfdc051726d4cd8f1d35 (diff) | |
download | linux-9103a8594d9324d8e1512442ba580e4e91d42c2d.tar.xz |
selftests/bpf: Xsk selftests - DRV POLL, NOPOLL
Adds following tests:
2. AF_XDP DRV/Native mode
Works on any netdevice with XDP_REDIRECT support, driver dependent.
Processes packets before SKB allocation. Provides better performance
than SKB. Driver hook available just after DMA of buffer descriptor.
a. nopoll
b. poll
* Only copy mode is supported because veth does not currently support
zero-copy mode
Signed-off-by: Weqaar Janjua <weqaar.a.janjua@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Yonghong Song <yhs@fb.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Link: https://lore.kernel.org/bpf/20201207215333.11586-4-weqaar.a.janjua@intel.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_xsk.sh')
-rwxr-xr-x | tools/testing/selftests/bpf/test_xsk.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh index 0b7bafb65f43..aad8065637fd 100755 --- a/tools/testing/selftests/bpf/test_xsk.sh +++ b/tools/testing/selftests/bpf/test_xsk.sh @@ -173,6 +173,30 @@ retval=$? test_status $retval "${TEST_NAME}" statusList+=($retval) +### TEST 4 +TEST_NAME="DRV NOPOLL" + +vethXDPnative ${VETH0} ${VETH1} ${NS1} + +params=("-N") +execxdpxceiver params + +retval=$? +test_status $retval "${TEST_NAME}" +statusList+=($retval) + +### TEST 5 +TEST_NAME="DRV POLL" + +vethXDPnative ${VETH0} ${VETH1} ${NS1} + +params=("-N" "-p") +execxdpxceiver params + +retval=$? +test_status $retval "${TEST_NAME}" +statusList+=($retval) + ## END TESTS cleanup_exit ${VETH0} ${VETH1} ${NS1} |