summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xdp_hw_metadata.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2023-04-12 22:49:00 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-04-13 21:15:11 +0300
commit0f26b74e7d071b0dc18e2c43d79d496c2b144035 (patch)
tree27fc5232d3f0adfc0a960e0971c074fce437a829 /tools/testing/selftests/bpf/xdp_hw_metadata.c
parent9123397aeeb4f93dda5828e37c35312f1b62231e (diff)
downloadlinux-0f26b74e7d071b0dc18e2c43d79d496c2b144035.tar.xz
selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg
Update BPF selftests to use the new RSS type argument for kfunc bpf_xdp_metadata_rx_hash. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/r/168132894068.340624.8914711185697163690.stgit@firesoul Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/xdp_hw_metadata.c')
-rw-r--r--tools/testing/selftests/bpf/xdp_hw_metadata.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/xdp_hw_metadata.c b/tools/testing/selftests/bpf/xdp_hw_metadata.c
index 3b942ef7297b..987cf0db5ebc 100644
--- a/tools/testing/selftests/bpf/xdp_hw_metadata.c
+++ b/tools/testing/selftests/bpf/xdp_hw_metadata.c
@@ -141,7 +141,11 @@ static void verify_xdp_metadata(void *data)
meta = data - sizeof(*meta);
printf("rx_timestamp: %llu\n", meta->rx_timestamp);
- printf("rx_hash: %u\n", meta->rx_hash);
+ if (meta->rx_hash_err < 0)
+ printf("No rx_hash err=%d\n", meta->rx_hash_err);
+ else
+ printf("rx_hash: 0x%X with RSS type:0x%X\n",
+ meta->rx_hash, meta->rx_hash_type);
}
static void verify_skb_metadata(int fd)