You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We support a fair amount of linux map types already, however BPF_MAP_LPM_TRIE is missing. This map type is a trie(prefix tree) with some unique features to complement its intended use, best described in the code itself. TLDR.: It is a tree with keys that contain both a value and prefix/mask length. It does bit level comparison on the key value and picks the next child node to traverse based on the value of the bit, like a binary tree.
I was unable to find a library which is both generic(works with []byte up to 256 bytes long), does longest prefix matching, compares on bits and not whole bytes and has a sparse data representation. So we will have to write our own based on the C code of linux.
Another issue to take into account is how we will be registering the nodes in the memory controller, there are two approaches here:
Register each individual node as its own memory entry, easy to implement, makes the memory overview very noisy and makes a lot of records.
Take the hash approach, maintain a PlainMemory buffer which will be used as an array, maintain a freelist of addresses to be used and store the addresses in the tree. This is more overhead and complexer to implement, it also makes the memory controller listing and fragmentation less.
The text was updated successfully, but these errors were encountered:
We support a fair amount of linux map types already, however BPF_MAP_LPM_TRIE is missing. This map type is a trie(prefix tree) with some unique features to complement its intended use, best described in the code itself. TLDR.: It is a tree with keys that contain both a value and prefix/mask length. It does bit level comparison on the key value and picks the next child node to traverse based on the value of the bit, like a binary tree.
I was unable to find a library which is both generic(works with []byte up to 256 bytes long), does longest prefix matching, compares on bits and not whole bytes and has a sparse data representation. So we will have to write our own based on the C code of linux.
Another issue to take into account is how we will be registering the nodes in the memory controller, there are two approaches here:
The text was updated successfully, but these errors were encountered: