]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: fix test_cgroup_storage on s390
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 20 Aug 2019 14:18:04 +0000 (16:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Aug 2019 14:55:01 +0000 (16:55 +0200)
commitd1b0461f6ae49fdc6b0ccb6198a09fd8f2eb80f9
tree89ddc3887e2ad377bb61e6f503ee2f5d796b9504
parentd43e85186db87a8af54c9cc9fa35d0863b07127b
selftests/bpf: fix test_cgroup_storage on s390

test_cgroup_storage fails on s390 with an assertion failure: packets are
dropped when they shouldn't. The problem is that BPF_DW packet count is
accessed as BPF_W with an offset of 0, which is not correct on
big-endian machines.

Since the point of this test is not to verify narrow loads/stores,
simply use BPF_DW when working with packet counts.

Fixes: 8aeace6f7443 ("selftests/bpf: add a cgroup storage test")
Fixes: 01f185f45e04 ("selftests/bpf: extend the storage test to test per-cpu cgroup storage")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_cgroup_storage.c