less fields required for MAP_CREATE

This commit is contained in:
Özgür Kesim 2020-01-19 02:17:14 +01:00
parent 88f1455dd7
commit 8005624fac

View File

@ -108,13 +108,10 @@ func CreateMap() (MapFD, error) {
*/ */
create_attr := struct { create_attr := struct {
map_type uint32 map_type uint32
key_size uint32 key_size uint32
value_size uint32 value_size uint32
max_entries uint32 max_entries uint32
map_flags uint32
inner_map_fd uint32
// minimum of required fields
}{ }{
map_type: uint32(BPF_MAP_TYPE_HASH), map_type: uint32(BPF_MAP_TYPE_HASH),
key_size: 4, key_size: 4,