* Implemented decoding of hugetlb page size selection flags.
* Enhanced decoding of getsockopt and setsockopt syscalls for SOL_NETLINK
level.
+ * Enhanced decoding of BPF_MAP_CREATE command of bpf syscall.
* Updated lists of MSG_* and SHM_* constants.
Noteworthy changes in release 4.20 (2017-11-13)
{
struct {
uint32_t map_type, key_size, value_size, max_entries,
- map_flags, inner_map_fd;
+ map_flags, inner_map_fd, numa_node;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
PRINT_FIELD_U(", ", attr, max_entries);
PRINT_FIELD_FLAGS(", ", attr, map_flags, bpf_map_flags, "BPF_F_???");
PRINT_FIELD_FD(", ", attr, inner_map_fd, tcp);
+ if (attr.map_flags & BPF_F_NUMA_NODE)
+ PRINT_FIELD_U(", ", attr, numa_node);
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
st_CHECK_UNION_BPF_ATTR([attach_flags])
st_CHECK_UNION_BPF_ATTR([bpf_fd])
st_CHECK_UNION_BPF_ATTR([flags])
- st_CHECK_UNION_BPF_ATTR([inner_map_fd])
+ st_CHECK_UNION_BPF_ATTR([numa_node])
st_CHECK_UNION_BPF_ATTR([prog_flags])
])
&& (defined HAVE_UNION_BPF_ATTR_ATTACH_FLAGS \
|| defined HAVE_UNION_BPF_ATTR_BPF_FD \
|| defined HAVE_UNION_BPF_ATTR_FLAGS \
- || defined HAVE_UNION_BPF_ATTR_INNER_MAP_FD \
+ || defined HAVE_UNION_BPF_ATTR_NUMA_NODE \
|| defined HAVE_UNION_BPF_ATTR_PROG_FLAGS)
# include <stddef.h>
init_ ## cmd_ ## _attr, print_ ## cmd_ ## _attr) \
/* End of TEST_BPF definition. */
-# ifdef HAVE_UNION_BPF_ATTR_INNER_MAP_FD
+# ifdef HAVE_UNION_BPF_ATTR_NUMA_NODE
static unsigned int
init_BPF_MAP_CREATE_first(const unsigned long eop)
.key_size = 4,
.value_size = 8,
.max_entries = 256,
- .map_flags = 1,
- .inner_map_fd = -1
+ .map_flags = 7,
+ .inner_map_fd = -1,
+ .numa_node = 42
};
static const unsigned int offset =
- offsetofend(union bpf_attr, inner_map_fd);
+ offsetofend(union bpf_attr, numa_node);
const unsigned long addr = eop - offset;
memcpy((void *) addr, &attr, offset);
{
printf("map_type=BPF_MAP_TYPE_HASH, key_size=4"
", value_size=8, max_entries=256"
- ", map_flags=BPF_F_NO_PREALLOC, inner_map_fd=-1");
+ ", map_flags=BPF_F_NO_PREALLOC|BPF_F_NO_COMMON_LRU"
+ "|BPF_F_NUMA_NODE, inner_map_fd=-1, numa_node=42");
}
-# endif /* HAVE_UNION_BPF_ATTR_INNER_MAP_FD */
+# endif /* HAVE_UNION_BPF_ATTR_NUMA_NODE */
# ifdef HAVE_UNION_BPF_ATTR_FLAGS
page_size = get_page_size();
end_of_page = (unsigned long) tail_alloc(1) + 1;
-# ifdef HAVE_UNION_BPF_ATTR_INNER_MAP_FD
+# ifdef HAVE_UNION_BPF_ATTR_NUMA_NODE
TEST_BPF(BPF_MAP_CREATE);
# endif