summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_btf_haskv.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-07-29 07:02:21 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-29 07:02:21 +0300
commit958b4cd8fa4c2eff0c257b07f2bb753b7c7a6f52 (patch)
treecc6a3a903383ded1ab81996266098a5a4beedea8 /tools/testing/selftests/bpf/test_btf_haskv.c
parentb0753408aadf32c7ece9e6b765017881e54af833 (diff)
parent71eb5255f55bdb484d35ff7c9a1803f453dfbf82 (diff)
downloadlinux-958b4cd8fa4c2eff0c257b07f2bb753b7c7a6f52.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says: ==================== pull-request: bpf 2018-07-28 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) API fixes for libbpf's BTF mapping of map key/value types in order to make them compatible with iproute2's BPF_ANNOTATE_KV_PAIR() markings, from Martin. 2) Fix AF_XDP to not report POLLIN prematurely by using the non-cached consumer pointer of the RX queue, from Björn. 3) Fix __xdp_return() to check for NULL pointer after the rhashtable lookup that retrieves the allocator object, from Taehee. 4) Fix x86-32 JIT to adjust ebp register in prologue and epilogue by 4 bytes which got removed from overall stack usage, from Wang. 5) Fix bpf_skb_load_bytes_relative() length check to use actual packet length, from Daniel. 6) Fix uninitialized return code in libbpf bpf_perf_event_read_simple() handler, from Thomas. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_btf_haskv.c')
-rw-r--r--tools/testing/selftests/bpf/test_btf_haskv.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/testing/selftests/bpf/test_btf_haskv.c b/tools/testing/selftests/bpf/test_btf_haskv.c
index 8c7ca096ecf2..b21b876f475d 100644
--- a/tools/testing/selftests/bpf/test_btf_haskv.c
+++ b/tools/testing/selftests/bpf/test_btf_haskv.c
@@ -10,11 +10,6 @@ struct ipv_counts {
unsigned int v6;
};
-typedef int btf_map_key;
-typedef struct ipv_counts btf_map_value;
-btf_map_key dumm_key;
-btf_map_value dummy_value;
-
struct bpf_map_def SEC("maps") btf_map = {
.type = BPF_MAP_TYPE_ARRAY,
.key_size = sizeof(int),
@@ -22,6 +17,8 @@ struct bpf_map_def SEC("maps") btf_map = {
.max_entries = 4,
};
+BPF_ANNOTATE_KV_PAIR(btf_map, int, struct ipv_counts);
+
struct dummy_tracepoint_args {
unsigned long long pad;
struct sock *sock;