Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/91679/?format=api
http://patches.dpdk.org/api/patches/91679/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1618595649-157464-4-git-send-email-bingz@nvidia.com/", "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": "<1618595649-157464-4-git-send-email-bingz@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1618595649-157464-4-git-send-email-bingz@nvidia.com", "date": "2021-04-16T17:54:09", "name": "[v3,3/3] doc: update for conntrack", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b52e74f72f567cec43f35b31de5f14de316a6def", "submitter": { "id": 1976, "url": "http://patches.dpdk.org/api/people/1976/?format=api", "name": "Bing Zhao", "email": "bingz@nvidia.com" }, "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/1618595649-157464-4-git-send-email-bingz@nvidia.com/mbox/", "series": [ { "id": 16453, "url": "http://patches.dpdk.org/api/series/16453/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16453", "date": "2021-04-16T17:54:06", "name": "ethdev: introduce conntrack flow action and item", "version": 3, "mbox": "http://patches.dpdk.org/series/16453/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/91679/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/91679/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 4C80EA0548;\n\tFri, 16 Apr 2021 19:54:39 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id ECF801611BE;\n\tFri, 16 Apr 2021 19:54:25 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id EEE1B161002\n for <dev@dpdk.org>; Fri, 16 Apr 2021 19:54:24 +0200 (CEST)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n bingz@nvidia.com) with SMTP; 16 Apr 2021 20:54:20 +0300", "from nvidia.com (mtbc-r640-01.mtbc.labs.mlnx [10.75.70.6])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 13GHsAVQ025093;\n Fri, 16 Apr 2021 20:54:19 +0300" ], "From": "Bing Zhao <bingz@nvidia.com>", "To": "orika@nvidia.com, thomas@monjalon.net, ferruh.yigit@intel.com,\n andrew.rybchenko@oktetlabs.ru", "Cc": "dev@dpdk.org, ajit.khaparde@broadcom.com, xiaoyun.li@intel.com", "Date": "Sat, 17 Apr 2021 01:54:09 +0800", "Message-Id": "<1618595649-157464-4-git-send-email-bingz@nvidia.com>", "X-Mailer": "git-send-email 2.5.5", "In-Reply-To": "<1618595649-157464-1-git-send-email-bingz@nvidia.com>", "References": "<1618062393-205611-1-git-send-email-bingz@nvidia.com>\n <1618595649-157464-1-git-send-email-bingz@nvidia.com>", "Subject": "[dpdk-dev] [PATCH v3 3/3] doc: update for conntrack", "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": "The updated documentations include:\n 1. Release notes\n 2. rte_flow.rst\n 3. testpmd user guide\n\nSigned-off-by: Bing Zhao <bingz@nvidia.com>\n---\n doc/guides/prog_guide/rte_flow.rst | 113 ++++++++++++++++++++\n doc/guides/rel_notes/release_21_05.rst | 4 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 35 ++++++\n 3 files changed, 152 insertions(+)", "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 2ecc48cfff..a1333819fc 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1398,6 +1398,14 @@ Matches a eCPRI header.\n - ``hdr``: eCPRI header definition (``rte_ecpri.h``).\n - Default ``mask`` matches nothing, for all eCPRI messages.\n \n+Item: ``CONNTRACK``\n+^^^^^^^^^^^^^^^^^^^\n+\n+Matches a conntrack state after conntrack action.\n+\n+- ``flags``: conntrack packet state flags.\n+- Default ``mask`` matches all state bits.\n+\n Actions\n ~~~~~~~\n \n@@ -2842,6 +2850,111 @@ for ``RTE_FLOW_FIELD_VALUE`` and ``RTE_FLOW_FIELD_POINTER`` respectively.\n | ``value`` | immediate value or a pointer to this value |\n +---------------+----------------------------------------------------------+\n \n+Action: ``CONNTRACK``\n+^^^^^^^^^^^^^^^^^^^^^\n+\n+Create a conntrack (connection tracking) context with the provided information.\n+\n+In stateful session like TCP, the conntrack action provides the ability to\n+examine every packet of this connection and associate the state to every\n+packet. It will help to realize the stateful offloading with little software\n+participation. For example, only the control packets like SYN / FIN or packets\n+with invalid state should be handled by the software.\n+\n+A conntrack context should be created via ``rte_flow_action_handle_create()``\n+before using. Then the handle with ``INDIRECT`` type is used for a flow rule\n+creation. If a flow rule with an opposite direction needs to be created, the\n+``rte_flow_action_handle_update()`` should be used to modify the direction.\n+\n+Not all the fields of the ``struct rte_flow_action_conntrack`` will be used\n+for a conntrack context creating, depending on the HW.\n+The ``struct rte_flow_modify_conntrack`` should be used for an updating.\n+\n+The current conntrack context information could be queried via the\n+``rte_flow_action_handle_query()`` interface.\n+\n+.. _table_rte_flow_action_conntrack:\n+\n+.. table:: CONNTRACK\n+\n+ +--------------------------+-------------------------------------------------------------+\n+ | Field | Value |\n+ +==========================+=============================================================+\n+ | ``peer_port`` | peer port number |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``is_original_dir`` | direction of this connection for flow rule creating |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``enable`` | enable the conntrack context |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``live_connection`` | one ack was seen for this connection |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``selective_ack`` | SACK enabled |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``challenge_ack_passed`` | a challenge ack has passed |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``last_direction`` | direction of the last passed packet |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``liberal_mode`` | only report state change |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``state`` | current state |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``max_ack_window`` | maximal window scaling factor |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``retransmission_limit`` | maximal retransmission times |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``original_dir`` | TCP parameters of the original direction |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``reply_dir`` | TCP parameters of the reply direction |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``last_window`` | window value of the last passed packet |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``last_seq`` | sequence value of the last passed packet |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``last_ack`` | acknowledgement value the last passed packet |\n+ +--------------------------+-------------------------------------------------------------+\n+ | ``last_end`` | sum acknowledgement and length value the last passed packet |\n+ +--------------------------+-------------------------------------------------------------+\n+\n+.. _table_rte_flow_tcp_dir_param:\n+\n+.. table:: configuration parameters for each direction\n+\n+ +---------------------+---------------------------------------------------------+\n+ | Field | Value |\n+ +=====================+=========================================================+\n+ | ``scale`` | TCP window scaling factor |\n+ +---------------------+---------------------------------------------------------+\n+ | ``close_initiated`` | FIN sent from this direction |\n+ +---------------------+---------------------------------------------------------+\n+ | ``last_ack_seen`` | an ACK packet received |\n+ +---------------------+---------------------------------------------------------+\n+ | ``data_unacked`` | unacknowledged data for packets from this direction |\n+ +---------------------+---------------------------------------------------------+\n+ | ``sent_end`` | max{seq + len} seen in sent packets |\n+ +---------------------+---------------------------------------------------------+\n+ | ``reply_end`` | max{sack + max{win, 1}} seen in reply packets |\n+ +---------------------+---------------------------------------------------------+\n+ | ``max_win`` | max{max{win, 1}} + {sack - ack} seen in sent packets |\n+ +---------------------+---------------------------------------------------------+\n+ | ``max_ack`` | max{ack} + seen in sent packets |\n+ +---------------------+---------------------------------------------------------+\n+\n+.. _table_rte_flow_modify_conntrack:\n+\n+.. table:: update a conntrack context\n+\n+ +----------------+---------------------------------------+\n+ | Field | Value |\n+ +================+=======================================+\n+ | ``new_ct`` | new conntrack information |\n+ +----------------+---------------------------------------+\n+ | ``direction`` | direction will be updated |\n+ +----------------+---------------------------------------+\n+ | ``state`` | other fields except will be updated |\n+ +----------------+---------------------------------------+\n+ | ``reserved`` | reserved bits |\n+ +----------------+---------------------------------------+\n+\n Negative types\n ~~~~~~~~~~~~~~\n \ndiff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst\nindex e6f99350af..824eb72981 100644\n--- a/doc/guides/rel_notes/release_21_05.rst\n+++ b/doc/guides/rel_notes/release_21_05.rst\n@@ -183,6 +183,10 @@ New Features\n the events across multiple stages.\n * This also reduced the scheduling overhead on a event device.\n \n+* **Added conntrack support for rte_flow.**\n+\n+ * Added conntrack action and item for stateful offloading.\n+\n * **Updated testpmd.**\n \n * Added a command line option to configure forced speed for Ethernet port.\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 1fa6e2000e..4c029776aa 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3791,6 +3791,8 @@ This section lists supported pattern items and their attributes, if any.\n - ``s_field {unsigned}``: S field.\n - ``seid {unsigned}``: session endpoint identifier.\n \n+- ``conntrack``: match conntrack state.\n+\n Actions list\n ^^^^^^^^^^^^\n \n@@ -4925,6 +4927,39 @@ NVGRE encapsulation header and sent to port id 0.\n testpmd> flow create 0 ingress transfer pattern eth / end actions\n sample ratio 1 index 0 / port_id id 2 / end\n \n+Sample conntrack rules\n+~~~~~~~~~~~~~~~~~~~~~~\n+\n+Conntrack rules can be set by the following commands\n+\n+Need to construct the connection context with provided information.\n+In the first table, create a flow rule by using conntrack action and jump to\n+the next table. In the next table, create a rule to check the state.\n+\n+::\n+\n+ testpmd> set conntrack com peer 1 is_orig 1 enable 1 live 1 sack 1 cack 0\n+ last_dir 0 liberal 0 state 1 max_ack_win 7 r_lim 5 last_win 510\n+ last_seq 2632987379 last_ack 2532480967 last_end 2632987379\n+ last_index 0x8\n+ testpmd> set conntrack orig scale 7 fin 0 acked 1 unack_data 0\n+ sent_end 2632987379 reply_end 2633016339 max_win 28960\n+ max_ack 2632987379\n+ testpmd> set conntrack rply scale 7 fin 0 acked 1 unack_data 0\n+ sent_end 2532480967 reply_end 2532546247 max_win 65280\n+ max_ack 2532480967\n+ testpmd> flow indirect_action 0 create ingress action conntrack / end\n+ testpmd> flow create 0 group 3 ingress pattern eth / ipv4 / tcp / end actions indirect 0 / jump group 5 / end\n+ testpmd> flow create 0 group 5 ingress pattern eth / ipv4 / tcp / conntrack is 1 / end actions queue index 5 / end\n+\n+Construct the conntrack again with only \"is_orig\" set to 0 (other fields are\n+ignored), then use \"update\" interface to update the direction. Create flow\n+rules like above for the peer port.\n+\n+::\n+\n+ testpmd> flow indirect_action 0 update 0 action conntrack_update dir / end\n+\n BPF Functions\n --------------\n \n", "prefixes": [ "v3", "3/3" ] }{ "id": 91679, "url": "