selftests/bpf: Fix kfree_skb on s390x
authorIlya Leoshkevich <iii@linux.ibm.com>
Sat, 28 Jan 2023 00:06:25 +0000 (01:06 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 28 Jan 2023 20:30:08 +0000 (12:30 -0800)
commit31da9be64a1136e5699a1fc59a45001d6b98acdc
tree48c9b4f5dd217bba298ee26b2c2890545f1e562f
parent6eab2370d142cdfe853d168881b0d4abd3c6f7a6
selftests/bpf: Fix kfree_skb on s390x

h_proto is big-endian; use htons() in order to make comparison work on
both little- and big-endian machines.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-7-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/kfree_skb.c