On Tue, Dec 02, 2025 at 04:04:06PM -0800, Stephen Hemminger wrote: > On Tue, 18 Nov 2025 11:45:18 +0100 > Dariusz Sosnowski <[email protected]> wrote: > > > + polled = 0; > > + success = 0; > > + while (expected_ops > 0) { > > + /* Poisoning to make sure PMDs update it in case of error. */ > > + memset(&error, 0x55, sizeof(error)); > > + ret = rte_flow_pull(port_id, queue_id, res, expected_ops, > > &error); > > + if (ret < 0) { > > + port_flow_complain(&error); > > + free(res); > > + return ret; > > + } > > + if (ret == 0) { > > + rte_delay_us_sleep(FLOW_QUEUE_FLUSH_SLEEP_US); > > + continue; > > + } > > Infinite loops with sleep are bad. The poisoning seems unnecessary and not > done > elsewhere. Sleeping for 10 us is just unlikely to help much.
Regarding poisoning, it's not exactly true. At least in most other cases in testpmd where flow API is used (e.g. in port_flow_create() or port_flow_destroy()), the error struct is poisoned. It's not a perfect mechanism, but it allows catching bugs where driver does not populate error struct on failure. Due to lack of other mechanism and for consistency with rest of the code, I'd keep the poisoning in this patch. What do you think? Regarding the loop logic, I agree. I'll fix it in v2.

