2025-02-03 14:51 (UTC+0100), Sid ali cherrati: > [...] > if (!rte_flow_validate(port_id, &attr, pattern, actions, &error)){ > flow = rte_flow_create(port_id, &attr, pattern, actions, &error); > } > > if(flow != 0){ > printf("Filed to create drop flow filter \n"); > return -1; > } > [...] > The issue is that when I implement this, I get an error on the drop filter: > "Failed to create rule." Do you have any idea why this might be happening?
There is no this exact error text in your code or DPDK, I assume we're talking about the quoted fragment. `flow` is a pointer, the correct error condition is `if (flow == NULL)`, so your code probably misinterprets success as error. Also `flow` is not assigned if `rte_flow_validate()` returns non-0.