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

Commits on Sep 3, 2019

  1. common: parsing_headers.h reduce default VLAN depth to 2

    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]>
    netoptimizer committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    f6e2e65 View commit details
    Browse the repository at this point in the history
  2. packet-solutionsi xdp_vlan02_kern VLAN extraction missed bpf_ntohs()

    Signed-off-by: Jesper Dangaard Brouer <[email protected]>
    netoptimizer committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    3d4bd92 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2019

  1. Create parse_ethhdr_vlan() in parsing_helpers.h

    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 committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    c2b44a2 View commit details
    Browse the repository at this point in the history