]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: CT: Create smfs dr matchers dynamically
authorPaul Blakey <paulb@nvidia.com>
Sun, 5 Sep 2021 07:47:56 +0000 (10:47 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 11 Mar 2022 07:38:24 +0000 (23:38 -0800)
commit6c87f2eb11ac04e993796336e5c1636a0a8063e6
tree3c5748e496c7386ac4c0323cef5878d5142d4e8f
parente760a36b4ae633e1a4fe027d5b8b763d52e50fdf
net/mlx5: CT: Create smfs dr matchers dynamically

SMFS dr matchers are processed sequentially in hardware according to
their priorities, and not skipped if empty.

Currently, smfs ct fs creates four predefined dr matchers per ct
table (ct/ct nat) with hardcoded priority. Compared to dmfs ct fs
using autogroups, this might cause additional hops in fastpath for
traffic patterns that match later priorties, even if previous
priorites are empty, e.g user only using ipv6 UDP traffic will
have additional 3 hops.

Create the matchers dynamically, using the highest priority available,
on first rule usage, and remove them on last usage.

Signed-off-by: Paul Blakey <paulb@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c