net/mlx5: skip table zero to improve insertion rate
authorDekel Peled <dekelp@mellanox.com>
Wed, 11 Sep 2019 11:03:36 +0000 (14:03 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Sep 2019 08:19:41 +0000 (10:19 +0200)
commitb67b4ecbde22015b48d27d1ece9d05128666ad87
tree668bd317cffa8de8af8ddf6532db30cf79ebe23b
parent9763595925aa0488392035dbb15522dc2200c6d4
net/mlx5: skip table zero to improve insertion rate

E-switch tables one and above provide higher insertion rate
than table zero, as well as enhanced functionality.

This patch adds a mechanism to utilize these advantages, by creating
a default rule on port start, which directs all packets from e-switch
table zero to table one.
Other flow rules, requested for group n, will be created in
e-switch table n+1.
Jump action to e-switch group n will be created to group n+1.

Utility function mlx5_flow_group_to_table() is added to translate the
rte_flow group value to HW table value, and is called by PMD flow
engine on flow rule validation and creation.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
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_verbs.c
drivers/net/mlx5/mlx5_trigger.c