Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41386/?format=api
http://patchwork.dpdk.org/api/patches/41386/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/a10f21f1e8fae948ca4d0c61af8b5500c0cc4e3d.1529650435.git.rahul.lakkireddy@chelsio.com/", "project": { "id": 1, "url": "http://patchwork.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": "<a10f21f1e8fae948ca4d0c61af8b5500c0cc4e3d.1529650435.git.rahul.lakkireddy@chelsio.com>", "list_archive_url": "https://inbox.dpdk.org/dev/a10f21f1e8fae948ca4d0c61af8b5500c0cc4e3d.1529650435.git.rahul.lakkireddy@chelsio.com", "date": "2018-06-22T09:56:04", "name": "[RFC,2/3] ethdev: add flow api actions to modify TCP/UDP port numbers", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a87cc0dd36bf3a899e1961ab5ae541e55dd6b8a8", "submitter": { "id": 241, "url": "http://patchwork.dpdk.org/api/people/241/?format=api", "name": "Rahul Lakkireddy", "email": "rahul.lakkireddy@chelsio.com" }, "delegate": { "id": 319, "url": "http://patchwork.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/a10f21f1e8fae948ca4d0c61af8b5500c0cc4e3d.1529650435.git.rahul.lakkireddy@chelsio.com/mbox/", "series": [ { "id": 204, "url": "http://patchwork.dpdk.org/api/series/204/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=204", "date": "2018-06-22T09:56:02", "name": "ethdev: add IP address and TCP/UDP port rewrite actions to flow API", "version": 1, "mbox": "http://patchwork.dpdk.org/series/204/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/41386/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/41386/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4933A1BB52;\n\tFri, 22 Jun 2018 11:57:20 +0200 (CEST)", "from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8])\n\tby dpdk.org (Postfix) with ESMTP id 072041BB20\n\tfor <dev@dpdk.org>; Fri, 22 Jun 2018 11:57:15 +0200 (CEST)", "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w5M9vCI0000809; \n\tFri, 22 Jun 2018 02:57:13 -0700" ], "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "To": "dev@dpdk.org", "Cc": "shaguna@chelsio.com, indranil@chelsio.com, nirranjan@chelsio.com", "Date": "Fri, 22 Jun 2018 15:26:04 +0530", "Message-Id": "<a10f21f1e8fae948ca4d0c61af8b5500c0cc4e3d.1529650435.git.rahul.lakkireddy@chelsio.com>", "X-Mailer": "git-send-email 2.5.3", "In-Reply-To": [ "<cover.1529650435.git.rahul.lakkireddy@chelsio.com>", "<cover.1529650435.git.rahul.lakkireddy@chelsio.com>" ], "References": [ "<cover.1529650435.git.rahul.lakkireddy@chelsio.com>", "<cover.1529650435.git.rahul.lakkireddy@chelsio.com>" ], "Subject": "[dpdk-dev] [RFC 2/3] ethdev: add flow api actions to modify TCP/UDP\n\tport numbers", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Shagun Agrawal <shaguna@chelsio.com>\n\nAdd actions:\n- OF_SET_TP_SRC - set a new TCP/UDP source port number.\n- OF_SET_TP_DST - set a new TCP/UDP destination port number.\n\nBased on OFPAT_SET_TP_SRC and OFPAT_SET_TP_DST actions from OpenFlow\nSpecification.\n\nSigned-off-by: Shagun Agrawal <shaguna@chelsio.com>\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\n---\n app/test-pmd/cmdline_flow.c | 50 +++++++++++++++++++++++++++++\n app/test-pmd/config.c | 4 +++\n doc/guides/prog_guide/rte_flow.rst | 34 ++++++++++++++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 +++++\n lib/librte_ethdev/rte_flow.c | 4 +++\n lib/librte_ethdev/rte_flow.h | 30 +++++++++++++++++\n 6 files changed, 130 insertions(+)", "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 4550491ec..87745ada9 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -245,6 +245,10 @@ enum index {\n \tACTION_OF_SET_NW_IPV6_SRC_NW_IPV6_SRC,\n \tACTION_OF_SET_NW_IPV6_DST,\n \tACTION_OF_SET_NW_IPV6_DST_NW_IPV6_DST,\n+\tACTION_OF_SET_TP_SRC,\n+\tACTION_OF_SET_TP_SRC_TP_SRC,\n+\tACTION_OF_SET_TP_DST,\n+\tACTION_OF_SET_TP_DST_TP_DST,\n };\n \n /** Maximum size for pattern in struct rte_flow_item_raw. */\n@@ -785,6 +789,8 @@ static const enum index next_action[] = {\n \tACTION_OF_SET_NW_IPV4_DST,\n \tACTION_OF_SET_NW_IPV6_SRC,\n \tACTION_OF_SET_NW_IPV6_DST,\n+\tACTION_OF_SET_TP_SRC,\n+\tACTION_OF_SET_TP_DST,\n \tZERO,\n };\n \n@@ -904,6 +910,18 @@ static const enum index action_of_set_nw_ipv6_dst[] = {\n \tZERO,\n };\n \n+static const enum index action_of_set_tp_src[] = {\n+\tACTION_OF_SET_TP_SRC_TP_SRC,\n+\tACTION_NEXT,\n+\tZERO,\n+};\n+\n+static const enum index action_of_set_tp_dst[] = {\n+\tACTION_OF_SET_TP_DST_TP_DST,\n+\tACTION_NEXT,\n+\tZERO,\n+};\n+\n static const enum index action_jump[] = {\n \tACTION_JUMP_GROUP,\n \tACTION_NEXT,\n@@ -2462,6 +2480,38 @@ static const struct token token_list[] = {\n \t\t\t(struct rte_flow_action_of_set_nw_ipv6, ipv6_addr)),\n \t\t.call = parse_vc_conf,\n \t},\n+\t[ACTION_OF_SET_TP_SRC] = {\n+\t\t.name = \"of_set_tp_src\",\n+\t\t.help = \"set tcp/udp source port number\",\n+\t\t.priv = PRIV_ACTION(OF_SET_TP_SRC,\n+\t\t\tsizeof(struct rte_flow_action_of_set_tp)),\n+\t\t.next = NEXT(action_of_set_tp_src),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ACTION_OF_SET_TP_SRC_TP_SRC] = {\n+\t\t.name = \"port\",\n+\t\t.help = \"new source port number to set\",\n+\t\t.next = NEXT(action_of_set_tp_src, NEXT_ENTRY(UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON\n+\t\t\t (struct rte_flow_action_of_set_tp, port)),\n+\t\t.call = parse_vc_conf,\n+\t},\n+\t[ACTION_OF_SET_TP_DST] = {\n+\t\t.name = \"of_set_tp_dst\",\n+\t\t.help = \"set tcp/udp destination port number\",\n+\t\t.priv = PRIV_ACTION(OF_SET_TP_DST,\n+\t\t\tsizeof(struct rte_flow_action_of_set_tp)),\n+\t\t.next = NEXT(action_of_set_tp_dst),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ACTION_OF_SET_TP_DST_TP_DST] = {\n+\t\t.name = \"port\",\n+\t\t.help = \"new destination port number to set\",\n+\t\t.next = NEXT(action_of_set_tp_dst, NEXT_ENTRY(UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON\n+\t\t\t (struct rte_flow_action_of_set_tp, port)),\n+\t\t.call = parse_vc_conf,\n+\t},\n };\n \n /** Remove and return last entry from argument stack. */\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 83cb0354d..1faf0071e 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1161,6 +1161,10 @@ static const struct {\n \t\t sizeof(struct rte_flow_action_of_set_nw_ipv6)),\n \tMK_FLOW_ACTION(OF_SET_NW_IPV6_DST,\n \t\t sizeof(struct rte_flow_action_of_set_nw_ipv6)),\n+\tMK_FLOW_ACTION(OF_SET_TP_SRC,\n+\t\t sizeof(struct rte_flow_action_of_set_tp)),\n+\tMK_FLOW_ACTION(OF_SET_TP_DST,\n+\t\t sizeof(struct rte_flow_action_of_set_tp)),\n };\n \n /** Compute storage space needed by action configuration and copy it. */\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 3f56cc2d1..76c25a606 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -2144,6 +2144,40 @@ Set a new IPv6 destination address. It is based on ``OFPAT_SET_NW_DST``\n | ``ipv6_addr`` | new IPv6 destination address |\n +---------------+------------------------------+\n \n+Action: ``OF_SET_TP_SRC``\n+^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Set a new TCP/UDP source port number. It is based on ``OFPAT_SET_TP_SRC``\n+(\"set the transport source address\") as defined by the\n+`OpenFlow Switch Specification`_.\n+\n+.. _table_rte_flow_action_of_set_tp_src:\n+\n+.. table:: OF_SET_TP_SRC\n+\n+ +----------+-------------------------+\n+ | Field | Value |\n+ +==========+=========================+\n+ | ``port`` | new TCP/UDP source port |\n+ +---------------+--------------------+\n+\n+Action: ``OF_SET_TP_DST``\n+^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Set a new TCP/UDP destination port number. It is based on ``OFPAT_SET_TP_DST``\n+(\"set the transport destination address\") as defined by the\n+`OpenFlow Switch Specification`_.\n+\n+.. _table_rte_flow_action_of_set_tp_dst:\n+\n+.. table:: OF_SET_TP_DST\n+\n+ +----------+------------------------------+\n+ | Field | Value |\n+ +==========+==============================+\n+ | ``port`` | new TCP/UDP destination port |\n+ +---------------+-------------------------+\n+\n Negative types\n ~~~~~~~~~~~~~~\n \ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 56e3d6326..488b84de8 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3666,6 +3666,14 @@ This section lists supported actions and their attributes, if any.\n \n - ``ipv6_addr``: New IPv6 destination address.\n \n+- ``of_set_tp_src``: Set a new TCP/UDP source port number.\n+\n+ - ``port``: New TCP/UDP source port number.\n+\n+- ``of_set_tp_dst``: Set a new TCP/UDP destination port number.\n+\n+ - ``port``: New TCP/UDP destination port number.\n+\n Destroying flow rules\n ~~~~~~~~~~~~~~~~~~~~~\n \ndiff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\nindex 29f846783..c1ec26276 100644\n--- a/lib/librte_ethdev/rte_flow.c\n+++ b/lib/librte_ethdev/rte_flow.c\n@@ -117,6 +117,10 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {\n \t\t sizeof(struct rte_flow_action_of_set_nw_ipv6)),\n \tMK_FLOW_ACTION(OF_SET_NW_IPV6_DST,\n \t\t sizeof(struct rte_flow_action_of_set_nw_ipv6)),\n+\tMK_FLOW_ACTION(OF_SET_TP_SRC,\n+\t\t sizeof(struct rte_flow_action_of_set_tp)),\n+\tMK_FLOW_ACTION(OF_SET_TP_DST,\n+\t\t sizeof(struct rte_flow_action_of_set_tp)),\n };\n \n static int\ndiff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\nindex 76cf652c5..9b58f3894 100644\n--- a/lib/librte_ethdev/rte_flow.h\n+++ b/lib/librte_ethdev/rte_flow.h\n@@ -1537,6 +1537,22 @@ enum rte_flow_action_type {\n \t * See struct rte_flow_action_of_set_nw_ipv6.\n \t */\n \tRTE_FLOW_ACTION_TYPE_OF_SET_NW_IPV6_DST,\n+\n+\t/**\n+\t * Implements OFPAT_SET_TP_SRC (set the source transport port) as\n+\t * defined by the OpenFlow Switch Specification for tcp/udp.\n+\t *\n+\t * See struct rte_flow_action_of_set_tp.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_OF_SET_TP_SRC,\n+\n+\t/**\n+\t * Implements OFPAT_SET_TP_DST (set the destination transport port)\n+\t * as defined by the OpenFlow Switch Specification for tcp/udp.\n+\t *\n+\t * See struct rte_flow_action_of_set_tp.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_OF_SET_TP_DST,\n };\n \n /**\n@@ -1930,6 +1946,20 @@ struct rte_flow_action_of_set_nw_ipv6 {\n \tuint8_t ipv6_addr[16];\n };\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change without prior notice\n+ *\n+ * RTE_FLOW_ACTION_TYPE_OF_SET_TP_SRC\n+ * RTE_FLOW_ACTION_TYPE_OF_SET_TP_DST\n+ *\n+ * Implements OFPAT_SET_TP_SRC & OFPAT_SET_TP_DST (set the transport port)\n+ * as defined by the OpenFlow Switch Specification for tcp/udp.\n+ */\n+struct rte_flow_action_of_set_tp {\n+\tuint16_t port;\n+};\n+\n /*\n * Definition of a single action.\n *\n", "prefixes": [ "RFC", "2/3" ] }{ "id": 41386, "url": "