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 improve parsing of VLANs (rebased #73) #168

Merged
merged 5 commits into from
Nov 15, 2020

Commits on Nov 15, 2020

  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 Nov 15, 2020
    Configuration menu
    Copy the full SHA
    ec2be4e View commit details
    Browse the repository at this point in the history
  2. packet-solutions: xdp_vlan02_kern VLAN extraction missed bpf_ntohs()

    Signed-off-by: Jesper Dangaard Brouer <[email protected]>
    netoptimizer committed Nov 15, 2020
    Configuration menu
    Copy the full SHA
    ffba649 View commit details
    Browse the repository at this point in the history
  3. 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 Nov 15, 2020
    Configuration menu
    Copy the full SHA
    fb079b1 View commit details
    Browse the repository at this point in the history
  4. packet-solutions: Change struct name and improve some comments

    Signed-off-by: Jesper Dangaard Brouer <[email protected]>
    netoptimizer committed Nov 15, 2020
    Configuration menu
    Copy the full SHA
    61702d6 View commit details
    Browse the repository at this point in the history
  5. packet-solutions: Explain value of eth_type and where eth points

    Signed-off-by: Jesper Dangaard Brouer <[email protected]>
    netoptimizer committed Nov 15, 2020
    Configuration menu
    Copy the full SHA
    2bb3dbc View commit details
    Browse the repository at this point in the history