Skip to content

Commit

Permalink
libbpf: Use __u32 fields in bpf_map_create_opts
Browse files Browse the repository at this point in the history
Corresponding Linux UAPI struct uses __u32, not int, so keep it
consistent.

Fixes: 992c422 ("libbpf: Unify low-level map creation APIs w/ new bpf_map_create()")
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
anakryiko authored and Alexei Starovoitov committed Dec 2, 2021
1 parent 8b4ff5f commit 74d9807
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/lib/bpf/bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ struct bpf_map_create_opts {
__u32 btf_value_type_id;
__u32 btf_vmlinux_value_type_id;

int inner_map_fd;
int map_flags;
__u32 inner_map_fd;
__u32 map_flags;
__u64 map_extra;

int numa_node;
int map_ifindex;
__u32 numa_node;
__u32 map_ifindex;
};
#define bpf_map_create_opts__last_field map_ifindex

Expand Down

0 comments on commit 74d9807

Please sign in to comment.