]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/mlx5: Only create VEPA flow table when in VEPA mode
authorBenjamin Poirier <bpoirier@nvidia.com>
Wed, 16 Oct 2024 17:36:15 +0000 (20:36 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Mon, 21 Oct 2024 11:26:17 +0000 (13:26 +0200)
commitf0ac6209460e8cc9bddf161d7210da5b72aa4846
tree6c5433837e31f2e845afcdaf1a4d28115b7b9fed
parentb37f3f2be0f4f9f62cf4cd001b1e95b89ed0e9b0
net/mlx5: Only create VEPA flow table when in VEPA mode

Currently, when VFs are created, two flow tables are added for the eswitch:
the "fdb" table, which contains rules for each VF and the "vepa_fdb" table.
In the default VEB mode, the vepa_fdb table is empty. When switching to
VEPA mode, flow steering rules are added to vepa_fdb. Even though the
vepa_fdb table is empty in VEB mode, its presence adds some cost to packet
processing. In some workloads, this leads to drops which are reported by
the rx_discards_phy ethtool counter.

In order to improve performance, only create vepa_fdb when in VEPA mode.

Tests were done on a ConnectX-6 Lx adapter forwarding 64B packets between
both ports using dpdk-testpmd. Numbers are Rx-pps for each port, as
reported by testpmd.

Without changes:
traffic to unknown mac
testpmd on PF
numvfs=0,0
35257998,35264499
numvfs=1,1
24590124,24590888
testpmd on VF with numvfs=1,1
20434338,20434887
traffic to VF mac
testpmd on VF with numvfs=1,1
30341014,30340749

With changes:
traffic to unknown mac
testpmd on PF
numvfs=0,0
35404361,35383378
numvfs=1,1
29801247,29790757
testpmd on VF with numvfs=1,1
24310435,24309084
traffic to VF mac
testpmd on VF with numvfs=1,1
34811436,34781706

Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c