iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BPF_TABLE_SHARED do not support edit flags for the BPF_TABLE_T behind it

evilsp opened this issue · comments

If possible, could I ask why BPF_TABLE_SHARED doesn't support custom table flags? Are there any design considerations behind this?

What is your use case? If it is indeed necessary in your case, you can extend BPF_TABLE_SHARED with additional parameters similar to BPF_TABLE_PINNED.

I encountered this issue when trying to add an lpm_trie bpf shared table. Although I have implemented this function in a similar way as you described, my question is, since implementing this function is not difficult, why not add a specialized macro instead of having a fixed flag?

I would like to reuse the same macro name instead of adding a new macro. This has been the convention for bcc for a while.

As you mentioned, since there is a preference for using repetitive Macros, why not provide the flag as a parameter in the BPF_TABLE_SHARED macro? This is one of the points I'm curious about as well.

could you submit a pull request for that?

Have submitted:#5053