-
Notifications
You must be signed in to change notification settings - Fork 906
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
use BPF_MAP_TYPE_LPM_TRIE for range matching #11526
Conversation
Like the size of the three maps specified in |
It might be time to use a table-based approach for these parameters instead? |
Can you elaborate? I didn't understand what you meant. |
Yes, my bad, I should have included an example right away! If you take a look at, for example,
The second one is a lot cleaner but would break compatibility with existing configurations. I'm fine with doing that in 1.8.0 if needed. |
I prefer the second one. Compatibility is necessary, but If we add an optional table for newBPFFilter then newBPFFilter will become:
Or we could merge the 4th parameter with the 5th parameter, but this is also not consistent with the previous program. In this case, let's put all the parameters into the table. |
Agreed, that seems to be the best option! |
Why do we need use different types of value depending on Lines 211 to 246 in 053a020
|
It's quite frustrating! It comes from the limitations on eBPF socket filter programs in older kernels, where the number of eBPF instructions was very limited, so I couldn't get a composite key based qname + qtype to work and had to use that weird construct where the key is the qname only. We could get rid of that on newer kernels, but that would mean that all of a sudden eBPF filtering would not work on older kernels, which I would like to avoid for a bit longer, at least until major distributions no longer support these kernel versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great work, thank you! I have made a few comments and I think there are a couple points we might have to change, but I'm very happy with that pull request 👍
Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
Signed-off-by: Y7n05h <Y7n05h@protonmail.com> Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
Co-authored-by: Remi Gacogne <github@coredump.fr>
Co-authored-by: Remi Gacogne <github@coredump.fr> Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
Signed-off-by: Y7n05h <Y7n05h@protonmail.com> Co-authored-by: Remi Gacogne <github@coredump.fr>
Signed-off-by: Y7n05h <Y7n05h@protonmail.com> Co-authored-by: Remi Gacogne <github@coredump.fr>
Co-authored-by: Remi Gacogne <github@coredump.fr> Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
I did not manage to make it work last time I tried, but I will take the time to test this properly this week. |
I just tested
I think this is a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally managed to test this properly, sorry again it took me so long.
The code is very good, and apart from a couple issues I added comments for it works pretty well. Thanks a lot!
Co-authored-by: Remi Gacogne <github@coredump.fr>
Co-authored-by: Remi Gacogne <github@coredump.fr>
Co-authored-by: Remi Gacogne <github@coredump.fr>
bpf:rmRangeRule bpf:lsRangeRule Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks very good, I made a few comments but my feeling is that is pull request is almost done, nice job!
Co-authored-by: Remi Gacogne <github@coredump.fr>
Co-authored-by: Remi Gacogne <github@coredump.fr>
I missed it but there is a build error when we build without
|
Can you post how you built it? I did not successfully reproduce it. The commands I used is:
|
It's one of the checks in our continuous integration, but the option we are interested in is here is |
Signed-off-by: Y7n05h <Y7n05h@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'm not 100% sure why the documentation is failing to build but I suggested a few changes that might help.
Co-authored-by: Remi Gacogne <github@coredump.fr>
Co-authored-by: Remi Gacogne <github@coredump.fr>
Co-authored-by: Remi Gacogne <github@coredump.fr>
The latest CI failure is unrelated to this PR (Google resolvers were not in a good mood: |
Thanks a lot! |
Short description
#9690
Checklist
I have: