get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57129,
    "url": "http://patchwork.dpdk.org/api/patches/57129/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1564082659-21922-2-git-send-email-david.marchand@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1564082659-21922-2-git-send-email-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1564082659-21922-2-git-send-email-david.marchand@redhat.com",
    "date": "2019-07-25T19:24:17",
    "name": "[v3,1/3] net/pcap: fix Rx with small buffers",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3a72f3c876e87a4798e2916fc1673745359fbe7c",
    "submitter": {
        "id": 1173,
        "url": "http://patchwork.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1564082659-21922-2-git-send-email-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 5762,
            "url": "http://patchwork.dpdk.org/api/series/5762/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=5762",
            "date": "2019-07-25T19:24:16",
            "name": "Multiseg fixes for pcap pmd",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/5762/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/57129/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/57129/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1F32D1C3B3;\n\tThu, 25 Jul 2019 21:24:33 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id EF2C31C3AE;\n\tThu, 25 Jul 2019 21:24:31 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 2A004A404A;\n\tThu, 25 Jul 2019 19:24:31 +0000 (UTC)",
            "from dmarchan.remote.csb (ovpn-204-235.brq.redhat.com\n\t[10.40.204.235])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8D3AD5DDA2;\n\tThu, 25 Jul 2019 19:24:29 +0000 (UTC)"
        ],
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n\tstable@dpdk.org",
        "Date": "Thu, 25 Jul 2019 21:24:17 +0200",
        "Message-Id": "<1564082659-21922-2-git-send-email-david.marchand@redhat.com>",
        "In-Reply-To": "<1564082659-21922-1-git-send-email-david.marchand@redhat.com>",
        "References": "<1563969270-29669-1-git-send-email-david.marchand@redhat.com>\n\t<1564082659-21922-1-git-send-email-david.marchand@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]); Thu, 25 Jul 2019 19:24:31 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH v3 1/3] net/pcap: fix Rx with small buffers",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "If the pkt pool contains only buffers smaller than the default headroom,\nthen the driver will compute an invalid buffer size (negative value cast\nto an uint16_t).\nRely on the mbuf api to check how much space is available in the mbuf.\n\nFixes: 6eb0ae218a98 (\"pcap: fix mbuf allocation\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\nAcked-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\n drivers/net/pcap/rte_eth_pcap.c | 7 +------\n 1 file changed, 1 insertion(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c\nindex 322c18f..470867d 100644\n--- a/drivers/net/pcap/rte_eth_pcap.c\n+++ b/drivers/net/pcap/rte_eth_pcap.c\n@@ -242,7 +242,6 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \tstruct rte_mbuf *mbuf;\n \tstruct pcap_rx_queue *pcap_q = queue;\n \tuint16_t num_rx = 0;\n-\tuint16_t buf_size;\n \tuint32_t rx_bytes = 0;\n \tpcap_t *pcap;\n \n@@ -265,11 +264,7 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\tif (unlikely(mbuf == NULL))\n \t\t\tbreak;\n \n-\t\t/* Now get the space available for data in the mbuf */\n-\t\tbuf_size = rte_pktmbuf_data_room_size(pcap_q->mb_pool) -\n-\t\t\t\tRTE_PKTMBUF_HEADROOM;\n-\n-\t\tif (header.caplen <= buf_size) {\n+\t\tif (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {\n \t\t\t/* pcap packet will fit in the mbuf, can copy it */\n \t\t\trte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet,\n \t\t\t\t\theader.caplen);\n",
    "prefixes": [
        "v3",
        "1/3"
    ]
}