linux_dsm_epyc7002/drivers/net/ethernet/mellanox
David S. Miller 1eba1110f0 mlx5-updates-2020-05-26
Updates highlights:
 
 1) From Vu Pham (8): Support VM traffics failover with bonded VF
 representors and e-switch egress/ingress ACLs
 
 This series introduce the support for Virtual Machine running I/O
 traffic over direct/fast VF path and failing over to slower
 paravirtualized path using the following features:
 
      __________________________________
     |  VM      _________________        |
     |          |FAILOVER device |       |
     |          |________________|       |
     |                  |                |
     |              ____|_____           |
     |              |         |          |
     |       ______ |___  ____|_______   |
     |       |  VF PT  |  |VIRTIO-NET |  |
     |       | device  |  | device    |  |
     |       |_________|  |___________|  |
     |___________|______________|________|
                 |              |
                 | HYPERVISOR   |
                 |          ____|______
                 |         |  macvtap  |
                 |         |virtio BE  |
                 |         |___________|
                 |               |
                 |           ____|_____
                 |           |host VF  |
                 |           |_________|
                 |               |
            _____|______    _____|_____
            |  PT VF    |  |  host VF  |
            |representor|  |representor|
            |___________|  |___________|
                 \               /
                  \             /
                   \           /
                    \         /                     _________________
                     \_______/                     |                |
                  _______|________                 |    V-SWITCH    |
                 |VF representors |________________|      (OVS)     |
                 |      bond      |                |________________|
                 |________________|                        |
                                                   ________|________
                                                  |    Uplink       |
                                                  |  representor    |
                                                  |_________________|
 
 Summary:
 --------
 Problem statement:
 ------------------
 Currently in above topology, when netfailover device is configured using
 VFs and eswitch VF representors, and when traffic fails over to stand-by
 VF which is exposed using macvtap device to guest VM, eswitch fails to
 switch the traffic to the stand-by VF representor. This occurs because
 there is no knowledge at eswitch level of the stand-by representor
 device.
 
 Solution:
 ---------
 Using standard bonding driver, a bond netdevice is created over VF
 representor device which is used for offloading tc rules.
 Two VF representors are bonded together, one for the passthrough VF
 device and another one for the stand-by VF device.
 With this solution, mlx5 driver listens to the failover events
 occuring at the bond device level to failover traffic to either of
 the active VF representor of the bond.
 
 a. VM with netfailover device of VF pass-thru (PT) device and virtio-net
    paravirtualized device with same MAC-address to handle failover
    traffics at VM level.
 
 b. Host bond is active-standby mode, with the lower devices being the VM
    VF PT representor, and the representor of the 2nd VF to handle
    failover traffics at Hypervisor/V-Switch OVS level.
    - During the steady state (fast datapath): set the bond active
      device to be the VM PT VF representor.
    - During failover: apply bond failover to the second VF representor
      device which connects to the VM non-accelerated path.
 
 c. E-Switch ingress/egress ACL tables to support failover traffics at
    E-Switch level
    I. E-Switch egress ACL with forward-to-vport rule:
      - By default, eswitch vport egress acl forward packets to its
        counterpart NIC vport.
      - During port failover, the egress acl forward-to-vport rule will
        be added to e-switch vport of passive/in-active slave VF
 representor
        to forward packets to other e-switch vport ie. the active slave
        representor's e-switch vport to handle egress "failover"
 traffics.
      - Using lower change netdev event to detect a representor is a
        lower
        dev (slave) of bond and becomes active, adding egress acl
        forward-to-vport rule of all other slave netdevs to forward to
 this
        representor's vport.
      - Using upper change netdev event to detect a representor unslaving
        from bond device to delete its vport's egress acl forward-to-vport
        rule.
 
    II. E-Switch ingress ACL metadata reg_c for match
      - Bonded representors' vorts sharing tc block have the same
        root ingress acl table and a unique metadata for match.
      - Traffics from both representors's vports will be tagged with same
        unique metadata reg_c.
      - Using upper change netdev event to detect a representor
        enslaving/unslaving from bond device to setup shared root ingress
        acl and unique metadata.
 
 2) From Alex Vesker (2): Slpit RX and TX lock for parallel rule insertion in
 software steering
 
 3) Eli Britstein (2): Optimize performance for IPv4/IPv6 ethertype use the HW
 ip_version register rather than parsing eth frames for ethertype.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEGhZs6bAKwk/OTgTpSD+KveBX+j4FAl7PEFAACgkQSD+KveBX
 +j4Z5Af+NYwihYZpQYBBN00K7Wu10XZ65u5MbGSDmzpdN62w0kKfjsJ70bb9aiws
 h8LC7lspdMLRMMn9pWwFKshyF6RoSD9Ku3ZYhUbtj+hJLElAd9IwGt6pPKr8hPDd
 9h+ZcBkacdhNwWKf7CKThic0c/0PLdVyzRysHxcQWKSMPCTdgiL5Z3PQHA0TM6J3
 6Excs2z7kSuuyyxQ1cyWCaqSz4rqCrYyd8Ws4HOPhXgSbX14Q3mtMsBDayx2gHNW
 rdVbaNN6s2o0TxbrCwd0AaNP3UWcnjNqu1ohxgJiSe8y+MHMoB0OMoO+6vQJnwNI
 bzpZEioswV1zdgK3qNmXqbHOiHRSVQ==
 =xM1D
 -----END PGP SIGNATURE-----

Merge tag 'mlx5-updates-2020-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5-updates-2020-05-26

Updates highlights:

1) From Vu Pham (8): Support VM traffics failover with bonded VF
representors and e-switch egress/ingress ACLs

This series introduce the support for Virtual Machine running I/O
traffic over direct/fast VF path and failing over to slower
paravirtualized path using the following features:

     __________________________________
    |  VM      _________________        |
    |          |FAILOVER device |       |
    |          |________________|       |
    |                  |                |
    |              ____|_____           |
    |              |         |          |
    |       ______ |___  ____|_______   |
    |       |  VF PT  |  |VIRTIO-NET |  |
    |       | device  |  | device    |  |
    |       |_________|  |___________|  |
    |___________|______________|________|
                |              |
                | HYPERVISOR   |
                |          ____|______
                |         |  macvtap  |
                |         |virtio BE  |
                |         |___________|
                |               |
                |           ____|_____
                |           |host VF  |
                |           |_________|
                |               |
           _____|______    _____|_____
           |  PT VF    |  |  host VF  |
           |representor|  |representor|
           |___________|  |___________|
                \               /
                 \             /
                  \           /
                   \         /                     _________________
                    \_______/                     |                |
                 _______|________                 |    V-SWITCH    |
                |VF representors |________________|      (OVS)     |
                |      bond      |                |________________|
                |________________|                        |
                                                  ________|________
                                                 |    Uplink       |
                                                 |  representor    |
                                                 |_________________|

Summary:
--------
Problem statement:
------------------
Currently in above topology, when netfailover device is configured using
VFs and eswitch VF representors, and when traffic fails over to stand-by
VF which is exposed using macvtap device to guest VM, eswitch fails to
switch the traffic to the stand-by VF representor. This occurs because
there is no knowledge at eswitch level of the stand-by representor
device.

Solution:
---------
Using standard bonding driver, a bond netdevice is created over VF
representor device which is used for offloading tc rules.
Two VF representors are bonded together, one for the passthrough VF
device and another one for the stand-by VF device.
With this solution, mlx5 driver listens to the failover events
occuring at the bond device level to failover traffic to either of
the active VF representor of the bond.

a. VM with netfailover device of VF pass-thru (PT) device and virtio-net
   paravirtualized device with same MAC-address to handle failover
   traffics at VM level.

b. Host bond is active-standby mode, with the lower devices being the VM
   VF PT representor, and the representor of the 2nd VF to handle
   failover traffics at Hypervisor/V-Switch OVS level.
   - During the steady state (fast datapath): set the bond active
     device to be the VM PT VF representor.
   - During failover: apply bond failover to the second VF representor
     device which connects to the VM non-accelerated path.

c. E-Switch ingress/egress ACL tables to support failover traffics at
   E-Switch level
   I. E-Switch egress ACL with forward-to-vport rule:
     - By default, eswitch vport egress acl forward packets to its
       counterpart NIC vport.
     - During port failover, the egress acl forward-to-vport rule will
       be added to e-switch vport of passive/in-active slave VF
representor
       to forward packets to other e-switch vport ie. the active slave
       representor's e-switch vport to handle egress "failover"
traffics.
     - Using lower change netdev event to detect a representor is a
       lower
       dev (slave) of bond and becomes active, adding egress acl
       forward-to-vport rule of all other slave netdevs to forward to
this
       representor's vport.
     - Using upper change netdev event to detect a representor unslaving
       from bond device to delete its vport's egress acl forward-to-vport
       rule.

   II. E-Switch ingress ACL metadata reg_c for match
     - Bonded representors' vorts sharing tc block have the same
       root ingress acl table and a unique metadata for match.
     - Traffics from both representors's vports will be tagged with same
       unique metadata reg_c.
     - Using upper change netdev event to detect a representor
       enslaving/unslaving from bond device to setup shared root ingress
       acl and unique metadata.

2) From Alex Vesker (2): Slpit RX and TX lock for parallel rule insertion in
software steering

3) Eli Britstein (2): Optimize performance for IPv4/IPv6 ethertype use the HW
ip_version register rather than parsing eth frames for ethertype.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-28 11:04:12 -07:00
..
mlx4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-24 13:47:27 -07:00
mlx5/core net/mlx5: DR, Split RX and TX lock for parallel insertion 2020-05-27 18:13:52 -07:00
mlxfw net/mlxfw: Remove unneeded semicolon 2020-04-24 16:56:22 -07:00
mlxsw mlxsw: spectrum_router: remove redundant initialization of pointer br_dev 2020-05-27 11:23:27 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00