From 39668928849a7c447a8c06b09f733350c8b252b5 Mon Sep 17 00:00:00 2001 From: dawidwesierski4 Date: Mon, 16 Dec 2024 15:48:57 +0100 Subject: [PATCH] Fix flow rules failing after verification on PF DPDK backend flow rules are failing on the E810 PF when ETH rules are ignored on the default attribute group 0. Retry applying the flow rules on the queue with group 2 if applying to group 0 fails but passes verification. --- lib/src/mt_flow.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/src/mt_flow.c b/lib/src/mt_flow.c index eb4463ded..98a0b7ffd 100644 --- a/lib/src/mt_flow.c +++ b/lib/src/mt_flow.c @@ -178,6 +178,16 @@ static struct rte_flow* rte_rx_flow_create(struct mt_interface* inf, uint16_t q, mt_pthread_mutex_lock(&inf->vf_cmd_mutex); r_flow = rte_flow_create(port_id, &attr, pattern, action, &error); mt_pthread_mutex_unlock(&inf->vf_cmd_mutex); + + /* WA for PF interfaces */ + if (!has_ip_flow && !r_flow) { + info("%s(%d), Flow creation failed on default group, retrying with group 2\n", __func__, port); + mt_pthread_mutex_lock(&inf->vf_cmd_mutex); + attr.group = 2; + r_flow = rte_flow_create(port_id, &attr, pattern, action, &error); + mt_pthread_mutex_unlock(&inf->vf_cmd_mutex); + } + if (!r_flow) { err("%s(%d), rte_flow_create fail for queue %d, %s\n", __func__, port, q, mt_string_safe(error.message));