get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127766,
    "url": "http://patchwork.dpdk.org/api/patches/127766/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230531101853.20468-13-beilei.xing@intel.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": "<20230531101853.20468-13-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230531101853.20468-13-beilei.xing@intel.com",
    "date": "2023-05-31T10:18:52",
    "name": "[v5,12/13] net/cpfl: support peer ports get",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1e26eb8545012925e3bc7dd8abf908cf17d78cca",
    "submitter": {
        "id": 410,
        "url": "http://patchwork.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230531101853.20468-13-beilei.xing@intel.com/mbox/",
    "series": [
        {
            "id": 28275,
            "url": "http://patchwork.dpdk.org/api/series/28275/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28275",
            "date": "2023-05-31T10:18:40",
            "name": "net/cpfl: add hairpin queue support",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/28275/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/127766/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/127766/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 ABE5742BF0;\n\tWed, 31 May 2023 12:44:34 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BF78842D70;\n\tWed, 31 May 2023 12:43:40 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id 68DA642D52\n for <dev@dpdk.org>; Wed, 31 May 2023 12:43:35 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 31 May 2023 03:43:34 -0700",
            "from dpdk-beileix-3.sh.intel.com ([10.67.110.253])\n by orsmga005.jf.intel.com with ESMTP; 31 May 2023 03:43:32 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1685529815; x=1717065815;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=lvfUIfxFrq74/11z85tmSj06FRDW2G6ma7q0EZpeg/U=;\n b=kJcQezsv1G8X+EVwbbF3uazWO0UqLvmnWRN1M+ks5wpMHEKvlKdhdmRt\n 0Hu8NsduZXOEBFk+uUWIzyzFE5Ey79XLT9nZVxPMkOntRBSwVNHscOlBk\n +5dqfAwATrv6+bDbsrs09e674iNc6WAjjjb4c324Nm6MY3cJ3a8pgnQuM\n EhnJ4fT3rZfaPqNYGqoLa2ma7ZRQ3rr+eNOK/lPrPzYl7RWrxnS/bSxI3\n 6rY8Jfzm5Xg/mO9xX1NGRrWhbSOJ+JSuSK2waWSgLaD8mcXqJCTzjIHet\n eNaypyxPRqA8mUAXpv4JGq7OGWmo1diwGTgEYlAh2oFGiQ+8JyoQFqzZP Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10726\"; a=\"354045048\"",
            "E=Sophos;i=\"6.00,205,1681196400\"; d=\"scan'208\";a=\"354045048\"",
            "E=McAfee;i=\"6600,9927,10726\"; a=\"881129661\"",
            "E=Sophos;i=\"6.00,205,1681196400\"; d=\"scan'208\";a=\"881129661\""
        ],
        "X-ExtLoop1": "1",
        "From": "beilei.xing@intel.com",
        "To": "jingjing.wu@intel.com",
        "Cc": "dev@dpdk.org, mingxia.liu@intel.com, Beilei Xing <beilei.xing@intel.com>,\n Xiao Wang <xiao.w.wang@intel.com>",
        "Subject": "[PATCH v5 12/13] net/cpfl: support peer ports get",
        "Date": "Wed, 31 May 2023 10:18:52 +0000",
        "Message-Id": "<20230531101853.20468-13-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20230531101853.20468-1-beilei.xing@intel.com>",
        "References": "<20230526073850.101079-1-beilei.xing@intel.com>\n <20230531101853.20468-1-beilei.xing@intel.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": "From: Beilei Xing <beilei.xing@intel.com>\n\nThis patch supports get hairpin peer ports.\n\nSigned-off-by: Xiao Wang <xiao.w.wang@intel.com>\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/cpfl/cpfl_ethdev.c | 40 ++++++++++++++++++++++++++++++++++\n 1 file changed, 40 insertions(+)",
    "diff": "diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c\nindex 850f1c0bc6..9fc7d3401f 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.c\n+++ b/drivers/net/cpfl/cpfl_ethdev.c\n@@ -1080,6 +1080,45 @@ cpfl_dev_close(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n+static int\n+cpfl_hairpin_get_peer_ports(struct rte_eth_dev *dev, uint16_t *peer_ports,\n+\t\t\t    size_t len, uint32_t tx)\n+{\n+\tstruct cpfl_vport *cpfl_vport =\n+\t\t(struct cpfl_vport *)dev->data->dev_private;\n+\tstruct idpf_tx_queue *txq;\n+\tstruct idpf_rx_queue *rxq;\n+\tstruct cpfl_tx_queue *cpfl_txq;\n+\tstruct cpfl_rx_queue *cpfl_rxq;\n+\tint i, j;\n+\n+\tif (len <= 0)\n+\t\treturn -EINVAL;\n+\n+\tif (cpfl_vport->p2p_q_chunks_info == NULL)\n+\t\treturn -ENOTSUP;\n+\n+\tif (tx > 0) {\n+\t\tfor (i = cpfl_vport->nb_data_txq, j = 0; i < dev->data->nb_tx_queues; i++, j++) {\n+\t\t\ttxq = dev->data->tx_queues[i];\n+\t\t\tif (txq == NULL)\n+\t\t\t\treturn -EINVAL;\n+\t\t\tcpfl_txq = (struct cpfl_tx_queue *)txq;\n+\t\t\tpeer_ports[j] = cpfl_txq->hairpin_info.peer_rxp;\n+\t\t}\n+\t} else if (tx == 0) {\n+\t\tfor (i = cpfl_vport->nb_data_rxq, j = 0; i < dev->data->nb_rx_queues; i++, j++) {\n+\t\t\trxq = dev->data->rx_queues[i];\n+\t\t\tif (rxq == NULL)\n+\t\t\t\treturn -EINVAL;\n+\t\t\tcpfl_rxq = (struct cpfl_rx_queue *)rxq;\n+\t\t\tpeer_ports[j] = cpfl_rxq->hairpin_info.peer_txp;\n+\t\t}\n+\t}\n+\n+\treturn j;\n+}\n+\n static const struct eth_dev_ops cpfl_eth_dev_ops = {\n \t.dev_configure\t\t\t= cpfl_dev_configure,\n \t.dev_close\t\t\t= cpfl_dev_close,\n@@ -1109,6 +1148,7 @@ static const struct eth_dev_ops cpfl_eth_dev_ops = {\n \t.hairpin_cap_get\t\t= cpfl_hairpin_cap_get,\n \t.rx_hairpin_queue_setup\t\t= cpfl_rx_hairpin_queue_setup,\n \t.tx_hairpin_queue_setup\t\t= cpfl_tx_hairpin_queue_setup,\n+\t.hairpin_get_peer_ports         = cpfl_hairpin_get_peer_ports,\n };\n \n static int\n",
    "prefixes": [
        "v5",
        "12/13"
    ]
}