Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BPF_TABLE_SHARED do not support edit flags for the BPF_TABLE_T behind it #5044

Open
evilsp opened this issue Jun 27, 2024 · 6 comments
Open

Comments

@evilsp
Copy link
Contributor

evilsp commented Jun 27, 2024

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

@yonghong-song
Copy link
Collaborator

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.

@evilsp
Copy link
Contributor Author

evilsp commented Jul 5, 2024

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?

@yonghong-song
Copy link
Collaborator

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.

@evilsp
Copy link
Contributor Author

evilsp commented Jul 5, 2024

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.

@yonghong-song
Copy link
Collaborator

could you submit a pull request for that?

@evilsp
Copy link
Contributor Author

evilsp commented Jul 5, 2024

Have submitted:#5053

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants