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

Tutorial planned improvements to parsing #73

Closed
wants to merge 3 commits into from

Conversation

netoptimizer
Copy link
Member

Going to LPC2019 very soon...

I didn't finish this work, so I'll just store the branch and create a PR so I don't forget about this ;-)
I'm not quite ready to merge this, as I've not tested it and even convinced myself this is a good idea.

Given XDP is very performance focused, it is unwise to default
parse many VLAN layers.  Those 2 as it is very uncommon to have more.

Signed-off-by: Jesper Dangaard Brouer <[email protected]>
This is based on same function from packet-solutions/xdp_vlan02_kern.c
that also extracts VLANs.

It needs to be removed from packet-solutions/xdp_vlan02_kern.c, but
for now its just ifdef defined out-of-code.  Need to run some tests
and look at BPF byte-code to make sure it does the right thing.

The original parse_ethhdr() is implemented by calling parse_ethhdr_vlan()
with NULL argument for stucture to collect IDs into.  The compiler
should remove the parts that are not needed.

Signed-off-by: Jesper Dangaard Brouer <[email protected]>
@netoptimizer netoptimizer self-assigned this Sep 6, 2019
@netoptimizer
Copy link
Member Author

Hmmm... why does this PR also contain libbpf changes???

Perhaps, this is why I had funny issues in #72, they could likely happen when I was switching between branches?

@tohojo
Copy link
Member

tohojo commented Sep 6, 2019

Guess you accidentally did a 'git add libbpf' somewhere? :)

@netoptimizer
Copy link
Member Author

PR #168 is taking over from this PR.

netoptimizer added a commit that referenced this pull request Nov 15, 2020
…ebase01.public

Tutorial improve parsing of VLANs (rebased #73)
@netoptimizer
Copy link
Member Author

Fixed in #168

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

Successfully merging this pull request may close these issues.

2 participants