OpenVisualCloud / Media-Transport-Library

A real-time media transport(DPDK, AF_XDP, RDMA) stack for both raw and compressed video based on COTS hardware.
BSD 3-Clause "New" or "Revised" License
155 stars 47 forks source link

xdp: use BPF_MAP_TYPE_HASH for the filter map #896

Closed frankdjx closed 1 month ago

frankdjx commented 1 month ago

BPF_MAP_TYPE_ARRAY size is limited cause udp4_dp_filter_fd update fail(-7)

frankdjx commented 1 month ago

Any document or code about this limit? Why not using bpf_map_delete_elem when removing the udp port from filter?

No. The eBPF map use locked memory, it depends on many runtime factor. Anyway it should avoid to create a huge static eBPF array map.