On Sun, Nov 17, 2024 at 4:56 PM Hou Tao <houtao@xxxxxxxxxxxxxxx> wrote: > > > +enum { > + LPM_TRIE_MA_IM = 0, > + LPM_TRIE_MA_LEAF, > + LPM_TRIE_MA_CNT, > +}; > + > struct lpm_trie { > struct bpf_map map; > struct lpm_trie_node __rcu *root; > + struct bpf_mem_alloc ma[LPM_TRIE_MA_CNT]; > + struct bpf_mem_alloc *im_ma; > + struct bpf_mem_alloc *leaf_ma; We cannot use bpf_ma-s liberally like that. Freelists are not huge, but we shouldn't be adding new bpf_ma in every map and every use case. bpf_mem_cache_is_mergeable() in the previous patch also leaks implementation details. Can you use bpf_global_ma for all nodes? pw-bot: cr