get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134887,
    "url": "https://patches.dpdk.org/api/patches/134887/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20231206172419.878-1-pbhagavatula@marvell.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": "<20231206172419.878-1-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231206172419.878-1-pbhagavatula@marvell.com",
    "date": "2023-12-06T17:24:17",
    "name": "[v3,1/3] net/octeon_ep: optimize Rx and Tx routines",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "d79c211adccb3a8ca65f0b4a99834bfe82b49ccd",
    "submitter": {
        "id": 1183,
        "url": "https://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20231206172419.878-1-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 30463,
            "url": "https://patches.dpdk.org/api/series/30463/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30463",
            "date": "2023-12-06T17:24:17",
            "name": "[v3,1/3] net/octeon_ep: optimize Rx and Tx routines",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/30463/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/134887/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/134887/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 380AD4368C;\n\tWed,  6 Dec 2023 18:24:32 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E3A7F4029C;\n\tWed,  6 Dec 2023 18:24:30 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 2D0C34021E\n for <dev@dpdk.org>; Wed,  6 Dec 2023 18:24:27 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3B6CCCgh032691 for <dev@dpdk.org>; Wed, 6 Dec 2023 09:24:25 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3utd0ruc6h-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 06 Dec 2023 09:24:24 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Wed, 6 Dec 2023 09:24:23 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Wed, 6 Dec 2023 09:24:23 -0800",
            "from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com\n [10.28.164.106])\n by maili.marvell.com (Postfix) with ESMTP id 9FCD23F704E;\n Wed,  6 Dec 2023 09:24:21 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=hnmTDQ4yHx4IqzH/o8vCIB8i1TH7KcNBVSPboNnei1E=;\n b=dfp05Uav28E6Vftader/pGhzwb13AQiiLRhMGPuHp7A95meET43sZ+/5BuG5wV7RH3tA\n h62WQsRAc1os0CqktDjq8igY2EZbibFQhE4u4OKXr4YyNOZedXFHqgUEjoS+kKO+RdRk\n XPzPxYpQiVZIFRz7VJgYR3MNFLTO82jcWYBsE8jmf2F91jTo4rNtwIk5OMoLAeyjQIxT\n xPEGwc/n0f7GKDPAy+AMYBKCYCT+IawQHfVT94AS4gyoTJIDYCrtxuItiWqUQgbgaZkN\n CtmcYyrV6DGXzAnRpJuRLF9+PVNT+slBYMFXbZv+sCwVor8/GmOo6oTFogku6OJtKmky pQ==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Subject": "[PATCH v3 1/3] net/octeon_ep: optimize Rx and Tx routines",
        "Date": "Wed, 6 Dec 2023 22:54:17 +0530",
        "Message-ID": "<20231206172419.878-1-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20231125160349.2021-1-pbhagavatula@marvell.com>",
        "References": "<20231125160349.2021-1-pbhagavatula@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "_xNira5ihxkprfI48gmTAV_flKwYYK3O",
        "X-Proofpoint-GUID": "_xNira5ihxkprfI48gmTAV_flKwYYK3O",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-12-06_15,2023-12-06_01,2023-05-22_02",
        "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: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nPreset rearm data to avoid writing multiple fields in fastpath,\nIncrease maximum outstanding Tx instructions from 128 to 256.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\nv3 Chnages:\n- Add more comments to the code.\n- Re-enable 32b build to prevent ABI break.\nv2 Changes:\n- Skip compiling for 32b x86 targets.\n\n drivers/net/octeon_ep/cnxk_ep_rx.c    | 12 ++++++++----\n drivers/net/octeon_ep/otx_ep_common.h |  3 +++\n drivers/net/octeon_ep/otx_ep_rxtx.c   | 27 +++++++++++++++++++++++++++\n drivers/net/octeon_ep/otx_ep_rxtx.h   |  2 +-\n 4 files changed, 39 insertions(+), 5 deletions(-)\n\n--\n2.25.1",
    "diff": "diff --git a/drivers/net/octeon_ep/cnxk_ep_rx.c b/drivers/net/octeon_ep/cnxk_ep_rx.c\nindex 74f0011283..75bb7225d2 100644\n--- a/drivers/net/octeon_ep/cnxk_ep_rx.c\n+++ b/drivers/net/octeon_ep/cnxk_ep_rx.c\n@@ -93,7 +93,7 @@ cnxk_ep_check_rx_pkts(struct otx_ep_droq *droq)\n \tnew_pkts = val - droq->pkts_sent_ism_prev;\n \tdroq->pkts_sent_ism_prev = val;\n\n-\tif (val > (uint32_t)(1 << 31)) {\n+\tif (val > RTE_BIT32(31)) {\n \t\t/* Only subtract the packet count in the HW counter\n \t\t * when count above halfway to saturation.\n \t\t */\n@@ -128,7 +128,6 @@ cnxk_ep_process_pkts_scalar(struct rte_mbuf **rx_pkts, struct otx_ep_droq *droq,\n {\n \tstruct rte_mbuf **recv_buf_list = droq->recv_buf_list;\n \tuint32_t bytes_rsvd = 0, read_idx = droq->read_idx;\n-\tuint16_t port_id = droq->otx_ep_dev->port_id;\n \tuint16_t nb_desc = droq->nb_desc;\n \tuint16_t pkts;\n\n@@ -137,14 +136,19 @@ cnxk_ep_process_pkts_scalar(struct rte_mbuf **rx_pkts, struct otx_ep_droq *droq,\n \t\tstruct rte_mbuf *mbuf;\n \t\tuint16_t pkt_len;\n\n+\t\trte_prefetch0(recv_buf_list[otx_ep_incr_index(read_idx, 2, nb_desc)]);\n+\t\trte_prefetch0(rte_pktmbuf_mtod(recv_buf_list[otx_ep_incr_index(read_idx,\n+\t\t\t\t\t\t\t\t\t       2, nb_desc)],\n+\t\t\t      void *));\n+\n \t\tmbuf = recv_buf_list[read_idx];\n \t\tinfo = rte_pktmbuf_mtod(mbuf, struct otx_ep_droq_info *);\n \t\tread_idx = otx_ep_incr_index(read_idx, 1, nb_desc);\n \t\tpkt_len = rte_bswap16(info->length >> 48);\n-\t\tmbuf->data_off += OTX_EP_INFO_SIZE;\n \t\tmbuf->pkt_len = pkt_len;\n \t\tmbuf->data_len = pkt_len;\n-\t\tmbuf->port = port_id;\n+\n+\t\t*(uint64_t *)&mbuf->rearm_data = droq->rearm_data;\n \t\trx_pkts[pkts] = mbuf;\n \t\tbytes_rsvd += pkt_len;\n \t}\ndiff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h\nindex 82e57520d3..299b5122d8 100644\n--- a/drivers/net/octeon_ep/otx_ep_common.h\n+++ b/drivers/net/octeon_ep/otx_ep_common.h\n@@ -365,6 +365,9 @@ struct otx_ep_droq {\n \t/* receive buffer list contains mbuf ptr list */\n \tstruct rte_mbuf **recv_buf_list;\n\n+\t/* Packet re-arm data. */\n+\tuint64_t rearm_data;\n+\n \t/* Packets pending to be processed */\n \tuint64_t pkts_pending;\n\ndiff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c\nindex c421ef0a1c..40c4a16a38 100644\n--- a/drivers/net/octeon_ep/otx_ep_rxtx.c\n+++ b/drivers/net/octeon_ep/otx_ep_rxtx.c\n@@ -284,6 +284,32 @@ otx_ep_droq_setup_ring_buffers(struct otx_ep_droq *droq)\n \treturn 0;\n }\n\n+static inline uint64_t\n+otx_ep_set_rearm_data(struct otx_ep_device *otx_ep)\n+{\n+\tuint16_t port_id = otx_ep->port_id;\n+\tstruct rte_mbuf mb_def;\n+\tuint64_t *tmp;\n+\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) % 8 != 0);\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, refcnt) - offsetof(struct rte_mbuf, data_off) !=\n+\t\t\t 2);\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, nb_segs) - offsetof(struct rte_mbuf, data_off) !=\n+\t\t\t 4);\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, port) - offsetof(struct rte_mbuf, data_off) !=\n+\t\t\t 6);\n+\tmb_def.nb_segs = 1;\n+\tmb_def.data_off = RTE_PKTMBUF_HEADROOM + OTX_EP_INFO_SIZE;\n+\tmb_def.port = port_id;\n+\trte_mbuf_refcnt_set(&mb_def, 1);\n+\n+\t/* Prevent compiler reordering: rearm_data covers previous fields */\n+\trte_compiler_barrier();\n+\ttmp = (uint64_t *)&mb_def.rearm_data;\n+\n+\treturn *tmp;\n+}\n+\n /* OQ initialization */\n static int\n otx_ep_init_droq(struct otx_ep_device *otx_ep, uint32_t q_no,\n@@ -340,6 +366,7 @@ otx_ep_init_droq(struct otx_ep_device *otx_ep, uint32_t q_no,\n \t\tgoto init_droq_fail;\n\n \tdroq->refill_threshold = c_refill_threshold;\n+\tdroq->rearm_data = otx_ep_set_rearm_data(otx_ep);\n\n \t/* Set up OQ registers */\n \tret = otx_ep->fn_list.setup_oq_regs(otx_ep, q_no);\ndiff --git a/drivers/net/octeon_ep/otx_ep_rxtx.h b/drivers/net/octeon_ep/otx_ep_rxtx.h\nindex cb68ef3b41..b159c32cae 100644\n--- a/drivers/net/octeon_ep/otx_ep_rxtx.h\n+++ b/drivers/net/octeon_ep/otx_ep_rxtx.h\n@@ -17,7 +17,7 @@\n\n #define OTX_EP_FSZ 28\n #define OTX2_EP_FSZ 24\n-#define OTX_EP_MAX_INSTR 128\n+#define OTX_EP_MAX_INSTR 256\n\n /* SDP_LENGTH_S specifies packet length and is of 8-byte size */\n #define OTX_EP_INFO_SIZE 8\n",
    "prefixes": [
        "v3",
        "1/3"
    ]
}