ethdev: remove DUP action from flow API

Upcoming changes in relation to the handling of actions list will make the
DUP action redundant as specifying several QUEUE actions will achieve the
same behavior. Besides, no PMD implements this action.

By removing an entry from enum rte_flow_action_type, this patch breaks ABI
compatibility for the following public functions:

- rte_flow_copy()
- rte_flow_create()
- rte_flow_query()
- rte_flow_validate()

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Adrien Mazarguil 2018-04-25 17:27:44 +02:00 committed by Ferruh Yigit
parent 551d148944
commit 2e6e75679a
8 changed files with 9 additions and 86 deletions

View File

@ -164,8 +164,6 @@ enum index {
ACTION_QUEUE_INDEX,
ACTION_DROP,
ACTION_COUNT,
ACTION_DUP,
ACTION_DUP_INDEX,
ACTION_RSS,
ACTION_RSS_TYPES,
ACTION_RSS_TYPE,
@ -625,7 +623,6 @@ static const enum index next_action[] = {
ACTION_QUEUE,
ACTION_DROP,
ACTION_COUNT,
ACTION_DUP,
ACTION_RSS,
ACTION_PF,
ACTION_VF,
@ -645,12 +642,6 @@ static const enum index action_queue[] = {
ZERO,
};
static const enum index action_dup[] = {
ACTION_DUP_INDEX,
ACTION_NEXT,
ZERO,
};
static const enum index action_rss[] = {
ACTION_RSS_TYPES,
ACTION_RSS_KEY,
@ -1597,20 +1588,6 @@ static const struct token token_list[] = {
.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
.call = parse_vc,
},
[ACTION_DUP] = {
.name = "dup",
.help = "duplicate packets to a given queue index",
.priv = PRIV_ACTION(DUP, sizeof(struct rte_flow_action_dup)),
.next = NEXT(action_dup),
.call = parse_vc,
},
[ACTION_DUP_INDEX] = {
.name = "index",
.help = "queue index to duplicate packets to",
.next = NEXT(action_dup, NEXT_ENTRY(UNSIGNED)),
.args = ARGS(ARGS_ENTRY(struct rte_flow_action_dup, index)),
.call = parse_vc_conf,
},
[ACTION_RSS] = {
.name = "rss",
.help = "spread packets among several queues",

View File

@ -1082,7 +1082,6 @@ static const struct {
MK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),
MK_FLOW_ACTION(DROP, 0),
MK_FLOW_ACTION(COUNT, 0),
MK_FLOW_ACTION(DUP, sizeof(struct rte_flow_action_dup)),
MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)), /* +queue[] */
MK_FLOW_ACTION(PF, 0),
MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),

View File

@ -1299,26 +1299,6 @@ Query structure to retrieve and reset flow rule counters:
| ``bytes`` | out | number of bytes through this rule |
+---------------+-----+-----------------------------------+
Action: ``DUP``
^^^^^^^^^^^^^^^
Duplicates packets to a given queue index.
This is normally combined with QUEUE, however when used alone, it is
actually similar to QUEUE + PASSTHRU.
- Non-terminating by default.
.. _table_rte_flow_action_dup:
.. table:: DUP
+-----------+------------------------------------+
| Field | Value |
+===========+====================================+
| ``index`` | queue index to duplicate packet to |
+-----------+------------------------------------+
Action: ``RSS``
^^^^^^^^^^^^^^^
@ -2010,9 +1990,6 @@ Unsupported actions
and tagging (`Action: MARK`_ or `Action: FLAG`_) may be implemented in
software as long as the target queue is used by a single rule.
- A rule specifying both `Action: DUP`_ + `Action: QUEUE`_ may be translated
to two hidden rules combining `Action: QUEUE`_ and `Action: PASSTHRU`_.
- When a single target queue is provided, `Action: RSS`_ can also be
implemented through `Action: QUEUE`_.

View File

@ -258,6 +258,8 @@ API Changes
fall-back value. Previously, setting ``nb_tx_desc`` to zero would have
resulted in an error.
* ethdev: unused DUP action was removed from the flow API.
ABI Changes
-----------
@ -298,12 +300,13 @@ ABI Changes
type ``uint16_t``: ``burst_size``, ``ring_size``, and ``nb_queues``. These
are parameter values recommended for use by the PMD.
* ethdev: ABI for most flow API functions was updated.
* ethdev: ABI for all flow API functions was updated.
This includes functions ``rte_flow_create``, ``rte_flow_destroy``,
``rte_flow_error_set``, ``rte_flow_flush``, ``rte_flow_isolate``,
``rte_flow_query`` and ``rte_flow_validate``, due to changes in error type
definitions (``enum rte_flow_error_type``).
This includes functions ``rte_flow_copy``, ``rte_flow_create``,
``rte_flow_destroy``, ``rte_flow_error_set``, ``rte_flow_flush``,
``rte_flow_isolate``, ``rte_flow_query`` and ``rte_flow_validate``, due to
changes in error type definitions (``enum rte_flow_error_type``) and
removal of the unused DUP action (``enum rte_flow_action_type``).
Removed Items

View File

@ -3385,10 +3385,6 @@ actions can sometimes be combined when the end result is unambiguous::
drop / queue index 6 / end # drop has no effect
::
drop / dup index 6 / end # same as above
::
queue index 6 / rss queues 6 7 8 / end # queue has no effect
@ -3424,10 +3420,6 @@ This section lists supported actions and their attributes, if any.
- ``count``: enable counters for this rule.
- ``dup``: duplicate packets to a given queue index.
- ``index {unsigned}``: queue index to duplicate packets to.
- ``rss``: spread packets among several queues.
- ``types [{RSS hash type} [...]] end``: RSS hash types, allowed tokens

View File

@ -147,7 +147,6 @@ DPDK_17.08 {
_rte_eth_dev_callback_process;
rte_eth_dev_adjust_nb_rx_tx_desc;
rte_flow_copy;
rte_tm_capabilities_get;
rte_tm_hierarchy_commit;
rte_tm_level_capabilities_get;
@ -201,6 +200,7 @@ DPDK_18.05 {
rte_eth_dev_count_avail;
rte_eth_find_next_owned_by;
rte_flow_copy;
rte_flow_create;
rte_flow_destroy;
rte_flow_error_set;

View File

@ -73,7 +73,6 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
MK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),
MK_FLOW_ACTION(DROP, 0),
MK_FLOW_ACTION(COUNT, 0),
MK_FLOW_ACTION(DUP, sizeof(struct rte_flow_action_dup)),
MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)), /* +queue[] */
MK_FLOW_ACTION(PF, 0),
MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),

View File

@ -960,16 +960,6 @@ enum rte_flow_action_type {
*/
RTE_FLOW_ACTION_TYPE_COUNT,
/**
* Duplicates packets to a given queue index.
*
* This is normally combined with QUEUE, however when used alone, it
* is actually similar to QUEUE + PASSTHRU.
*
* See struct rte_flow_action_dup.
*/
RTE_FLOW_ACTION_TYPE_DUP,
/**
* Similar to QUEUE, except RSS is additionally performed on packets
* to spread them among several queues according to the provided
@ -1051,20 +1041,6 @@ struct rte_flow_query_count {
uint64_t bytes; /**< Number of bytes through this rule [out]. */
};
/**
* RTE_FLOW_ACTION_TYPE_DUP
*
* Duplicates packets to a given queue index.
*
* This is normally combined with QUEUE, however when used alone, it is
* actually similar to QUEUE + PASSTHRU.
*
* Non-terminating by default.
*/
struct rte_flow_action_dup {
uint16_t index; /**< Queue index to duplicate packets to. */
};
/**
* RTE_FLOW_ACTION_TYPE_RSS
*