]> 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)
commit0fa2ba311fee94303a35c177ad72aa8d48489cfd
tree3c5748e496c7386ac4c0323cef5878d5142d4e8f
parentc12be0c10c9d28fafc0b77ddf3bee51b95805ff7
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