]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: TC, Add sampler restore handle API
authorChris Mi <cmi@nvidia.com>
Tue, 26 Jan 2021 03:08:28 +0000 (11:08 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 7 Apr 2021 04:36:04 +0000 (21:36 -0700)
commit18cf93c2a31bb80f09a17f65802aeeddc1edcd03
tree3556e761c7715f4c4a60ad94fcf1965febe812d3
parentbc5de72ea12f6bee408c3ec7ddd78b26688cab9c
net/mlx5e: TC, Add sampler restore handle API

Use common object pool to create an object ID to map sample parameters.
Allocate a modify header action to write the object ID to reg_c0 lower
16 bits. Create a restore rule to pass the object ID to software. So
software can identify sampled packets via the object ID and send it to
userspace.

Aggregate the modify header action, restore rule and object ID to a
sample restore handle. Re-use identical sample restore handle for
the same object ID.

Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/sample.c