Hello Andrew, []
> On 2/2/23 13:24, Gregory Etelson wrote: > >> On 2/1/23 18:16, Gregory Etelson wrote: > >>> + ops = rte_flow_ops_get(port_id, error); > >>> + if (!ops || !ops->action_handle_query_update) > >>> + return -ENOTSUP; > >> > >> May be it makes sense to use single-operation callbacks if > >> another operation input is NULL. I guess it could be > >> convenient in some cases. Just an idea. > >> > > > > There is a plan to deprecate indirect query and update functions > > and replace them with a single query_update. > > So, will you add corresponding code? Just want to clarify. > There is ongoing work on next stage of indirect action functions. The plan is to deprecate existing API when all updates will be introduced. > >>> +/** > >>> + * @warning > >>> + * @b EXPERIMENTAL: this API may change without prior notice. > >>> + * > >>> + * Query and update operational mode. > >>> + * > >>> + * RTE_FLOW_QU_QUERY_FIRST > >>> + * Force port to query action before update. > >>> + * RTE_FLOW_QU_UPDATE_FIRST > >>> + * Force port to update action before query. > >> > >> I'm sorry, but I strongly dislike enum members duplication > >> here. I don't understand why we need to duplicate it and why > >> we can't document it in a right way below. > >> > > > > I don't understand where the duplication is. > > Query and update operations are atomic for application, > > but in hardware these are 2 separate operations that reference hardware > object. > > The operations execution order can have different results on object state. > > When application asks both actions it must explicitly specify execution > order for hardware. > > No-no, simpler. Just remove RTE_FLOW_QU_QUERY_FIRST and > RTE_FLOW_QU_UPDATE_FIRST above and update comments below > to use comments from above. That's it. > I see. Thank you ! Will fix in v9 > >>> + * > >>> + * @see rte_flow_action_handle_query_update() > >>> + * @see rte_flow_async_action_handle_query_update() > >>> + */ > >>> +enum rte_flow_query_update_mode { > >>> + RTE_FLOW_QU_QUERY_FIRST, /**< Query before update. */ > >>> + RTE_FLOW_QU_UPDATE_FIRST, /**< Query after update. */ > >>> +};