net/mlx5: add flex item operations
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Tue, 2 Nov 2021 08:53:42 +0000 (10:53 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 4 Nov 2021 21:55:38 +0000 (22:55 +0100)
commitdb25cadc0887822d26776810075b5233b868534c
tree9766874bde1dbcba59a8be0af18ddd5c8f1b5d25
parent575740d10e42f09427f6d00f83fabc7d7156235c
net/mlx5: add flex item operations

This patch is a preparation step of implementing
flex item feature in driver and it provides:

  - external entry point routines for flex item
    creation/deletion

  - flex item objects management over the ports.

The flex item object keeps information about
the item created over the port - reference counter
to track whether item is in use by some active
flows and the pointer to underlying shared DevX
object, providing all the data needed to translate
the flow flex pattern into matcher fields according
hardware configuration.

There is not too many flex items supposed to be
created on the port, the design is optimized
rather for flow insertion rate than memory savings.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/meson.build
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_flow_flex.c [new file with mode: 0644]