-
Notifications
You must be signed in to change notification settings - Fork 26
compiler support for range lookup #115
Comments
We do not support ternary lookups either. Range lookups could be converted to ternary lookups. Bpf has no range maps as far as I know. |
Is there a way to iterate over each entry in the BPF map. With that, I think I can solve my problem. |
You can iterate in user space, but not in the kernel. |
Okay, thanks. |
Is there any other way to implement range matching, as i want to use the priority of rules also. |
If you can give an example of how you would do it in raw ebpf perhaps we can implement it in the compiler. |
|
In raw ebpf, I was thinking to iterate over the MAP using bpf_get_next_key. And then for each key, get the whole element if key matches the current packet data using lookup or any other method. Also while iterating, compare it with previously matched rules. |
You cannot write loops in ebpf programs. Bounded loops are considered, but i don't think iteration over map entries will ever be supported. Anyway, if you want fast packet processing you don't have time for loops. |
Ok, Thanks |
Hi,
Could this compiler support range for looking up key(just like bmv2)?
The text was updated successfully, but these errors were encountered: