What map def attributes must match to update an inner map value? #460
-
bpf_map_update_elem can be used to store an inner map in a map of type BPF_MAP_TYPE_ARRAY_OF_MAPS or BPF_MAP_TYPE_HASH_OF_MAPS. Certainly the inner map's type must match that of the template (e.g., via inner_map_idx on older versions of Linux), but what other attributes also must match? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@teknoraver @qmonnet Can you help us answer this? |
Beta Was this translation helpful? Give feedback.
-
Hi all, when inserting a map into a map of maps, the newly inserted map is checked for equality against the first one inserted: bool bpf_map_meta_equal(const struct bpf_map *meta0,
const struct bpf_map *meta1)
{
/* No need to compare ops because it is covered by map_type */
return meta0->map_type == meta1->map_type &&
meta0->key_size == meta1->key_size &&
meta0->value_size == meta1->value_size &&
meta0->map_flags == meta1->map_flags;
} The call chain is:
|
Beta Was this translation helpful? Give feedback.
Hi all,
when inserting a map into a map of maps, the newly inserted map is checked for equality against the first one inserted:
The call chain is: