get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126614,
    "url": "http://patches.dpdk.org/api/patches/126614/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230428071055.362-7-doshir@vmware.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": "<20230428071055.362-7-doshir@vmware.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230428071055.362-7-doshir@vmware.com",
    "date": "2023-04-28T07:10:53",
    "name": "[v3,next,6/7] net/vmxnet3: avoid updating rxprod register frequently",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ddb9969df4924cda648ab784fda4249eaa3989c1",
    "submitter": {
        "id": 3045,
        "url": "http://patches.dpdk.org/api/people/3045/?format=api",
        "name": "Ronak Doshi",
        "email": "doshir@vmware.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/20230428071055.362-7-doshir@vmware.com/mbox/",
    "series": [
        {
            "id": 27895,
            "url": "http://patches.dpdk.org/api/series/27895/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27895",
            "date": "2023-04-28T07:10:47",
            "name": "net/vmxnet3: upgrade to version 7",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/27895/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126614/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/126614/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 8C7FB42A12;\n\tFri, 28 Apr 2023 09:27:48 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D130C42F9E;\n\tFri, 28 Apr 2023 09:27:01 +0200 (CEST)",
            "from EX-PRD-EDGE02.vmware.com (EX-PRD-EDGE02.vmware.com\n [208.91.3.34]) by mails.dpdk.org (Postfix) with ESMTP id ABA5742D77\n for <dev@dpdk.org>; Fri, 28 Apr 2023 09:11:11 +0200 (CEST)",
            "from sc9-mailhost3.vmware.com (10.113.161.73) by\n EX-PRD-EDGE02.vmware.com (10.188.245.7) with Microsoft SMTP Server id\n 15.1.2375.34; Fri, 28 Apr 2023 00:10:56 -0700",
            "from htb-1n-eng-dhcp122.eng.vmware.com (unknown [10.20.114.216])\n by sc9-mailhost3.vmware.com (Postfix) with ESMTP id D565720302;\n Fri, 28 Apr 2023 00:10:58 -0700 (PDT)",
            "by htb-1n-eng-dhcp122.eng.vmware.com (Postfix, from userid 0)\n id D0AD3A83B6; Fri, 28 Apr 2023 00:10:58 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; s=s1024; d=vmware.com;\n h=from:to:cc:subject:date:message-id:in-reply-to:mime-version:\n content-type; bh=7Qp9gpCa7+IRbcrytySuRMSJQVWMKDOipHc3Nx3mocs=;\n b=Gdpsbl1KRlR3a/X1ykHu+Zb3mFL8Q0GjR5ITLIXF/H06Uj1c6cXM8hyECvrqnG\n +086b2/37Y6Nr0tI35s3L/KutacYpHE7d6gKEjFGLc2PHQWtUp3il2MC0yO0FF\n DuXoT+jtYVk26GhnRmXwTxDIRY+xJtopd4oMe860T/yDCsI=",
        "From": "Ronak Doshi <doshir@vmware.com>",
        "To": "Jochen Behrens <jbehrens@vmware.com>",
        "CC": "<dev@dpdk.org>, Ronak Doshi <doshir@vmware.com>",
        "Subject": "[PATCH v3 next 6/7] net/vmxnet3: avoid updating rxprod register\n frequently",
        "Date": "Fri, 28 Apr 2023 00:10:53 -0700",
        "Message-ID": "<20230428071055.362-7-doshir@vmware.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20230428071055.362-1-doshir@vmware.com>",
        "References": "<20230428071055.362-1-doshir@vmware.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "Received-SPF": "None (EX-PRD-EDGE02.vmware.com: doshir@vmware.com does not\n designate permitted sender hosts)",
        "X-Mailman-Approved-At": "Fri, 28 Apr 2023 09:26:51 +0200",
        "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": "When UPT is enabled, the driver updates rxprod register to\nlet the device know that it has processed the received packets\nand new buffers are available. However, updating it too\nfrequently can lead to reduced performance.\n\nThis patch adds code to avoid updating the register frequently.\n\nSigned-off-by: Ronak Doshi <doshir@vmware.com>\nAcked-by: Jochen Behrens <jbehrens@vmware.com>\n---\n drivers/net/vmxnet3/vmxnet3_rxtx.c | 14 +++++++++-----\n 1 file changed, 9 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c\nindex 7bbae4177e..39ad0726cb 100644\n--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c\n+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c\n@@ -1007,7 +1007,8 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \n \t\t/* It's time to renew descriptors */\n \t\tvmxnet3_renew_desc(rxq, ring_idx, newm);\n-\t\tif (unlikely(rxq->shared->ctrl.updateRxProd)) {\n+\t\tif (unlikely(rxq->shared->ctrl.updateRxProd &&\n+\t\t\t (rxq->cmd_ring[ring_idx].next2fill & 0xf) == 0)) {\n \t\t\tVMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +\n \t\t\t\t\t       (rxq->queue_id * VMXNET3_REG_ALIGN),\n \t\t\t\t\t       rxq->cmd_ring[ring_idx].next2fill);\n@@ -1027,18 +1028,21 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \n \tif (unlikely(nb_rxd == 0)) {\n \t\tuint32_t avail;\n+\t\tuint32_t posted = 0;\n \t\tfor (ring_idx = 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; ring_idx++) {\n \t\t\tavail = vmxnet3_cmd_ring_desc_avail(&rxq->cmd_ring[ring_idx]);\n \t\t\tif (unlikely(avail > 0)) {\n \t\t\t\t/* try to alloc new buf and renew descriptors */\n-\t\t\t\tvmxnet3_post_rx_bufs(rxq, ring_idx);\n+\t\t\t\tif (vmxnet3_post_rx_bufs(rxq, ring_idx) > 0)\n+\t\t\t\t\tposted |= (1 << ring_idx);\n \t\t\t}\n \t\t}\n \t\tif (unlikely(rxq->shared->ctrl.updateRxProd)) {\n \t\t\tfor (ring_idx = 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; ring_idx++) {\n-\t\t\t\tVMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +\n-\t\t\t\t\t\t       (rxq->queue_id * VMXNET3_REG_ALIGN),\n-\t\t\t\t\t\t       rxq->cmd_ring[ring_idx].next2fill);\n+\t\t\t\tif (posted & (1 << ring_idx))\n+\t\t\t\t\tVMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +\n+\t\t\t\t\t\t\t       (rxq->queue_id * VMXNET3_REG_ALIGN),\n+\t\t\t\t\t\t\t       rxq->cmd_ring[ring_idx].next2fill);\n \t\t\t}\n \t\t}\n \t}\n",
    "prefixes": [
        "v3",
        "next",
        "6/7"
    ]
}