Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/100940/?format=api
http://patches.dpdk.org/api/patches/100940/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211010143930.4985-4-ivan.malov@oktetlabs.ru/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20211010143930.4985-4-ivan.malov@oktetlabs.ru>", "list_archive_url": "https://inbox.dpdk.org/dev/20211010143930.4985-4-ivan.malov@oktetlabs.ru", "date": "2021-10-10T14:39:21", "name": "[v3,03/12] ethdev: add port representor action to flow API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5df87403d39e4a09f1436bdc7cbd87b0e416efb9", "submitter": { "id": 869, "url": "http://patches.dpdk.org/api/people/869/?format=api", "name": "Ivan Malov", "email": "Ivan.Malov@oktetlabs.ru" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211010143930.4985-4-ivan.malov@oktetlabs.ru/mbox/", "series": [ { "id": 19490, "url": "http://patches.dpdk.org/api/series/19490/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19490", "date": "2021-10-10T14:39:18", "name": "ethdev: rework transfer flow API", "version": 3, "mbox": "http://patches.dpdk.org/series/19490/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/100940/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/100940/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D1F38A0C43;\n\tSun, 10 Oct 2021 16:40:19 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AFFF9410F2;\n\tSun, 10 Oct 2021 16:40:03 +0200 (CEST)", "from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id 103EF4003C\n for <dev@dpdk.org>; Sun, 10 Oct 2021 16:40:00 +0200 (CEST)", "from localhost.localdomain (unknown [5.144.123.197])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 9D2017F6D5;\n Sun, 10 Oct 2021 17:39:59 +0300 (MSK)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 9D2017F6D5", "DKIM-Signature": "v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru;\n s=default; t=1633876799;\n bh=9IZMNdUBYtmB1LZD2yOjf46mLQNTa5sShBOW/HKBknI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=ZRq/SSYbjZZlKdiPZwKdRU4XafbzcBlXwMqPCwKmrEnaguWo4Y/CWSvJd2/EwKmio\n g0UdVBeCMPi6bw8KjR5SfM510vb2yc+GtqlmN8Guf3pWwavXQ8BiVAnWivtzpc4qZ4\n 9LDgX+ZEZEcrIXT60Sz78QjOtSRj1FL7sDowT848=", "From": "Ivan Malov <ivan.malov@oktetlabs.ru>", "To": "dev@dpdk.org", "Cc": "Thomas Monjalon <thomas@monjalon.net>, Ori Kam <orika@nvidia.com>,\n Xiaoyun Li <xiaoyun.li@intel.com>, Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>", "Date": "Sun, 10 Oct 2021 17:39:21 +0300", "Message-Id": "<20211010143930.4985-4-ivan.malov@oktetlabs.ru>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20211010143930.4985-1-ivan.malov@oktetlabs.ru>", "References": "<20211001134716.1608857-1-andrew.rybchenko@oktetlabs.ru>\n <20211010143930.4985-1-ivan.malov@oktetlabs.ru>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 03/12] ethdev: add port representor action to\n flow API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "For use in \"transfer\" flows. Supposed to send matching traffic to\nthe given ethdev (to the application), at embedded switch level.\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\n---\n app/test-pmd/cmdline_flow.c | 26 ++++++++++\n doc/guides/prog_guide/rte_flow.rst | 56 +++++++++++++++++++++\n doc/guides/rel_notes/release_21_11.rst | 2 +-\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 5 ++\n lib/ethdev/rte_flow.c | 1 +\n lib/ethdev/rte_flow.h | 18 +++++++\n 6 files changed, 107 insertions(+), 1 deletion(-)", "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 68698d805d..ee6dac411a 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -460,6 +460,8 @@ enum index {\n \tACTION_POL_G,\n \tACTION_POL_Y,\n \tACTION_POL_R,\n+\tACTION_PORT_REPRESENTOR,\n+\tACTION_PORT_REPRESENTOR_PORT_ID,\n };\n \n /** Maximum size for pattern in struct rte_flow_item_raw. */\n@@ -1452,6 +1454,7 @@ static const enum index next_action[] = {\n \tACTION_MODIFY_FIELD,\n \tACTION_CONNTRACK,\n \tACTION_CONNTRACK_UPDATE,\n+\tACTION_PORT_REPRESENTOR,\n \tZERO,\n };\n \n@@ -1733,6 +1736,12 @@ static const enum index action_update_conntrack[] = {\n \tZERO,\n };\n \n+static const enum index action_port_representor[] = {\n+\tACTION_PORT_REPRESENTOR_PORT_ID,\n+\tACTION_NEXT,\n+\tZERO,\n+};\n+\n static int parse_set_raw_encap_decap(struct context *, const struct token *,\n \t\t\t\t const char *, unsigned int,\n \t\t\t\t void *, unsigned int);\n@@ -4820,6 +4829,23 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(action_update_conntrack),\n \t\t.call = parse_vc_action_conntrack_update,\n \t},\n+\t[ACTION_PORT_REPRESENTOR] = {\n+\t\t.name = \"port_representor\",\n+\t\t.help = \"at embedded switch level, send matching traffic to the given ethdev\",\n+\t\t.priv = PRIV_ACTION(PORT_REPRESENTOR,\n+\t\t\t\t sizeof(struct rte_flow_action_ethdev)),\n+\t\t.next = NEXT(action_port_representor),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ACTION_PORT_REPRESENTOR_PORT_ID] = {\n+\t\t.name = \"port_id\",\n+\t\t.help = \"ethdev port ID\",\n+\t\t.next = NEXT(action_port_representor,\n+\t\t\t NEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_action_ethdev,\n+\t\t\t\t\tport_id)),\n+\t\t.call = parse_vc_conf,\n+\t},\n \t/* Indirect action destroy arguments. */\n \t[INDIRECT_ACTION_DESTROY_ID] = {\n \t\t.name = \"action_id\",\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 12a216c1e3..a6401fb5df 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1484,6 +1484,8 @@ at the opposite end of the \"wire\" leading to the ethdev.\n \n - Default ``mask`` provides exact match behaviour.\n \n+See also `Action: PORT_REPRESENTOR`_.\n+\n Item: ``REPRESENTED_PORT``\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n \n@@ -3104,6 +3106,60 @@ which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``)\n | ``meter_color`` | Packet color |\n +-----------------+--------------+\n \n+Action: ``PORT_REPRESENTOR``\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+At embedded switch level, send matching traffic to the given ethdev.\n+\n+Term **ethdev** and the concept of **port representor** are synonymous.\n+The **represented port** is an *entity* plugged to the embedded switch\n+at the opposite end of the \"wire\" leading to the ethdev.\n+\n+::\n+\n+ .--------------------.\n+ | PORT_REPRESENTOR | Ethdev (Application Port Referred to by its ID)\n+ '--------------------'\n+ /\\\n+ ||\n+ .----------------.\n+ | Logical Port |\n+ '----------------'\n+ /\\\n+ ||\n+ ||\n+ ||\n+ .----------. .--------------------.\n+ | Switch | <== | Matching Traffic |\n+ '----------' '--------------------'\n+ :\n+ :\n+ :\n+ :\n+ .----------------.\n+ | Logical Port |\n+ '----------------'\n+ :\n+ :\n+ .--------------------.\n+ | REPRESENTED_PORT | Net / Guest / Another Ethdev (Same Application)\n+ '--------------------'\n+\n+\n+- Requires `Attribute: Transfer`_.\n+\n+.. _table_rte_flow_action_ethdev:\n+\n+.. table:: ``struct rte_flow_action_ethdev``\n+\n+ +-------------+----------------+\n+ | Field | Value |\n+ +=============+================+\n+ | ``port_id`` | ethdev port ID |\n+ +-------------+----------------+\n+\n+See also `Item: PORT_REPRESENTOR`_.\n+\n Negative types\n ~~~~~~~~~~~~~~\n \ndiff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex 39ff16780b..bf46329e52 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -188,7 +188,7 @@ API Changes\n Also, make sure to start the actual text at the margin.\n =======================================================\n \n-* ethdev: Added items ``PORT_REPRESENTOR``, ``REPRESENTED_PORT`` to flow API.\n+* ethdev: Added items ``PORT_REPRESENTOR``, ``REPRESENTED_PORT`` and action ``PORT_REPRESENTOR`` to flow API.\n \n * kvargs: The experimental function ``rte_kvargs_strcmp()`` has been\n removed. Its usages have been replaced by a new function\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 44a399899f..5f127fdbcc 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -4079,6 +4079,11 @@ This section lists supported actions and their attributes, if any.\n \n - ``type {value}``: Set color type with specified value(green/yellow/red)\n \n+- ``port_representor``: at embedded switch level, send matching traffic to\n+ the given ethdev\n+\n+ - ``port_id {unsigned}``: ethdev port ID\n+\n Destroying flow rules\n ~~~~~~~~~~~~~~~~~~~~~\n \ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex d4b654a2c6..b074b1c77d 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -191,6 +191,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {\n \t */\n \tMK_FLOW_ACTION(INDIRECT, 0),\n \tMK_FLOW_ACTION(CONNTRACK, sizeof(struct rte_flow_action_conntrack)),\n+\tMK_FLOW_ACTION(PORT_REPRESENTOR, sizeof(struct rte_flow_action_ethdev)),\n };\n \n int\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex 24d41aeb7b..cf4165bef3 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -2447,6 +2447,13 @@ enum rte_flow_action_type {\n \t * See struct rte_flow_action_meter_color.\n \t */\n \tRTE_FLOW_ACTION_TYPE_METER_COLOR,\n+\n+\t/**\n+\t * At embedded switch level, sends matching traffic to the given ethdev.\n+\t *\n+\t * @see struct rte_flow_action_ethdev\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR,\n };\n \n /**\n@@ -3206,6 +3213,17 @@ struct rte_flow_action_meter_color {\n \tenum rte_color color; /**< Packet color. */\n };\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change without prior notice\n+ *\n+ * Provides an ethdev port ID for use with the following actions:\n+ * RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR.\n+ */\n+struct rte_flow_action_ethdev {\n+\tuint16_t port_id; /**< ethdev port ID */\n+};\n+\n /**\n * Field IDs for MODIFY_FIELD action.\n */\n", "prefixes": [ "v3", "03/12" ] }{ "id": 100940, "url": "