get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/80906/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 80906,
    "url": "http://patches.dpdk.org/api/patches/80906/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1602767335-433464-3-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": "<1602767335-433464-3-git-send-email-bingz@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1602767335-433464-3-git-send-email-bingz@nvidia.com",
    "date": "2020-10-15T13:08:52",
    "name": "[v6,2/5] ethdev: add new attributes to hairpin config",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ff9b6b01cf8603707e71df8047a165f71f15374f",
    "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/1602767335-433464-3-git-send-email-bingz@nvidia.com/mbox/",
    "series": [
        {
            "id": 13010,
            "url": "http://patches.dpdk.org/api/series/13010/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13010",
            "date": "2020-10-15T13:08:50",
            "name": "introduce support for hairpin between two ports",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/13010/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80906/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/80906/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E2BFBA04DB;\n\tThu, 15 Oct 2020 15:09:45 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 811C91E8F2;\n\tThu, 15 Oct 2020 15:09:33 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 26B601E8EF\n for <dev@dpdk.org>; Thu, 15 Oct 2020 15:09:29 +0200 (CEST)"
        ],
        "From": "Bing Zhao <bingz@nvidia.com>",
        "To": "thomas@monjalon.net, orika@nvidia.com, ferruh.yigit@intel.com,\n arybchenko@solarflare.com, mdr@ashroe.eu, nhorman@tuxdriver.com,\n bernard.iremonger@intel.com, beilei.xing@intel.com, wenzhuo.lu@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Thu, 15 Oct 2020 21:08:52 +0800",
        "Message-Id": "<1602767335-433464-3-git-send-email-bingz@nvidia.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1602767335-433464-1-git-send-email-bingz@nvidia.com>",
        "References": "<1601511962-21532-1-git-send-email-bingz@nvidia.com>\n <1602767335-433464-1-git-send-email-bingz@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v6 2/5] ethdev: add new attributes to hairpin\n\tconfig",
        "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 <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": "To support two ports hairpin mode and keep the backward compatibility\nfor the application, two new attribute members of the hairpin queue\nconfiguration structure will be added.\n\n`tx_explicit` means if the application itself will insert the Tx part\nflow rules. If not set, PMD will insert the rules implicitly.\n`manual_bind` means if the hairpin Tx queue and peer Rx queue will be\nbound automatically during the device start stage.\n\nDifferent Tx and Rx queue pairs could have different values, but it\nis highly recommended that all paired queues between one egress and\nits peer ingress ports have the same values, in order not to bring\nany chaos to the system. The actual support of these attribute\nparameters will be checked and decided by the PMD drivers.\n\nIn the single port hairpin, if both are zero without any setting, the\nbehavior will remain the same as before. It means that no bind API\nneeds to be called and no Tx flow rules need to be inserted manually\nby the application.\n\nSigned-off-by: Bing Zhao <bingz@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\nAcked-by: Thomas Monjalon <thomas@monjalon.net>\n---\nv6: Using unnecessary comment and using \"Rx\" & \"Tx\"\nv4: squash document update and more info for the two new attributes\nv2: optimize the structure and remove unused macros\n---\n doc/guides/prog_guide/rte_flow.rst     |  3 +++\n doc/guides/rel_notes/release_20_11.rst |  7 +++++++\n lib/librte_ethdev/rte_ethdev.c         |  8 ++++----\n lib/librte_ethdev/rte_ethdev.h         | 27 ++++++++++++++++++++++++++-\n 4 files changed, 40 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 55497c9..3df005a 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -2618,6 +2618,9 @@ set, unpredictable value will be seen depending on driver implementation. For\n loopback/hairpin packet, metadata set on Rx/Tx may or may not be propagated to\n the other path depending on HW capability.\n \n+In hairpin case with Tx explicit flow mode, metadata could (not mandatory) be\n+used to connect the Rx and Tx flows if it can be propagated from Rx to Tx path.\n+\n .. _table_rte_flow_action_set_meta:\n \n .. table:: SET_META\ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex 02bf7ca..2f23e6f 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -92,6 +92,7 @@ New Features\n * **Updated the ethdev library to support hairpin between two ports.**\n \n   New APIs are introduced to support binding / unbinding 2 ports hairpin.\n+  Hairpin Tx part flow rules can be inserted explicitly.\n \n * **Updated Broadcom bnxt driver.**\n \n@@ -396,6 +397,12 @@ ABI Changes\n     Applications should use the new values for identification of existing\n     extensions in the packet header.\n \n+  * ``struct rte_eth_hairpin_conf`` has two new members:\n+\n+    * ``uint32_t tx_explicit:1;``\n+    * ``uint32_t manual_bind:1;``\n+\n+\n Known Issues\n ------------\n \ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 57cf4a7..bcbee30 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -2003,13 +2003,13 @@ struct rte_eth_dev *\n \t}\n \tif (conf->peer_count > cap.max_rx_2_tx) {\n \t\tRTE_ETHDEV_LOG(ERR,\n-\t\t\t\"Invalid value for number of peers for Rx queue(=%hu), should be: <= %hu\",\n+\t\t\t\"Invalid value for number of peers for Rx queue(=%u), should be: <= %hu\",\n \t\t\tconf->peer_count, cap.max_rx_2_tx);\n \t\treturn -EINVAL;\n \t}\n \tif (conf->peer_count == 0) {\n \t\tRTE_ETHDEV_LOG(ERR,\n-\t\t\t\"Invalid value for number of peers for Rx queue(=%hu), should be: > 0\",\n+\t\t\t\"Invalid value for number of peers for Rx queue(=%u), should be: > 0\",\n \t\t\tconf->peer_count);\n \t\treturn -EINVAL;\n \t}\n@@ -2174,13 +2174,13 @@ struct rte_eth_dev *\n \t}\n \tif (conf->peer_count > cap.max_tx_2_rx) {\n \t\tRTE_ETHDEV_LOG(ERR,\n-\t\t\t\"Invalid value for number of peers for Tx queue(=%hu), should be: <= %hu\",\n+\t\t\t\"Invalid value for number of peers for Tx queue(=%u), should be: <= %hu\",\n \t\t\tconf->peer_count, cap.max_tx_2_rx);\n \t\treturn -EINVAL;\n \t}\n \tif (conf->peer_count == 0) {\n \t\tRTE_ETHDEV_LOG(ERR,\n-\t\t\t\"Invalid value for number of peers for Tx queue(=%hu), should be: > 0\",\n+\t\t\t\"Invalid value for number of peers for Tx queue(=%u), should be: > 0\",\n \t\t\tconf->peer_count);\n \t\treturn -EINVAL;\n \t}\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 10eb626..a8e5cdc 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1045,7 +1045,32 @@ struct rte_eth_hairpin_peer {\n  * A structure used to configure hairpin binding.\n  */\n struct rte_eth_hairpin_conf {\n-\tuint16_t peer_count; /**< The number of peers. */\n+\tuint32_t peer_count:16; /**< The number of peers. */\n+\n+\t/**\n+\t * Explicit Tx flow rule mode.\n+\t * One hairpin pair of queues should have the same attribute.\n+\t *\n+\t * - When set, the user should be responsible for inserting the hairpin\n+\t *   Tx part flows and removing them.\n+\t * - When clear, the PMD will try to handle the Tx part of the flows,\n+\t *   e.g., by splitting one flow into two parts.\n+\t */\n+\tuint32_t tx_explicit:1;\n+\n+\t/**\n+\t * Manually bind hairpin queues.\n+\t * One hairpin pair of queues should have the same attribute.\n+\t *\n+\t * - When set, to enable hairpin, the user should call the hairpin bind\n+\t *   function after all the queues are set up properly and the ports are\n+\t *   started. Also, the hairpin unbind function should be called\n+\t *   accordingly before stopping a port that with hairpin configured.\n+\t * - When clear, the PMD will try to enable the hairpin with the queues\n+\t *   configured automatically during port start.\n+\t */\n+\tuint32_t manual_bind:1;\n+\tuint32_t reserved:14; /**< Reserved bits. */\n \tstruct rte_eth_hairpin_peer peers[RTE_ETH_MAX_HAIRPIN_PEERS];\n };\n \n",
    "prefixes": [
        "v6",
        "2/5"
    ]
}