• Dima Chumak's avatar
    net/mlx5: Introduce software defined steering capabilities · 8348b71c
    Dima Chumak authored
    There are two different internal steering modes, abstracted from the
    rest of the driver. In order to keep upper layer of the driver agnostic
    to the differences in capabilities of the steering modes, this patch
    introduces mlx5_fs_get_capabilities() API to check if a certain software
    defined capability is supported. It differs from the capabilities
    exposed by the hardware, as it takes into account the flow steering mode
    (SMFS/DMFS) currently enabled.
    
    This implementation supports only two capability flags:
    
      MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX
      MLX5_FLOW_STEERING_CAP_VLAN_POP_ON_TX
    
    They map to DR_ACTION_STATE_PUSH_VLAN and DR_ACTION_STATE_POP_VLAN
    actions, implemented in SW steering earlier in commit f5e22be5
    ("net/mlx5: DR, Split modify VLAN state to separate pop/push states").
    Which enables using of pop/push vlan without restrictions, e.g. doing
    vlan pop on TX and RX, compared to FW steering that supports only vlan
    pop on RX and push on TX.
    
    Other capabilities can be added in the future.
    Signed-off-by: default avatarDima Chumak <dchumak@nvidia.com>
    Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
    Reviewed-by: default avatarYevgeny Kliteynik <kliteyn@nvidia.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    8348b71c
fs_dr.c 21.2 KB