History log of /linux-master/drivers/net/ethernet/mellanox/mlx5/core/en/mapping.c
Revision Date Author Comments
# 5d5defd6 03-Aug-2021 Roi Dayan <roid@nvidia.com>

net/mlx5e: Add an option to create a shared mapping

The shared mapping is identified by an id and type.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>


# 7f30db1e 15-Feb-2020 Paul Blakey <paulb@mellanox.com>

net/mlx5: Introduce mapping infra for mapping unique ids to data

Add a new interface for mapping data to a given id range (max_id),
and back again. It uses xarray as the id allocator and for finding a
given id. For locking it uses xa_lock (spin_lock) for add()/del(),
and rcu_read_lock for find().

This mapping interface also supports delaying the mapping removal via
a workqueue. This is for cases where we need the mapping to have
some grace period in regards to finding it back again, for example
for packets arriving from hardware that were marked with by a rule
with an old mapping that no longer exists.

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>