• Vlad Buslov's avatar
    net/mlx5e: Reorder mirrer action parsing to check for encap first · b6a4ac24
    Vlad Buslov authored
    Mirred action parsing code in parse_tc_fdb_actions() first checks if
    out_dev has same parent id, and only verifies that there is a pending encap
    action that was parsed before. Recent change in vxlan module made function
    netdev_port_same_parent_id() to return true when called for mlx5 eswitch
    representor and vxlan device created explicitly on mlx5 representor
    device (vxlan devices created with "external" flag without explicitly
    specifying parent interface are not affected). With call to
    netdev_port_same_parent_id() returning true, incorrect code path is chosen
    and encap rules fail to offload because vxlan dev is not a valid eswitch
    forwarding dev. Dmesg log of error:
    
    [ 1784.389797] devices ens1f0_0 vxlan1 not on same switch HW, can't offload forwarding
    
    In order to fix the issue, rearrange conditional in parse_tc_fdb_actions()
    to check for pending encap action before checking if out_dev has the same
    parent id.
    
    Fixes: 0ce1822c ("vxlan: add adjacent link to limit depth level")
    Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
    Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    b6a4ac24
en_tc.c 115 KB