• John Hurley's avatar
    nfp: flower: offload pre-tunnel rules · f12725d9
    John Hurley authored
    Pre-tunnel rules are TC flower and OvS rules that forward a packet to the
    tunnel end point where it can then pass through the network stack and be
    decapsulated. These are required if the tunnel end point is, say, an OvS
    internal port.
    
    Currently, firmware determines that a packet is in a tunnel and decaps it
    if it has a known destination IP and MAC address. However, this bypasses
    the flower pre-tunnel rule and so does not update the stats. Further to
    this it ignores VLANs that may exist outside of the tunnel header.
    
    Offload pre-tunnel rules to the NFP. This embeds the pre-tunnel rule into
    the tunnel decap process based on (firmware) mac index and VLAN. This
    means that decap can be carried out correctly with VLANs and that stats
    can be updated for all kernel rules correctly.
    Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
    Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
    Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f12725d9
main.c 23 KB