get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 5112,
    "url": "https://patches.dpdk.org/api/patches/5112/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1433359137-12720-2-git-send-email-rolette@infiniteio.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": "<1433359137-12720-2-git-send-email-rolette@infiniteio.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1433359137-12720-2-git-send-email-rolette@infiniteio.com",
    "date": "2015-06-03T19:18:56",
    "name": "[dpdk-dev,2/3] kni: minor opto",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b68bc30db1245bca94f3cbdc323545a8f88322be",
    "submitter": {
        "id": 61,
        "url": "https://patches.dpdk.org/api/people/61/?format=api",
        "name": "Jay Rolette",
        "email": "rolette@infiniteio.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1433359137-12720-2-git-send-email-rolette@infiniteio.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/5112/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/5112/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 88306C346;\n\tWed,  3 Jun 2015 21:19:31 +0200 (CEST)",
            "from mail-ob0-f171.google.com (mail-ob0-f171.google.com\n\t[209.85.214.171]) by dpdk.org (Postfix) with ESMTP id 46523C338\n\tfor <dev@dpdk.org>; Wed,  3 Jun 2015 21:19:30 +0200 (CEST)",
            "by obew15 with SMTP id w15so16081421obe.1\n\tfor <dev@dpdk.org>; Wed, 03 Jun 2015 12:19:29 -0700 (PDT)",
            "from localhost.localdomain (rrcs-97-77-120-78.sw.biz.rr.com.\n\t[97.77.120.78]) by mx.google.com with ESMTPSA id\n\tc9sm12039646oih.11.2015.06.03.12.19.27\n\t(version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 03 Jun 2015 12:19:28 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=VnScuhj7lLiBxNeYeC0vjaRXk4ioS9PLptdmbjQzdhQ=;\n\tb=N9DkJQB9I1lvmU4oiicMd9KZUOstXvtNW+ffW8vXCqd+vtI7uLE3f8T5b0aRJoNs79\n\tH4Qxe6DpaBlPKCehgs9/RqwlXWYBzKWWOydy4Ge0i3IpXvli/bHqPYeP5AhkfnaAC1/B\n\tM2W0CrOH/2Efg3XoI52njmlucgMyjrRo09loi+knyveG2GxLCKWnqJn+ZKer+LX8q6Me\n\tylbcIBncEeIR9fRY7JpcEemGPqvkKMutv+FKQTlKTRDHN/gOkCqKOzOKkCYArItpL3T5\n\tX76uVbWYW7MPIBr8fT38wkKOSyk5B42sORz+zZSKsMmQAOF7mAYXASQPEIy0PkI2thUO\n\tfg/Q==",
        "X-Gm-Message-State": "ALoCoQkU3pfSY1/nwN5FA2eReBRKbH1YSD69tRzbAse4TUXdAZnLKAUJYPPdHPOJcIsgSPQFI/nc",
        "X-Received": "by 10.182.102.162 with SMTP id fp2mr28782427obb.39.1433359169641;\n\tWed, 03 Jun 2015 12:19:29 -0700 (PDT)",
        "From": "Jay Rolette <rolette@infiniteio.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed,  3 Jun 2015 14:18:56 -0500",
        "Message-Id": "<1433359137-12720-2-git-send-email-rolette@infiniteio.com>",
        "X-Mailer": "git-send-email 2.3.2 (Apple Git-55)",
        "In-Reply-To": "<1433359137-12720-1-git-send-email-rolette@infiniteio.com>",
        "References": "<1433359137-12720-1-git-send-email-rolette@infiniteio.com>",
        "Subject": "[dpdk-dev] [PATCH 2/3] kni: minor opto",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "No reason to check out many entries are in kni->rx_q prior to\nactually pulling them from the fifo. You can't dequeue more than\nare there anyway. Max entries to dequeue is either the max batch\nsize or however much space is available on kni->free_q (lesser of the two)\n\nSigned-off-by: Jay Rolette <rolette@infiniteio.com>\n---\n lib/librte_eal/linuxapp/kni/kni_net.c | 21 ++++++++-------------\n 1 file changed, 8 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c\nindex dd95db5..13ccbb8 100644\n--- a/lib/librte_eal/linuxapp/kni/kni_net.c\n+++ b/lib/librte_eal/linuxapp/kni/kni_net.c\n@@ -131,7 +131,7 @@ kni_net_rx_normal(struct kni_dev *kni)\n {\n \tunsigned ret;\n \tuint32_t len;\n-\tunsigned i, num, num_rq, num_fq;\n+\tunsigned i, num, num_fq;\n \tstruct rte_kni_mbuf *kva;\n \tstruct rte_kni_mbuf *va[MBUF_BURST_SZ];\n \tvoid * data_kva;\n@@ -139,24 +139,19 @@ kni_net_rx_normal(struct kni_dev *kni)\n \tstruct sk_buff *skb;\n \tstruct net_device *dev = kni->net_dev;\n \n-\t/* Get the number of entries in rx_q */\n-\tnum_rq = kni_fifo_count(kni->rx_q);\n-\n \t/* Get the number of free entries in free_q */\n-\tnum_fq = kni_fifo_free_count(kni->free_q);\n-\n-\t/* Calculate the number of entries to dequeue in rx_q */\n-\tnum = min(num_rq, num_fq);\n-\tnum = min(num, (unsigned)MBUF_BURST_SZ);\n-\n-\t/* Return if no entry in rx_q and no free entry in free_q */\n-\tif (num == 0)\n+\tif ((num_fq = kni_fifo_free_count(kni->free_q)) == 0) {\n+\t\t/* No room on the free_q, bail out */\n \t\treturn;\n+\t}\n+\n+\t/* Calculate the number of entries to dequeue from rx_q */\n+\tnum = min(num_fq, (unsigned)MBUF_BURST_SZ);\n \n \t/* Burst dequeue from rx_q */\n \tret = kni_fifo_get(kni->rx_q, (void **)va, num);\n \tif (ret == 0)\n-\t\treturn; /* Failing should not happen */\n+\t\treturn;\n \n \t/* Transfer received packets to netif */\n \tfor (i = 0; i < num; i++) {\n",
    "prefixes": [
        "dpdk-dev",
        "2/3"
    ]
}