get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65638,
    "url": "http://patches.dpdk.org/api/patches/65638/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200206184432.34360-8-ajit.khaparde@broadcom.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": "<20200206184432.34360-8-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200206184432.34360-8-ajit.khaparde@broadcom.com",
    "date": "2020-02-06T18:44:32",
    "name": "[v2,7/7] net/bnxt: fix buffer allocation reattempt logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2cce2e337a2a1eaa6bf8713c19dfdfe9740b7b23",
    "submitter": {
        "id": 501,
        "url": "http://patches.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200206184432.34360-8-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 8453,
            "url": "http://patches.dpdk.org/api/series/8453/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8453",
            "date": "2020-02-06T18:44:25",
            "name": "bnxt patchset with bug fixes",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/8453/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65638/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65638/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 58E57A0541;\n\tThu,  6 Feb 2020 19:45:36 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 15A701C219;\n\tThu,  6 Feb 2020 19:44:50 +0100 (CET)",
            "from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com\n [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 4156E1C1CA;\n Thu,  6 Feb 2020 19:44:39 +0100 (CET)",
            "from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net\n [10.75.242.48])\n by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id A220D30C0AD;\n Thu,  6 Feb 2020 10:37:16 -0800 (PST)",
            "from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net\n [10.69.74.102])\n by mail-irv-17.broadcom.com (Postfix) with ESMTP id 75E0514008D;\n Thu,  6 Feb 2020 10:44:36 -0800 (PST)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com A220D30C0AD",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1581014236;\n bh=ZobIk0uDWNz1ktyFVA7oNdSr0MrbXMlEQSQDP2UYFsA=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=fL35G2zw0bxiiQhr7UgDwpr7chh95rS2NqyqvpACs0e1TdFiqMSxY2AFK5mWeyQYt\n 8KAUFvpxeJnPvkbcowH8iOnm/nRCoEkWbkZsfHyiwr8I1bqR1tL9U0xItgFaCm77Qz\n z0bsz8sEk1dgbo7lFOUGuprB9+zkYEf+n+7rVC+k=",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>,\n stable@dpdk.org, Somnath Kotur <somnath.kotur@broadcom.com>",
        "Date": "Thu,  6 Feb 2020 10:44:32 -0800",
        "Message-Id": "<20200206184432.34360-8-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)",
        "In-Reply-To": "<20200206184432.34360-1-ajit.khaparde@broadcom.com>",
        "References": "<20200206163314.12755-1-kalesh-anakkur.purayil@broadcom.com>\n <20200206184432.34360-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 7/7] net/bnxt: fix buffer allocation reattempt\n\tlogic",
        "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": "From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>\n\nIn case of a buffer allocation failure, we reattempt buffer allocation\nbefore the rx handler exits. We were not attempting this when producer\nindex is greater than the number of buffers to allocate. Fixed it with\ncorrect checks.\n\nFixes: d9dd0b29ed31 (\"net/bnxt: fix Rx handling and buffer allocation logic\")\nCc: stable@dpdk.org\n\nSigned-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>\nReviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>\n---\n drivers/net/bnxt/bnxt_rxr.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c\nindex 1f47db97b..bef9720f5 100644\n--- a/drivers/net/bnxt/bnxt_rxr.c\n+++ b/drivers/net/bnxt/bnxt_rxr.c\n@@ -678,10 +678,11 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \n \t/* Attempt to alloc Rx buf in case of a previous allocation failure. */\n \tif (rc == -ENOMEM) {\n-\t\tint i;\n+\t\tint i = RING_NEXT(rxr->rx_ring_struct, prod);\n+\t\tint cnt = nb_rx_pkts;\n \n-\t\tfor (i = prod; i <= nb_rx_pkts;\n-\t\t\ti = RING_NEXT(rxr->rx_ring_struct, i)) {\n+\t\tfor (; cnt;\n+\t\t\ti = RING_NEXT(rxr->rx_ring_struct, i), cnt--) {\n \t\t\tstruct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[i];\n \n \t\t\t/* Buffer already allocated for this index. */\n",
    "prefixes": [
        "v2",
        "7/7"
    ]
}