Skip to content
  • Or Gerlitz's avatar
    net/mlx5: Disable RoCE on the e-switch management port under switchdev mode · 9da34cd3
    Or Gerlitz authored
    Under the switchdev/offloads mode, packets that don't match any
    e-switch steering rule are sent towards the e-switch management
    port. We use a NIC HW steering rule set per vport (uplink and VFs)
    to make them be received into the host OS through the respective
    vport representor netdevice.
    
    Currnetly such missed RoCE packets will not get to this NIC steering
    rule, and hence VF RoCE will not work over the slow path of the offloads
    mode. This is b/c these packets will be matched by a steering rule added
    by the firmware that serves RoCE traffic set on the PF NIC vport which
    is also the e-switch management port under SRIOV.
    
    Disabling RoCE on the e-switch management vport when we are in the offloads
    mode, will signal to the firmware to remove their RoCE rule, and then the
    missed RoCE packets will be matched by the representor NIC steering rule
    as any other missed packets.
    
    To achieve that, we disable RoCE on the PF vport. We do that by removing
    (hot-unplugging) the IB device instance associated with the PF. This is
    also required by our current model where the PF serves as the uplink
    representor and hence only SW switching (TC, bridge, OVS) applications
    and slow path vport mlx5e net-device should be running over that vport.
    
    Fixes: c930a3ad
    
     ('net/mlx5e: Add devlink based SRIOV mode changes')
    Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
    Reviewed-by: default avatarHadar Hen Zion <hadarh@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9da34cd3