get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 109909,
    "url": "https://patches.dpdk.org/api/patches/109909/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220420081650.2043183-4-feifei.wang2@arm.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20220420081650.2043183-4-feifei.wang2@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220420081650.2043183-4-feifei.wang2@arm.com",
    "date": "2022-04-20T08:16:48",
    "name": "[v1,3/5] ethdev: add API for direct rearm mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "472bae66f3c2c01df17846085d36b7694c6c01be",
    "submitter": {
        "id": 1771,
        "url": "https://patches.dpdk.org/api/people/1771/?format=api",
        "name": "Feifei Wang",
        "email": "feifei.wang2@arm.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220420081650.2043183-4-feifei.wang2@arm.com/mbox/",
    "series": [
        {
            "id": 22568,
            "url": "https://patches.dpdk.org/api/series/22568/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22568",
            "date": "2022-04-20T08:16:45",
            "name": "Direct re-arming of buffers on receive side",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/22568/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/109909/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/109909/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 C3207A00BE;\n\tWed, 20 Apr 2022 10:17:19 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 91383427F8;\n\tWed, 20 Apr 2022 10:17:09 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 80095427F9\n for <dev@dpdk.org>; Wed, 20 Apr 2022 10:17:08 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 141EC1FB;\n Wed, 20 Apr 2022 01:17:08 -0700 (PDT)",
            "from net-x86-dell-8268.shanghai.arm.com\n (net-x86-dell-8268.shanghai.arm.com [10.169.210.114])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 095673F73B;\n Wed, 20 Apr 2022 01:17:04 -0700 (PDT)"
        ],
        "From": "Feifei Wang <feifei.wang2@arm.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ray Kinsella <mdr@ashroe.eu>",
        "Cc": "dev@dpdk.org, nd@arm.com, Feifei Wang <feifei.wang2@arm.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n Ruifeng Wang <ruifeng.wang@arm.com>",
        "Subject": "[PATCH v1 3/5] ethdev: add API for direct rearm mode",
        "Date": "Wed, 20 Apr 2022 16:16:48 +0800",
        "Message-Id": "<20220420081650.2043183-4-feifei.wang2@arm.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220420081650.2043183-1-feifei.wang2@arm.com>",
        "References": "<20220420081650.2043183-1-feifei.wang2@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "Add API for enabling direct rearm mode and for mapping RX and TX\nqueues. Currently, the API supports 1:1(txq : rxq) mapping.\n\nSuggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nSigned-off-by: Feifei Wang <feifei.wang2@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nReviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\n---\n lib/ethdev/ethdev_driver.h | 15 +++++++++++++++\n lib/ethdev/rte_ethdev.c    | 14 ++++++++++++++\n lib/ethdev/rte_ethdev.h    | 31 +++++++++++++++++++++++++++++++\n lib/ethdev/version.map     |  1 +\n 4 files changed, 61 insertions(+)",
    "diff": "diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex 69d9dc21d8..22022f6da9 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -485,6 +485,16 @@ typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,\n typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,\n \t\t\t\t    uint16_t rx_queue_id);\n \n+/** @internal Enable direct rearm of a receive queue of an Ethernet device. */\n+typedef int (*eth_rx_direct_rearm_enable_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t\tuint16_t queue_id);\n+\n+/**< @internal map Rx/Tx queue of direct rearm mode */\n+typedef int (*eth_rx_direct_rearm_map_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\tuint16_t rx_queue_id,\n+\t\t\t\t\tuint16_t tx_port_id,\n+\t\t\t\t\tuint16_t tx_queue_id);\n+\n /** @internal Release memory resources allocated by given Rx/Tx queue. */\n typedef void (*eth_queue_release_t)(struct rte_eth_dev *dev,\n \t\t\t\t    uint16_t queue_id);\n@@ -1152,6 +1162,11 @@ struct eth_dev_ops {\n \t/** Disable Rx queue interrupt */\n \teth_rx_disable_intr_t      rx_queue_intr_disable;\n \n+\t/** Enable Rx queue direct rearm mode */\n+\teth_rx_direct_rearm_enable_t rx_queue_direct_rearm_enable;\n+\t/** Map Rx/Tx queue for direct rearm mode */\n+\teth_rx_direct_rearm_map_t  rx_queue_direct_rearm_map;\n+\n \teth_tx_queue_setup_t       tx_queue_setup;/**< Set up device Tx queue */\n \teth_queue_release_t        tx_queue_release; /**< Release Tx queue */\n \teth_tx_done_cleanup_t      tx_done_cleanup;/**< Free Tx ring mbufs */\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 29a3d80466..8e6f0284f4 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -2139,6 +2139,20 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \treturn eth_err(port_id, ret);\n }\n \n+int\n+rte_eth_direct_rxrearm_map(uint16_t rx_port_id, uint16_t rx_queue_id,\n+\t\tuint16_t tx_port_id, uint16_t tx_queue_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tdev = &rte_eth_devices[rx_port_id];\n+\t(*dev->dev_ops->rx_queue_direct_rearm_enable)(dev, rx_queue_id);\n+\t(*dev->dev_ops->rx_queue_direct_rearm_map)(dev, rx_queue_id,\n+\t\t\ttx_port_id, tx_queue_id);\n+\n+\treturn 0;\n+}\n+\n int\n rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port)\n {\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 04cff8ee10..4a431fcbed 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -5190,6 +5190,37 @@ __rte_experimental\n int rte_eth_dev_hairpin_capability_get(uint16_t port_id,\n \t\t\t\t       struct rte_eth_hairpin_cap *cap);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Enable direct re-arm mode. In this mode the RX queue will be re-armed using\n+ * buffers that have completed transmission on the transmit side.\n+ *\n+ * @note\n+ *   It is assumed that the buffers have completed transmission belong to the\n+ *   mempool used at the receive side, and have refcnt = 1.\n+ *\n+ * @param rx_port_id\n+ *   Port identifying the receive side.\n+ * @param rx_queue_id\n+ *   The index of the receive queue identifying the receive side.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param tx_port_id\n+ *   Port identifying the transmit side.\n+ * @param tx_queue_id\n+ *   The index of the transmit queue identifying the transmit side.\n+ *   The value must be in the range [0, nb_tx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ */\n+__rte_experimental\n+int rte_eth_direct_rxrearm_map(uint16_t rx_port_id, uint16_t rx_queue_id,\n+\t\t\t       uint16_t tx_port_id, uint16_t tx_queue_id);\n+\n /**\n  * @warning\n  * @b EXPERIMENTAL: this structure may change without prior notice.\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 20391ab29e..68d664498c 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -279,6 +279,7 @@ EXPERIMENTAL {\n \trte_flow_async_action_handle_create;\n \trte_flow_async_action_handle_destroy;\n \trte_flow_async_action_handle_update;\n+\trte_eth_direct_rxrearm_map;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v1",
        "3/5"
    ]
}