summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2019-09-11 14:03:36 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2019-09-20 10:19:41 +0200
commitb67b4ecbde22015b48d27d1ece9d05128666ad87 (patch)
tree668bd317cffa8de8af8ddf6532db30cf79ebe23b /drivers/net/mlx5/mlx5_trigger.c
parent9763595925aa0488392035dbb15522dc2200c6d4 (diff)
downloaddpdk-b67b4ecbde22015b48d27d1ece9d05128666ad87.zip
dpdk-b67b4ecbde22015b48d27d1ece9d05128666ad87.tar.gz
dpdk-b67b4ecbde22015b48d27d1ece9d05128666ad87.tar.xz
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>
Diffstat (limited to 'drivers/net/mlx5/mlx5_trigger.c')
-rw-r--r--drivers/net/mlx5/mlx5_trigger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index aa323ad..122f31c 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -286,6 +286,9 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
unsigned int j;
int ret;
+ if (priv->config.dv_esw_en && !priv->config.vf)
+ if (!mlx5_flow_create_esw_table_zero_flow(dev))
+ goto error;
if (priv->isolated)
return 0;
if (dev->data->promiscuous) {