Sorry for the below topic confusion(in-reply-to).
On 3/29/21 9:50 AM, David Bouyeure wrote:
Hi,
I've found out the pretty useful experimental brand new flow ageing
API implemented in the mlx5 PMD.
I'm trying it (rte_eth_dev_callback_register(RTE_ETH_EVENT_FLOW_AGED),
RTE_FLOW_ACTION_TYPE_AGE) to recover any flow that I previously
offloaded.
The DPDK version is 20.08 and Mellanox(Connect-X6) OFED drivers are
5.1-2.5.8.0.
I eventually don't see the usefulness of the callback since it's
actually triggered indirectly by us(the DPDK application) when calling
rte_flow_get_aged_flows(). If we don't call it, the callback is called
only once.
And, calling rte_flow_get_aged_flows() from the callback won't trigger
it next time(MLX5_AGE_TRIGGER is reset after the callback call)
Furthermore, I don't see the point of computing ageing flows in
mlx5_fow.c::mlx5_flow_aging_check() if the client callback isn't called.
So far, I can handle the flow ageing from the same thread as the one
which is handling the flow direction(rte_flow), it even avoid threads
synchronization. But, in the future, I may need to be noticed as soon
as possible of a single flow ageing, and thus handle this flow logic
from the ageing callback.
I may misunderstand the whole ageing API... Thanks a lot for any
clarification.