linux-stable/include/linux/mlx5
Vlad Buslov 19e9bfa044 net/mlx5: Bridge, add offload infrastructure
Create new files bridge.{c|h} in en/rep directory that implement bridge
interaction with representor netdevices and handle required
events/notifications, bridge.{c|h} in esw directory that implement all
necessary eswitch offloading infrastructure and works on vport/eswitch
level. Provide new kconfig MLX5_BRIDGE which is automatically selected when
both kernel bridge and mlx5 eswitch configs are enabled.

Provide basic infrastructure for bridge offloads:

- struct mlx5_esw_bridge_offloads - per-eswitch bridge offload structure
that encapsulates generic bridge-offloads data (notifier blocks, ingress
flow table/group, etc.) that is created/deleted on enable/disable eswitch
offloads.

- struct mlx5_esw_bridge - per-bridge structure that encapsulates
per-bridge data (reference counter, FDB, egress flow table/group, etc.)
that is created when first eswitch represetor is attached to new bridge and
deleted when last representor is removed from the bridge as a result of
NETDEV_CHANGEUPPER event.

The bridge tables are created with new priority FDB_BR_OFFLOAD in FDB
namespace. The new priority is between tc-miss and slow path priorities.
Priority consist of two levels: the ingress table that is global per
eswitch and matches incoming packets by src_mac/vid and redirects them to
next level (egress table) that is chosen according to ingress port bridge
membership and matches on dst_mac/vid in order to redirect packet to vport
according to the following diagram:

                +
                |
      +---------v----------+
      |                    |
      |   FDB_TC_OFFLOAD   |
      |                    |
      +---------+----------+
                |
                |
      +---------v----------+
      |                    |
      |   FDB_FT_OFFLOAD   |
      |                    |
      +---------+----------+
                |
                |
      +---------v----------+
      |                    |
      |    FDB_TC_MISS     |
      |                    |
      +---------+----------+
                |
+--------------------------------------+
|               |                      |
|        +------+                      |
|        |                             |
| +------v--------+   FDB_BR_OFFLOAD   |
| | INGRESS_TABLE |                    |
| +------+---+----+                    |
|        |   |      match              |
|        |   +---------+               |
|        |             |               |    +-------+
|        |     +-------v-------+ match |    |       |
|        |     | EGRESS_TABLE  +------------> vport |
|        |     +-------+-------+       |    |       |
|        |             |               |    +-------+
|        |    miss     |               |
|        +------+------+               |
|               |                      |
+--------------------------------------+
                |
                |
      +---------v----------+
      |                    |
      |   FDB_SLOW_PATH    |
      |                    |
      +---------+----------+
                |
                v

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-06-09 18:36:09 -07:00
..
accel.h net/mlx5: Accel, Add core IPsec support for the Connect-X family 2020-07-16 16:36:42 -07:00
cq.h net/mlx5: Avoid RDMA file inclusion in core driver 2020-06-27 13:50:46 -07:00
device.h net/mlx5: mlx5_ifc support for header insert/remove 2021-06-09 18:36:06 -07:00
doorbell.h
driver.h mlx5-updates-2021-05-26 2021-05-27 17:14:23 -07:00
eq.h
eswitch.h net/mlx5e: TC: Reserved bit 31 of REG_C1 for IPsec offload 2021-05-27 11:54:36 -07:00
fs.h net/mlx5: Bridge, add offload infrastructure 2021-06-09 18:36:09 -07:00
fs_helpers.h
mlx5_ifc.h net/mlx5: mlx5_ifc support for header insert/remove 2021-06-09 18:36:06 -07:00
mlx5_ifc_fpga.h
mlx5_ifc_vdpa.h vdpa/mlx5: Make hardware definitions visible to all mlx5 devices 2020-12-04 14:46:56 +02:00
mpfs.h {net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table 2021-05-18 23:01:48 -07:00
port.h net/mlx5: Add support for DSFP module EEPROM dumps 2021-04-11 16:34:56 -07:00
qp.h net/mlx5: Set QP timestamp mode to default 2021-03-10 11:01:56 -08:00
rsc_dump.h net/mlx5: Add support in query QP, CQ and MKEY segments 2020-06-23 17:26:10 +03:00
transobj.h
vport.h net/mlx5: E-Switch, Prepare to return total vports from eswitch struct 2021-04-24 00:58:43 -07:00