Skip to content

Conversation

@netoptimizer
Copy link
Member

This is a rebase of PR #73 which had a conflict with submodule system.

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 <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
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 <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
@netoptimizer
Copy link
Member Author

Did some basic manual testing and it seems to work

@netoptimizer netoptimizer merged commit 9ee02ae into master Nov 15, 2020
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