linux/Documentation/networking/device_drivers
Parav Pandit 7bf481d7e7 net/mlx5: E-Switch, let user to enable disable metadata
Currently each packet inserted in eswitch is tagged with a internal
metadata to indicate source vport. Metadata tagging is not always
needed. Metadata insertion is needed for multi-port RoCE, failover
between representors and stacked devices. In many other cases,
metadata enablement is not needed.

Metadata insertion slows down the packet processing rate of the E-switch
when it is in switchdev mode.

Below table show performance gain with metadata disabled for VXLAN
offload rules in both SMFS and DMFS steering mode on ConnectX-5 device.

----------------------------------------------
| steering | metadata | pkt size | rx pps    |
| mode     |          |          | (million) |
----------------------------------------------
| smfs     | disabled | 128Bytes | 42        |
----------------------------------------------
| smfs     | enabled  | 128Bytes | 36        |
----------------------------------------------
| dmfs     | disabled | 128Bytes | 42        |
----------------------------------------------
| dmfs     | enabled  | 128Bytes | 36        |
----------------------------------------------

Hence, allow user to disable metadata using driver specific devlink
parameter. Metadata setting of the eswitch is applicable only for the
switchdev mode.

Example to show and disable metadata before changing eswitch mode:
$ devlink dev param show pci/0000:06:00.0 name esw_port_metadata
pci/0000:06:00.0:
  name esw_port_metadata type driver-specific
    values:
      cmode runtime value true

$ devlink dev param set pci/0000:06:00.0 \
	  name esw_port_metadata value false cmode runtime

$ devlink dev eswitch set pci/0000:06:00.0 mode switchdev

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Vu Pham <vuhuong@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
changelog:
v1->v2:
 - added performance numbers in commit log
 - updated commit log and documentation for switchdev mode
 - added explicit note on when user can disable metadata in
   documentation
2021-04-14 11:02:26 -07:00
..
appletalk docs: networking: move AppleTalk / LocalTalk drivers to the hw driver section 2020-06-26 16:08:45 -07:00
atm docs: networking: move ATM drivers to the hw driver section 2020-06-26 16:08:45 -07:00
cable docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
cellular docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
ethernet net/mlx5: E-Switch, let user to enable disable metadata 2021-04-14 11:02:26 -07:00
fddi FDDI: defza: Update my e-mail address 2021-03-10 12:45:16 -08:00
hamradio docs: networking: move baycom to the hw driver section 2020-06-26 16:08:44 -07:00
qlogic staging: qlge: add documentation for debugging qlge 2021-01-29 16:54:21 +01:00
wan docs: networking: move z8530 to the hw driver section 2020-06-26 16:08:44 -07:00
wifi ipw2x00: Replace HTTP links with HTTPS ones 2020-08-02 18:15:38 +03:00
index.rst staging: qlge: add documentation for debugging qlge 2021-01-29 16:54:21 +01:00