[dpdk-dev] [PATCH] ethdev: remove deprecated shared counter attribute
Stephen Hemminger
stephen at networkplumber.org
Tue Sep 28 17:58:07 CEST 2021
On Tue, 28 Sep 2021 18:23:00 +0300
Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru> wrote:
> @@ -2498,24 +2498,11 @@ struct rte_flow_query_age {
> * Counters can be retrieved and reset through ``rte_flow_query()``, see
> * ``struct rte_flow_query_count``.
> *
> - * @deprecated Shared attribute is deprecated, use generic
> - * RTE_FLOW_ACTION_TYPE_INDIRECT 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.
> - *
> - * For a count action with the shared flag set, then then a global device
> - * namespace is assumed for the counter id, so that any matched flow rules using
> - * a count action with the same counter id on the same port will contribute to
> - * that counter.
> - *
> * For ports within the same switch domain then the counter id namespace extends
> * to all ports within that switch domain.
> */
> struct rte_flow_action_count {
> - /** @deprecated Share counter ID with other flow rules. */
> - uint32_t shared:1;
> - uint32_t reserved:31; /**< Reserved, must be zero. */
> + uint32_t reserved; /**< Reserved, must be zero. */
> uint32_t id; /**< Counter ID. */
Reserved fields are often source of future problems.
You should change each driver to check that reserved field
return -ENOTSUP if non-zero. That way if reserved field is ever
used in future it won't break API/ABI.
The other option is to just remove the reserved field and take the API/ABI
hit now.
More information about the dev
mailing list