yanet-platform / yanet

A high performance framework for forwarding traffic based on DPDK
Other
165 stars 17 forks source link

[DataPlane] Allocate GlobalBase internals dynamically #58

Closed GeorgyKirichenko closed 3 months ago

GeorgyKirichenko commented 9 months ago

Dataplane GlobalBase contains a bunch of structures like ACL tables and LPM-trees. Sizes of them are resolved at DataPlane startup using a configured value or hardcoded default and could not be changed while the Dataplane lifetime. Also it could be hard to determine the most appropriate configuration values for suitable for each possible execution environment.

In the other hand DPDK memory allocator consists of some (typically one or two, depends on DPDK defines) contiguous memory regions for each NUMA node. And the sizes of all items are known before the upload to a DataPlane so it looks possible to allocate memory for GlobalBase dynamically on demand from some preallocated common space.

So the main idea of the issue is to configure only the overall space for GlobalBase internals and then write all required structures one after another on configuration upload to a DataPlane.