get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62219,
    "url": "http://patches.dpdk.org/api/patches/62219/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191030120955.26904-5-nipun.gupta@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": "<20191030120955.26904-5-nipun.gupta@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191030120955.26904-5-nipun.gupta@nxp.com",
    "date": "2019-10-30T12:09:50",
    "name": "[4/9,v3] net/dpaa2: add retry and timeout in packet enqueue API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5649a1f0906b089741a7d5293e110bc15a99aa8a",
    "submitter": {
        "id": 471,
        "url": "http://patches.dpdk.org/api/people/471/?format=api",
        "name": "Nipun Gupta",
        "email": "nipun.gupta@nxp.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191030120955.26904-5-nipun.gupta@nxp.com/mbox/",
    "series": [
        {
            "id": 7158,
            "url": "http://patches.dpdk.org/api/series/7158/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7158",
            "date": "2019-10-30T12:09:46",
            "name": "DPAA and FSLMC driver fixes and cleanup",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/7158/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/62219/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/62219/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 33519A00BE;\n\tWed, 30 Oct 2019 13:27:01 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1A1EB1C0C0;\n\tWed, 30 Oct 2019 13:26:38 +0100 (CET)",
            "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n by dpdk.org (Postfix) with ESMTP id DF19A1C067;\n Wed, 30 Oct 2019 13:26:12 +0100 (CET)",
            "from inva021.nxp.com (localhost [127.0.0.1])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C41AC200473;\n Wed, 30 Oct 2019 13:26:12 +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 C990E20078F;\n Wed, 30 Oct 2019 13:26:08 +0100 (CET)",
            "from GDB1.ap.freescale.net (gdb1.ap.freescale.net [10.232.132.179])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 89EE240320;\n Wed, 30 Oct 2019 20:26:02 +0800 (SGT)"
        ],
        "From": "Nipun Gupta <nipun.gupta@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com,\n sachin.saxena@nxp.com, stable@dpdk.org, Nipun Gupta <nipun.gupta@nxp.com>,\n Radu Bulie <radu-andrei.bulie@nxp.com>",
        "Date": "Wed, 30 Oct 2019 17:39:50 +0530",
        "Message-Id": "<20191030120955.26904-5-nipun.gupta@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191030120955.26904-1-nipun.gupta@nxp.com>",
        "References": "<20191011054657.21931-1-nipun.gupta@nxp.com>\n <20191030120955.26904-1-nipun.gupta@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH 4/9 v3] net/dpaa2: add retry and timeout in\n\tpacket enqueue API",
        "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": "In the packet transmit, if the QBMAN is not able to process the\npackets, the Tx function loops infinitely to send the packet out.\nThis patch changes the logic retry for some time (count) and then\nreturn.\n\nFixes: cd9935cec873 (\"net/dpaa2: enable Rx and Tx operations\")\nFixes: 16c4a3c46ab7 (\"bus/fslmc: add enqueue response read in qbman\")\nCc: stable@dpdk.org\n\nSigned-off-by: Nipun Gupta <nipun.gupta@nxp.com>\nSigned-off-by: Radu Bulie <radu-andrei.bulie@nxp.com>\n---\n drivers/bus/fslmc/portal/dpaa2_hw_pvt.h |  2 +\n drivers/net/dpaa2/dpaa2_rxtx.c          | 72 ++++++++++++++++++++-----\n 2 files changed, 60 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h\nindex db6dad544..4ed82f574 100644\n--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h\n+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h\n@@ -59,6 +59,8 @@\n #define DPAA2_SWP_CINH_REGION\t\t1\n #define DPAA2_SWP_CENA_MEM_REGION\t2\n \n+#define DPAA2_MAX_TX_RETRY_COUNT\t10000\n+\n #define MC_PORTAL_INDEX\t\t0\n #define NUM_DPIO_REGIONS\t2\n #define NUM_DQS_PER_QUEUE       2\ndiff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c\nindex b7b2d8652..52d913d9e 100644\n--- a/drivers/net/dpaa2/dpaa2_rxtx.c\n+++ b/drivers/net/dpaa2/dpaa2_rxtx.c\n@@ -1135,15 +1135,28 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n #endif\n \t\t\tbufs++;\n \t\t}\n+\n \t\tloop = 0;\n+\t\tretry_count = 0;\n \t\twhile (loop < frames_to_send) {\n-\t\t\tloop += qbman_swp_enqueue_multiple(swp, &eqdesc,\n+\t\t\tret = qbman_swp_enqueue_multiple(swp, &eqdesc,\n \t\t\t\t\t&fd_arr[loop], &flags[loop],\n \t\t\t\t\tframes_to_send - loop);\n+\t\t\tif (unlikely(ret < 0)) {\n+\t\t\t\tretry_count++;\n+\t\t\t\tif (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {\n+\t\t\t\t\tnum_tx += loop;\n+\t\t\t\t\tnb_pkts -= loop;\n+\t\t\t\t\tgoto send_n_return;\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tloop += ret;\n+\t\t\t\tretry_count = 0;\n+\t\t\t}\n \t\t}\n \n-\t\tnum_tx += frames_to_send;\n-\t\tnb_pkts -= frames_to_send;\n+\t\tnum_tx += loop;\n+\t\tnb_pkts -= loop;\n \t}\n \tdpaa2_q->tx_pkts += num_tx;\n \treturn num_tx;\n@@ -1153,13 +1166,22 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \tif (loop) {\n \t\tunsigned int i = 0;\n \n+\t\tretry_count = 0;\n \t\twhile (i < loop) {\n-\t\t\ti += qbman_swp_enqueue_multiple(swp, &eqdesc,\n-\t\t\t\t\t\t\t&fd_arr[i],\n-\t\t\t\t\t\t\t&flags[loop],\n-\t\t\t\t\t\t\tloop - i);\n+\t\t\tret = qbman_swp_enqueue_multiple(swp, &eqdesc,\n+\t\t\t\t\t\t\t &fd_arr[i],\n+\t\t\t\t\t\t\t &flags[i],\n+\t\t\t\t\t\t\t loop - i);\n+\t\t\tif (unlikely(ret < 0)) {\n+\t\t\t\tretry_count++;\n+\t\t\t\tif (retry_count > DPAA2_MAX_TX_RETRY_COUNT)\n+\t\t\t\t\tbreak;\n+\t\t\t} else {\n+\t\t\t\ti += ret;\n+\t\t\t\tretry_count = 0;\n+\t\t\t}\n \t\t}\n-\t\tnum_tx += loop;\n+\t\tnum_tx += i;\n \t}\n skip_tx:\n \tdpaa2_q->tx_pkts += num_tx;\n@@ -1365,15 +1387,28 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\t}\n \t\t\tbufs++;\n \t\t}\n+\n \t\tloop = 0;\n+\t\tretry_count = 0;\n \t\twhile (loop < frames_to_send) {\n-\t\t\tloop += qbman_swp_enqueue_multiple_desc(swp,\n+\t\t\tret = qbman_swp_enqueue_multiple_desc(swp,\n \t\t\t\t\t&eqdesc[loop], &fd_arr[loop],\n \t\t\t\t\tframes_to_send - loop);\n+\t\t\tif (unlikely(ret < 0)) {\n+\t\t\t\tretry_count++;\n+\t\t\t\tif (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {\n+\t\t\t\t\tnum_tx += loop;\n+\t\t\t\t\tnb_pkts -= loop;\n+\t\t\t\t\tgoto send_n_return;\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tloop += ret;\n+\t\t\t\tretry_count = 0;\n+\t\t\t}\n \t\t}\n \n-\t\tnum_tx += frames_to_send;\n-\t\tnb_pkts -= frames_to_send;\n+\t\tnum_tx += loop;\n+\t\tnb_pkts -= loop;\n \t}\n \tdpaa2_q->tx_pkts += num_tx;\n \treturn num_tx;\n@@ -1383,11 +1418,20 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \tif (loop) {\n \t\tunsigned int i = 0;\n \n+\t\tretry_count = 0;\n \t\twhile (i < loop) {\n-\t\t\ti += qbman_swp_enqueue_multiple_desc(swp, &eqdesc[loop],\n-\t\t\t\t\t\t\t&fd_arr[i], loop - i);\n+\t\t\tret = qbman_swp_enqueue_multiple_desc(swp,\n+\t\t\t\t       &eqdesc[loop], &fd_arr[i], loop - i);\n+\t\t\tif (unlikely(ret < 0)) {\n+\t\t\t\tretry_count++;\n+\t\t\t\tif (retry_count > DPAA2_MAX_TX_RETRY_COUNT)\n+\t\t\t\t\tbreak;\n+\t\t\t} else {\n+\t\t\t\ti += ret;\n+\t\t\t\tretry_count = 0;\n+\t\t\t}\n \t\t}\n-\t\tnum_tx += loop;\n+\t\tnum_tx += i;\n \t}\n skip_tx:\n \tdpaa2_q->tx_pkts += num_tx;\n",
    "prefixes": [
        "4/9",
        "v3"
    ]
}