net/mlx5: optimize tag traversal with hash list
authorBing Zhao <bingz@mellanox.com>
Fri, 8 Nov 2019 05:26:57 +0000 (07:26 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 Nov 2019 13:23:02 +0000 (14:23 +0100)
commite484e40323327aa4c51f22d59a38bde40327743d
tree40d5f5c070368c422d1ac844b34fefe4346383c4
parente9e36e52eeb64dadce057dfd004a281fb8f8a0c2
net/mlx5: optimize tag traversal with hash list

Tag action for flow mark/flag could be reused by different flows.
When creating a new flow with mark, the existing tag resources will
be traversed in order to confirm if the action is already created.
If only one linked list is used, the searching rate will drop
significantly with the number of tag actions increasing.
By using a hash lists table, it will speed up the searching process
and in the meanwhile, the memory consumption won't be large if only
a small number tag action resources are created(compared to other
hash table implementations). The list heads array size could be
optimized with some extendable hash table in the future.

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c