Hello Andrew, > > > >> On 1/20/23 13:46, Gregory Etelson wrote: > >>>>> and it's async version `rte_flow_async_action_handle_query_update` > >>>>> to atomically query and update flow action. > >>>> > >>>> Sorry, may be I'm missing something, but after reading previous > >>>> discussion I have a feeling that update could be queried data > >>>> dependent. However, I don't understand how it could be possible > >>>> with API below. Just my misunderstanding? > >>>> > >>> > >>> The goal of `rte_flow_action_handle_query_update()` is to execute > query > >> and update actions atomically. > >>> The function guaranties that action state will not change by any event > >> before both update and query complete. > >>> If the function was called with the ` RTE_FLOW_QU_QUERY_FIRST ` > >> `mode` argument, then update execution can depend > >>> on query result. That's up to query format, PMD implementation and > >> hardware capabilities. > >>> I hope that answered your question. > >> > >> Sorry, I'm still confused. Could you explain a bit more, > >> please. How update could depend on query result? > > > > Conditional update I described requires special action properties. > > Consider an action object with a method that receives query and update > as parameters. > > The method will activate update only if query result satisfies action state. > > If the action was updated, both query and update were atomic for > application. > > The function returns the action state - updated or not. > > Application is aware about the action properties. > > Application applies action properties to returned state to discover if > action was updated. > > Is it just a theoretical possibility or do you have an example > right now? >
Quota flow action is updated according to these rules. You validate it with MLX5 hardware and patches from this batch. Regards, Gregory