[dpdk-dev] [PATCH] ethdev: deprecate shared counters using action attribute

Thomas Monjalon thomas at monjalon.net
Thu Oct 29 17:11:37 CET 2020


29/10/2020 15:39, Ori Kam:
> Hi Andrew,
> 
[...]
> > A new generic shared actions API may be used to create shared
> > counter. There is no point to keep duplicate COUNT action specific
> > capability to create shared counters.
> > 
> > Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
> > ---
> > In fact, it looks like the next logical step is to remove
> > struct rte_flow_action_count completely since counter ID makes
> > sense for shared counters only. I think it will just make it
> > easiser to use COUNT action. Comments are welcome.
[...]
> > +* ethdev: Attribute ``shared`` of the ``struct rte_flow_action_count``
> > +  is deprecated and will be removed in DPDK 21.11. Shared counters should
> > +  be managed using shared actions API (``rte_flow_shared_action_create``
> > etc).
> > +
[...]
> > + * @deprecated Shared attribute is deprecated, use generic
> > + * RTE_FLOW_ACTION_TYPE_SHARED action.
> > + *
> >   * The shared flag indicates whether the counter is unique to the flow rule the
> >   * action is specified with, or whether it is a shared counter.
> >   *
> > @@ -2299,7 +2302,8 @@ struct rte_flow_query_age {
> >   * to all ports within that switch domain.
> >   */
> >  struct rte_flow_action_count {
> > -	uint32_t shared:1; /**< Share counter ID with other flow rules. */
> > +	/** @deprecated Share counter ID with other flow rules. */
> > +	uint32_t shared:1;
> >  	uint32_t reserved:31; /**< Reserved, must be zero. */
> >  	uint32_t id; /**< Counter ID. */
> >  };
> > --
> > 2.17.1
> 
> As much as I agree with your patch, I don't think we should push it since
> not all PMD made the move to support count action, so the application still needs
> to use this API.
> 
> I think this patch should be done but in next LTS release.

The patch is not removing the field,
it is just warning it will be removed in next year.




More information about the dev mailing list