• Paul Blakey's avatar
    net/mlx5e: Restore tunnel metadata on miss · b8ce9037
    Paul Blakey authored
    In tunnel and chains setup, we decapsulate the packets on first chain hop,
    if we miss on later chains, the packet will comes up without tunnel header,
    so it won't be taken by the tunnel device automatically, which fills the
    tunnel metadata, and further tc tunnel matches won't work.
    
    On miss, we get the tunnel mapping id, which was set on the chain 0 rule
    that decapsulated the packet. This rule matched the tunnel outer
    headers. From the tunnel mapping id, we get to this tunnel matches
    and restore the equivalent tunnel info metadata dst on the skb.
    We also set the skb->dev to the relevant device (tunnel device).
    Now further tc processing can be done on the relevant device.
    Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
    Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
    Reviewed-by: default avatarOz Shlomo <ozsh@mellanox.com>
    Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    b8ce9037
en_tc.h 5.08 KB