bcc
bcc copied to clipboard
Is there a reason for no BPF_LRU_HASH macro?
There seem to be map type specific macros for most(?) of the other map types BPF_HASH, BPF_ARRAY, BPF_LPM_TRIE etc. But not for BPF_LRU_HASH. Is there a reason, or would you like a PR?
Your PR is welcome. The only reason is BPF_LRU_HASH is less used and people have not submitted PR yet.
Does BPF_LRU_HASH will support in the feature?
BPF_HASH and the others are higher level wrappers that use BPF_TABLE. You can declare a BPF_LRU_HASH using:
BPF_TABLE("lru_hash", key_type, value_type, map_name, hash_size);
BPF_TABLE is documented in bcc's reference guide.