Skip to content

Commit

Permalink
Fix flow rules failing after verification on PF
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DawidWesierski4 committed Dec 16, 2024
1 parent 1580c7f commit d478b90
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/src/mt_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,25 @@ 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 specific for e810 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);
attr.group = 2;

ret = rte_flow_validate(port_id, &attr, pattern, action, &error);
if (ret < 0) {
err("%s(%d), rte_flow_validate fail %d for queue %d, %s\n", __func__, port, ret, q,
mt_string_safe(error.message));
return NULL;
}

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);
}

if (!r_flow) {
err("%s(%d), rte_flow_create fail for queue %d, %s\n", __func__, port, q,
mt_string_safe(error.message));
Expand Down

0 comments on commit d478b90

Please sign in to comment.