get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126555,
    "url": "http://patches.dpdk.org/api/patches/126555/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230426190415.28239-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": "<20230426190415.28239-7-doshir@vmware.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230426190415.28239-7-doshir@vmware.com",
    "date": "2023-04-26T19:04:13",
    "name": "[v2,next,6/7] net/vmxnet3: avoid updating rxprod register frequently",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20230426190415.28239-7-doshir@vmware.com/mbox/",
    "series": [
        {
            "id": 27877,
            "url": "http://patches.dpdk.org/api/series/27877/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27877",
            "date": "2023-04-26T19:04:07",
            "name": "net/vmxnet3: upgrade to version 7",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/27877/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126555/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/126555/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 4853E42A0A;\n\tWed, 26 Apr 2023 21:30:54 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D47A142D33;\n\tWed, 26 Apr 2023 21:30:10 +0200 (CEST)",
            "from EX-PRD-EDGE01.vmware.com (EX-PRD-EDGE01.vmware.com\n [208.91.3.33]) by mails.dpdk.org (Postfix) with ESMTP id 9E8FA42D17\n for <dev@dpdk.org>; Wed, 26 Apr 2023 21:04:35 +0200 (CEST)",
            "from sc9-mailhost2.vmware.com (10.113.161.72) by\n EX-PRD-EDGE01.vmware.com (10.188.245.6) with Microsoft SMTP Server id\n 15.1.2375.34; Wed, 26 Apr 2023 12:04:31 -0700",
            "from htb-1n-eng-dhcp122.eng.vmware.com (unknown [10.20.114.216])\n by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 446CF201EF;\n Wed, 26 Apr 2023 12:04:34 -0700 (PDT)",
            "by htb-1n-eng-dhcp122.eng.vmware.com (Postfix, from userid 0)\n id 31CE8A83B6; Wed, 26 Apr 2023 12:04:34 -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=wWAegXcm5dwSbqFAoH2XHbhmv139tL3D6gGeEqJfs2veOSG5emj4HHjAgtZC3L\n w0h1p9lNPhrq0H0uVjLr44XNGiCES0+0ot/q7xAv3uVOKH8HsgnMER8yhfQDKh\n M9M6a4Q1NfrodbmnYQyj2uwAZJ2BMn52iwTwed0jM7ifk/Y=",
        "From": "Ronak Doshi <doshir@vmware.com>",
        "To": "Jochen Behrens <jbehrens@vmware.com>",
        "CC": "<dev@dpdk.org>, Ronak Doshi <doshir@vmware.com>",
        "Subject": "[PATCH v2 next 6/7] net/vmxnet3: avoid updating rxprod register\n frequently",
        "Date": "Wed, 26 Apr 2023 12:04:13 -0700",
        "Message-ID": "<20230426190415.28239-7-doshir@vmware.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20230426190415.28239-1-doshir@vmware.com>",
        "References": "<20230426190415.28239-1-doshir@vmware.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "Received-SPF": "None (EX-PRD-EDGE01.vmware.com: doshir@vmware.com does not\n designate permitted sender hosts)",
        "X-Mailman-Approved-At": "Wed, 26 Apr 2023 21:30:01 +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": [
        "v2",
        "next",
        "6/7"
    ]
}