Re: How to calculate the actual size of the memory occupied by the map in the bpf program?

越峰裴 <[email protected]> Fri, 28 Jul 2023 11:51:32 +0800
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <CA+hDufCfhfrnDKkuNG=exYqDOCR0QiAPoagzbLwwYZPa_+282w@mail.gmail.com>
 The value of memlock can be seen through bpftool map, but this number
is not the actual size of the map, but only the data size of key and
value.

 Is there any way to estimate the actual size of the map in memory
based on the size of max_entries and key|value?

 Is there any way to know the actual size of each map in the current
xdp program?

 Best Regards
 Dalu Pay