linux/Documentation/networking/device_drivers/ethernet
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
..
3com docs: make reporting-bugs.rst obsolete 2020-12-08 10:33:27 -07:00
altera
amazon docs: net: ena: Fix ena_start_xmit() function name typo 2021-03-16 15:06:04 -07:00
aquantia
chelsio
cirrus
davicom Documentation: Update paths of Samsung S3C machine files 2020-10-31 12:44:14 +01:00
dec
dlink
freescale
google
huawei
intel Documentation: ice: update documentation 2021-02-08 16:27:01 -08:00
marvell docs: octeontx2: Add Documentation for NIX health reporters 2021-01-21 11:57:51 -08:00
mellanox net/mlx5: E-Switch, let user to enable disable metadata 2021-04-14 11:02:26 -07:00
microsoft hv_netvsc: Add a comment clarifying batching logic 2021-03-14 14:32:37 -07:00
neterion
netronome
pensando
smsc
stmicro
ti docs: networking: ti: Add driver doc for AM65 NUSS switch driver 2021-02-11 17:52:13 -08:00
toshiba
index.rst docs: networking: ti: Add driver doc for AM65 NUSS switch driver 2021-02-11 17:52:13 -08:00