From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id A58C47FC9 for ; Wed, 25 Apr 2018 17:27:59 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id a8so7887573wmg.5 for ; Wed, 25 Apr 2018 08:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mwZLwXcuOtGrfm2Tg6QSSF/dpOaNyG61FkSd/y8302Q=; b=AgEKdhV2n5vivIMt5Hx9CF2Y78wPV0QX4yQz/OiZ+FDOwJXBbOQiCSOniAyQHrks1L yKyPz8cC8qS75wXQo7Jsq8MeDl6wEAC/d25zVYzAnqhu5U3k3yd0FclUscq5zl6YSf6k 7TUj/eVfItF1xuyHhWnTzvoCKTkceu8hC8iPYIHlH7zU07O5cUp9xtQ4r5iw+25FEY/g djLVmzHYA1u7hmrbm6qz+N0TupSIzfutCg7FeMODgd0D8Rvz1mBAgHO/1cwe3uiXuWcv yIn6KNMKVFqZ3O4BstdegwD/bIK1k4jF/Ix5UIShZvaRXEJGE6K0G+iYYYx/pQpm9FAX itdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mwZLwXcuOtGrfm2Tg6QSSF/dpOaNyG61FkSd/y8302Q=; b=q7Ah22O9pvjCcfnATA2jUFn0n/uc4ST9yfCzn6getepG0QuisByw9ZTib73rhvXSFY 7UNl8gJr0ND2dn7yQkq/794Q4CPqWuIinE0vkmEGkvIYtH6iujdQ4WNoXAICS7M3lKPz +fX9lenn5K1fbCqvVp5YmiUP6iJ/1ZYu1ZeaaFv9XAvf3Bz+E2NCkup/ChwmWb64rnVJ ocRDTYFP5o9zCMd2wNlBNp7McKXFF6M0geisQo9qtG3VaPR/K48mjCKj5HoF6g2O7ikK pSfldn86v8uyM/KufKpcRCpv4BuUGYI2+Sf0YyFENXHOOAb04zRqOp6DrPyke7fSh9QN SeHA== X-Gm-Message-State: ALQs6tBFIPwzAwJNC1HzoeoviucTtW9tJTu8B2mB8qT/RaLT4uvd6HfR vb6XPmaiy53PYSbfNj/6ub/dGrl3 X-Google-Smtp-Source: AIpwx49EgoWXKxd1Bf2q3lGn0bPK6fw99mAkwOgN02FQRcVEQsgDxYm6rANa5kDzdNd9iWVI730bOw== X-Received: by 10.28.44.86 with SMTP id s83mr14528815wms.30.1524670079209; Wed, 25 Apr 2018 08:27:59 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id k28-v6sm35909331wrk.96.2018.04.25.08.27.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 08:27:58 -0700 (PDT) Date: Wed, 25 Apr 2018 17:27:44 +0200 From: Adrien Mazarguil To: Thomas Monjalon , Ferruh Yigit , dev@dpdk.org Message-ID: <20180425151852.7676-5-adrien.mazarguil@6wind.com> References: <20180419100848.6178-1-adrien.mazarguil@6wind.com> <20180425151852.7676-1-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180425151852.7676-1-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH v6 04/16] ethdev: remove DUP action from flow API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 15:28:00 -0000 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 Acked-by: Andrew Rybchenko --- v6 changes: Updated API and ABI changes sections in release notes. --- app/test-pmd/cmdline_flow.c | 23 ----------------------- app/test-pmd/config.c | 1 - doc/guides/prog_guide/rte_flow.rst | 23 ----------------------- doc/guides/rel_notes/release_18_05.rst | 13 ++++++++----- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 -------- lib/librte_ether/rte_ethdev_version.map | 2 +- lib/librte_ether/rte_flow.c | 1 - lib/librte_ether/rte_flow.h | 24 ------------------------ 8 files changed, 9 insertions(+), 86 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index f0b4b7bc4..2ddb08feb 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -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", diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index b275d759d..9729177f8 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -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)), diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 51826d04c..a237e4fd2 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -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`_. diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst index e50caa74a..d3b619216 100644 --- a/doc/guides/rel_notes/release_18_05.rst +++ b/doc/guides/rel_notes/release_18_05.rst @@ -243,6 +243,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 ----------- @@ -283,12 +285,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 diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 06caea3f5..68c286bd4 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3387,10 +3387,6 @@ actions can sometimes be combined when the end result is unambiguous:: :: - 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 diff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ether/rte_ethdev_version.map index 180d2ca2d..29ca68eb7 100644 --- a/lib/librte_ether/rte_ethdev_version.map +++ b/lib/librte_ether/rte_ethdev_version.map @@ -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; diff --git a/lib/librte_ether/rte_flow.c b/lib/librte_ether/rte_flow.c index ada280810..80f9cb6cb 100644 --- a/lib/librte_ether/rte_flow.c +++ b/lib/librte_ether/rte_flow.c @@ -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)), diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index d28a2a473..6ace24ff4 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -961,16 +961,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 * parameters. @@ -1052,20 +1042,6 @@ struct rte_flow_query_count { }; /** - * 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 * * Similar to QUEUE, except RSS is additionally performed on packets to -- 2.11.0