• Willem de Bruijn's avatar
    bpf: add bpf_skb_adjust_room encap flags · 868d5235
    Willem de Bruijn authored
    When pushing tunnel headers, annotate skbs in the same way as tunnel
    devices.
    
    For GSO packets, the network stack requires certain fields set to
    segment packets with tunnel headers. gro_gse_segment depends on
    transport and inner mac header, for instance.
    
    Add an option to pass this information.
    
    Remove the restriction on len_diff to network header length, which
    is too short, e.g., for GRE protocols.
    
    Changes
      v1->v2:
      - document new flags
      - BPF_F_ADJ_ROOM_MASK moved
      v2->v3:
      - BPF_F_ADJ_ROOM_ENCAP_L3_MASK moved
    Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    868d5235
bpf.h 123 KB