[PATCH v2 00/10] net/mlx5: improve MAC address and VLAN add latency

Stephen Hemminger stephen at networkplumber.org
Tue Oct 22 17:41:03 CEST 2024


On Tue, 22 Oct 2024 14:06:08 +0200
Dariusz Sosnowski <dsosnowski at nvidia.com> wrote:

> Whenever a new MAC address is added to the port, mlx5 PMD will:
> 
> - Add this address to `dev->data->mac_addrs[]`.
> - Destroy all control flow rules.
> - Recreate all control flow rules.
> 
> Similar logic is also implemented for VLAN filters.
> 
> Because of such logic, the latency of adding the new MAC address
> (i.e., latency of `rte_eth_dev_mac_addr_add()` function call)
> is actually linear to number of MAC addresses already configured.
> Since each operation of creating/destroying a control flow rule,
> involves an `ioctl()` syscall, on some setups the latency of adding
> a single MAC address can reach ~100ms, when port is operating with >= 100 MAC addresses.
> The same problem exists for VLAN filters (and even compounded by it).
> 
> This patchset aims to resolve these issues,
> by reworking how mlx5 PMD handles adding/removing MAC addresses and VLAN filters.
> Instead of recreating all control flow rules,
> only necessary flow rules will be created/removed on each operation,
> thus minimizing number of syscalls triggered.

Looks good.
Is there already functional test which does this? Mlx5 may not be alone
in having this problem.


More information about the dev mailing list