• E
    net/mlx5: Support multiport eswitch mode · 94db3317
    Eli Cohen 提交于
    Multiport eswitch mode is a LAG mode that allows to add rules that
    forward traffic to a specific physical port without being affected by LAG
    affinity configuration.
    
    This mode of operation is mutual exclusive with the other LAG modes used
    by multipath and bonding.
    
    To make the transition between the modes, we maintain a counter on the
    number of rules specifying one of the uplink representors as the target
    of mirred egress redirect action.
    
    An example of such rule would be:
    
    $ tc filter add dev enp8s0f0_0 prot all root flower dst_mac \
      00:11:22:33:44:55 action mirred egress redirect dev enp8s0f0
    
    If the reference count just grows to one and LAG is not in use, we
    create the LAG in multiport eswitch mode. Other mode changes are not
    allowed while in this mode. When the reference count reaches zero, we
    destroy the LAG and let other modes be used if needed.
    
    logic also changed such that if forwarding to some uplink destination
    cannot be guaranteed, we fail the operation so the rule will eventually
    be in software and not in hardware.
    Signed-off-by: NEli Cohen <elic@nvidia.com>
    Reviewed-by: NMark Bloch <mbloch@nvidia.com>
    Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
    94db3317
mlx5_ifc.h 271.1 KB