ethdev: deprecate shared counters using action attribute
authorAndrew Rybchenko <arybchenko@solarflare.com>
Tue, 3 Nov 2020 14:26:16 +0000 (14:26 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 27 Nov 2020 18:16:45 +0000 (19:16 +0100)
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@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
doc/guides/prog_guide/rte_flow.rst
doc/guides/rel_notes/deprecation.rst
lib/librte_ethdev/rte_flow.h

index 4cff933..86b3444 100644 (file)
@@ -1724,17 +1724,20 @@ that counter.
 For ports within the same switch domain then the counter id namespace extends
 to all ports within that switch domain.
 
+The shared flag is DEPRECATED and ``SHARED`` ``COUNT`` action should be used
+to make shared counters.
+
 .. _table_rte_flow_action_count:
 
 .. table:: COUNT
 
-   +------------+---------------------+
-   | Field      | Value               |
-   +============+=====================+
-   | ``shared`` | shared counter flag |
-   +------------+---------------------+
-   | ``id``     | counter id          |
-   +------------+---------------------+
+   +------------+---------------------------------+
+   | Field      | Value                           |
+   +============+=================================+
+   | ``shared`` | DEPRECATED, shared counter flag |
+   +------------+---------------------------------+
+   | ``id``     | counter id                      |
+   +------------+---------------------------------+
 
 Query structure to retrieve and reset flow rule counters:
 
index f418285..ad91102 100644 (file)
@@ -75,6 +75,10 @@ Deprecation Notices
   as deprecated in DPDK 20.11, along with the associated macros ``ETH_MIRROR_*``.
   This API will be fully removed in DPDK 21.11.
 
+* 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).
+
 * ethdev: Queue specific stats fields will be removed from ``struct rte_eth_stats``.
   Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``, ``q_obytes``,
   ``q_errors``.
index b98334c..0977a78 100644 (file)
@@ -2287,6 +2287,9 @@ 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_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. */
 };