get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86994,
    "url": "http://patches.dpdk.org/api/patches/86994/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210120142723.14090-5-hemant.agrawal@nxp.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": "<20210120142723.14090-5-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210120142723.14090-5-hemant.agrawal@nxp.com",
    "date": "2021-01-20T14:27:19",
    "name": "[4/7] net/dpaa2: support external buffers in Tx",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "de30701c1d16f4d0e6ad804ff49880101b43b7fe",
    "submitter": {
        "id": 477,
        "url": "http://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.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/20210120142723.14090-5-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 14872,
            "url": "http://patches.dpdk.org/api/series/14872/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14872",
            "date": "2021-01-20T14:27:15",
            "name": "NXP DPAAx ethernet PMD changes",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/14872/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/86994/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/86994/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 AE896A0A05;\n\tWed, 20 Jan 2021 15:38:53 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F2143140DC2;\n\tWed, 20 Jan 2021 15:38:25 +0100 (CET)",
            "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n by mails.dpdk.org (Postfix) with ESMTP id 983F6140D47\n for <dev@dpdk.org>; Wed, 20 Jan 2021 15:38:20 +0100 (CET)",
            "from inva021.nxp.com (localhost [127.0.0.1])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5C4472014E3;\n Wed, 20 Jan 2021 15:38:20 +0100 (CET)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1A84D2014DD;\n Wed, 20 Jan 2021 15:38:19 +0100 (CET)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 17A7F40324;\n Wed, 20 Jan 2021 15:38:17 +0100 (CET)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org,\n\tferruh.yigit@intel.com",
        "Date": "Wed, 20 Jan 2021 19:57:19 +0530",
        "Message-Id": "<20210120142723.14090-5-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210120142723.14090-1-hemant.agrawal@nxp.com>",
        "References": "<20210120142723.14090-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH 4/7] net/dpaa2: support external buffers in Tx",
        "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": "From: Nipun Gupta <nipun.gupta@nxp.com>\n\nThis patch support tx of external allocated buffers.\n\nSigned-off-by: Nipun Gupta <nipun.gupta@nxp.com>\nAcked-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/net/dpaa2/dpaa2_rxtx.c | 38 ++++++++++++++++++++++++++++++++++\n 1 file changed, 38 insertions(+)",
    "diff": "diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c\nindex 7d2a7809d3..de297d8274 100644\n--- a/drivers/net/dpaa2/dpaa2_rxtx.c\n+++ b/drivers/net/dpaa2/dpaa2_rxtx.c\n@@ -1065,6 +1065,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \tstruct rte_eth_dev_data *eth_data = dpaa2_q->eth_data;\n \tstruct dpaa2_dev_priv *priv = eth_data->dev_private;\n \tuint32_t flags[MAX_TX_RING_SLOTS] = {0};\n+\tstruct rte_mbuf **orig_bufs = bufs;\n \n \tif (unlikely(!DPAA2_PER_LCORE_DPIO)) {\n \t\tret = dpaa2_affine_qbman_swp();\n@@ -1148,6 +1149,25 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\t\tmi = rte_mbuf_from_indirect(*bufs);\n \t\t\t\tmp = mi->pool;\n \t\t\t}\n+\n+\t\t\tif (unlikely(RTE_MBUF_HAS_EXTBUF(*bufs))) {\n+\t\t\t\trte_mbuf_refcnt_update(*bufs, 1);\n+\t\t\t\tif (unlikely((*bufs)->nb_segs > 1)) {\n+\t\t\t\t\tif (eth_mbuf_to_sg_fd(*bufs,\n+\t\t\t\t\t\t\t      &fd_arr[loop],\n+\t\t\t\t\t\t\t      mp, 0))\n+\t\t\t\t\t\tgoto send_n_return;\n+\t\t\t\t} else {\n+\t\t\t\t\teth_mbuf_to_fd(*bufs,\n+\t\t\t\t\t\t       &fd_arr[loop], 0);\n+\t\t\t\t}\n+\t\t\t\tbufs++;\n+#ifdef RTE_LIBRTE_IEEE1588\n+\t\t\t\tenable_tx_tstamp(&fd_arr[loop]);\n+#endif\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n \t\t\t/* Not a hw_pkt pool allocated frame */\n \t\t\tif (unlikely(!mp || !priv->bp_list)) {\n \t\t\t\tDPAA2_PMD_ERR(\"Err: No buffer pool attached\");\n@@ -1220,6 +1240,15 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\tnb_pkts -= loop;\n \t}\n \tdpaa2_q->tx_pkts += num_tx;\n+\n+\tloop = 0;\n+\twhile (loop < num_tx) {\n+\t\tif (unlikely(RTE_MBUF_HAS_EXTBUF(*orig_bufs)))\n+\t\t\trte_pktmbuf_free(*orig_bufs);\n+\t\torig_bufs++;\n+\t\tloop++;\n+\t}\n+\n \treturn num_tx;\n \n send_n_return:\n@@ -1246,6 +1275,15 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t}\n skip_tx:\n \tdpaa2_q->tx_pkts += num_tx;\n+\n+\tloop = 0;\n+\twhile (loop < num_tx) {\n+\t\tif (unlikely(RTE_MBUF_HAS_EXTBUF(*orig_bufs)))\n+\t\t\trte_pktmbuf_free(*orig_bufs);\n+\t\torig_bufs++;\n+\t\tloop++;\n+\t}\n+\n \treturn num_tx;\n }\n \n",
    "prefixes": [
        "4/7"
    ]
}