OSDN Git Service

Merge tag 'mlx5-updates-2021-10-18' of git://git.kernel.org/pub/scm/linux/kernel...
authorDavid S. Miller <davem@davemloft.net>
Tue, 19 Oct 2021 11:16:34 +0000 (12:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Oct 2021 11:16:34 +0000 (12:16 +0100)
commitaaa5570612b1f1b9e4841ec54163bdeec1f451e7
tree835bf67a5762d9359ffcdcdd5609cf1287816593
parent4a6c396e484ea4adfcbee9ff55fea3872cfd92a7
parentd40bfeddacd6b4c05a28e3e8f7cb18989a4e134f
Merge tag 'mlx5-updates-2021-10-18' of git://git./linux/kernel/git/saeed/linux

Saeed Mahameed says:

mlx5-updates-2021-10-18

Maor Maor Gottlieb says:
========================
Use hash to select the affinity port in VF LAG

Current VF LAG architecture is based on QP association with a port.
QP must be created after LAG is enabled to allow association with non-native port.
VM Packets going on slow-path to eSwicth manager (SW path or hairpin) will be transmitted
through a different QP than the VM. This means that Different packets of the same flow might
egress from different physical ports.

This patch-set solves this issue by moving the port selection to be based on the hash function
defined by the bond.

When the device is moved to VF LAG mode, the driver creates TTC (traffic type classifier) flow
tables in order to classify the packet and steer it to the relevant hash function. Similar to what
is done in the mlx5 RSS implementation.

Each rule in the TTC table, forwards the packet to port selection flow table which has one hash
split flow group which contains two "catch all" flow table entries. Each entry point to the
relative uplink port. As shown below:

-------------------
| FT              |
TTC rule -> |     ----------- |
|   FG|   FTE --|-|-----> uplink of port #1
|     |   FTE --|-|-----> uplink of port #2
|     ----------- |
-------------------

Hash split flow group is flow group that created as type of HASH_SPLIT and associated with match definer.
The match definer define the fields which included in the hash calculation.

The driver creates the match definer according to the xmit hash policy of the bond driver.

Patches overview:
========================

Minor E-Switch updates:
- Patch #12, dynamic  allocation of dest array
- Patch #13, increase number of forward destinations to 32

Signed-off-by: David S. Miller <davem@davemloft.net>