-
Notifications
You must be signed in to change notification settings - Fork 349
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
Useless while() in pfring_parse_pkt code #57
Comments
Actually in my experience I've never seen more than two tags in a single frame, |
Double tagged frame is ok for extracting IP addresses Of course MTU is the key for making as much tags as you wish. But if you run three tags - it means you have transit VLAN with QinQ enabled and your customer runs his own QinQ. In this case you don't need to know what traffic he runs. (0x8100 as ethertype is the most common, but it should be remembered that 0x8100 is not the only one option) |
And in case of nested vlan (QnQ) we need separate field (for example: outer_vlan) for storing external vlan number. |
It makes sense. Pavel if you have a patch, please send a pull request. Please pay attention to backward compatibility (i.e. an outer_vlan_id field is fine, rather than inner_vlan_id, in addition to the current vlan_id) |
Hi Pavel, Could you please help me to find out the patch supporting QinQ in pf_ring. Thanks, |
Hello! I havent tried to implement this code because it's pretty complex. On Tuesday, 10 May 2016, vasubabukandimalla notifications@github.com
Sincerely yours, Pavel Odintsov |
Hello! And this issue hit us again :) So, as I mentioned before we still need to add additional code to handle QnQ properly and this code depends on vendor's implementation. For this purposes, we need to modify your code for each vendor and use custom version for each one. But the library is licensed under GPLv2 terms and it's incompatible with commercial/closed source code. And we could not do it :( Maybe you could unify this code some way to export such interfaces or offer another license for code in this particular file/function? Thanks! |
Hello, folks!
I'm playing with parser code and have question about while loop here:
PF_RING/userland/lib/pfring_utils.c
Line 224 in 57b553b
I know about vlan frames and nested vlan tags (QnQ) but I haven't idea about triple nested vlan tags. And in this case while loop is useless and could be replaced with if condition.
What do you think about it?
I'm asking this because loop and condition variable are not equal in case if performance evaluation and loops much times harder to predict for CPU.
The text was updated successfully, but these errors were encountered: