• John Hurley's avatar
    nfp: flower: push vlan after tunnel in merge · 4b10c53d
    John Hurley authored
    NFP allows the merging of 2 flows together into a single offloaded flow.
    In the kernel datapath the packet must match 1 flow, impliment its
    actions, recirculate, match the 2nd flow and also impliment its actions.
    Merging creates a single flow with all actions from the 2 original flows.
    
    Firmware impliments a tunnel header push as the packet is about to egress
    the card. Therefore, if the first merge rule candiate pushes a tunnel,
    then the second rule can only have an egress action for a valid merge to
    occur (or else the action ordering will be incorrect). This prevents the
    pushing of a tunnel header followed by the pushing of a vlan header.
    
    In order to support this behaviour, firmware allows VLAN information to
    be encoded in the tunnel push action. If this is non zero then the fw will
    push a VLAN after the tunnel header push meaning that 2 such flows with
    these actions can be merged (with action order being maintained).
    
    Support tunnel in VLAN pushes by encoding VLAN information in the tunnel
    push action of any merge flow requiring this.
    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>
    4b10c53d
offload.c 42.8 KB