get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54920,
    "url": "http://patches.dpdk.org/api/patches/54920/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190618161636.23748-3-stephen@networkplumber.org/",
    "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": "<20190618161636.23748-3-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190618161636.23748-3-stephen@networkplumber.org",
    "date": "2019-06-18T16:16:30",
    "name": "[v3,2/8] kni: use netdev_alloc_skb",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "90099b272c4c852a8204644d5e9e81ec81b54c23",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190618161636.23748-3-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5063,
            "url": "http://patches.dpdk.org/api/series/5063/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5063",
            "date": "2019-06-18T16:16:28",
            "name": "kni: fixes and cleanups",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/5063/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54920/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54920/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "MIME-Version": "1.0",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Google-Smtp-Source": "APXvYqzpeggB7lAGpnIo1h4ba9ZHbuu8n5n4dmYyAiIYnFnwWCsc8WxJGfTqecLuH3Z7a2zeC5vqUQ==",
        "References": "<20190610175155.21374-1-stephen@networkplumber.org>\n\t<20190618161636.23748-1-stephen@networkplumber.org>",
        "In-Reply-To": "<20190618161636.23748-1-stephen@networkplumber.org>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=oe0geve82kPbeuTLEhiKxz5m43I4cyFj8lTlsw5/DJo=;\n\tb=gXpU5HWX1zhKob5azP1RBzGzVNIyjaF515Vtq3Mz2SLXYALp/GN9Lf8AYy87xSCDCm\n\tRTFgHhWqwAg4Cjni0aiOi1os4ZmtBFcyBbqIYITQmnq41hJ5yObQGqa5ImgEpklvZ2Ru\n\t9nW8l44oFp9gdPzLAUbsxQ9Ea7UeiW9W8Pis7dpbSahM53JuIrmWEikJE6pmkfFAXU5B\n\t1hWtydJK2lBBiGDvyuVO5V4DBgZYV+mniHuYLlSUswXhcNnkk3ktBX5TAACOfOdpCzC2\n\tLmtxzMnYpDLmN5GeUguRPo0RWSb98el2oV/gyp3s/cueLwMWPRKSCi5yjXKNdZBUogRq\n\t4upg==",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6E5291C224;\n\tTue, 18 Jun 2019 18:16:52 +0200 (CEST)",
            "from mail-pf1-f196.google.com (mail-pf1-f196.google.com\n\t[209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 067B71C212\n\tfor <dev@dpdk.org>; Tue, 18 Jun 2019 18:16:47 +0200 (CEST)",
            "by mail-pf1-f196.google.com with SMTP id a186so7937272pfa.5\n\tfor <dev@dpdk.org>; Tue, 18 Jun 2019 09:16:47 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\t3sm15485385pfp.114.2019.06.18.09.16.45\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tTue, 18 Jun 2019 09:16:45 -0700 (PDT)"
        ],
        "X-Original-To": "patchwork@dpdk.org",
        "X-Received": "by 2002:aa7:8711:: with SMTP id\n\tb17mr64047568pfo.234.1560874606669; \n\tTue, 18 Jun 2019 09:16:46 -0700 (PDT)",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Gm-Message-State": "APjAAAVVciuUL0Rb5jGMAD4Mp6Z6WuJi5sSCcLxh7fMNeWRPu1+B1M2E\n\tq8SNs0IZxk9duEissCXeL9jxWb2CwbE=",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=oe0geve82kPbeuTLEhiKxz5m43I4cyFj8lTlsw5/DJo=;\n\tb=r5+qFZ4MQxDgz08n0lgnWMZ1P2z+O6hw2abV0ypTRMUONxAcUXWeLCZ7b3Z0bOdyng\n\tUSuyQ1t47M1Ar+XG4P7oz/56k79heCss06Wx0gSAzMvYVT1tEg6U8/CGcQN0OJC3Xho1\n\tRdYcc7o2xEsuQSKy2GbT5qbUIBOhV+GWs4OSYl9WEVgWe1/YF+Dbzbr6aG/xkzOYScG7\n\tEvCT3xQisDvMhlrTz/a9bjd460X+2X3ttlBIEhLhxnny1aXML3BxHMygPyrIZ6bLrlr7\n\tb+KTbalclMwvauGTzN7tPkvrFIAT3saBNKydQJCLHACEhkb+L+wz3nkEvzPSDkp8LZYZ\n\t6r0A==",
        "Subject": "[dpdk-dev] [PATCH v3 2/8] kni: use netdev_alloc_skb",
        "Date": "Tue, 18 Jun 2019 09:16:30 -0700",
        "Message-Id": "<20190618161636.23748-3-stephen@networkplumber.org>",
        "Precedence": "list",
        "X-Mailman-Version": "2.1.15",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>"
    },
    "content": "netdev_alloc_skb is optimized to any alignment or setup\nof skb->dev that is required. The kernel has chosen to not pad\npackets on x86 (for many years), because it is faster.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n kernel/linux/kni/kni_net.c | 17 +++--------------\n 1 file changed, 3 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c\nindex c86337d099ab..cce5e7eb991f 100644\n--- a/kernel/linux/kni/kni_net.c\n+++ b/kernel/linux/kni/kni_net.c\n@@ -340,16 +340,13 @@ kni_net_rx_normal(struct kni_dev *kni)\n \t\tdata_kva = kva2data_kva(kva);\n \t\tkni->va[i] = pa2va(kni->pa[i], kva);\n \n-\t\tskb = dev_alloc_skb(len + 2);\n+\t\tskb = netdev_alloc_skb(dev, len);\n \t\tif (!skb) {\n \t\t\t/* Update statistics */\n \t\t\tkni->stats.rx_dropped++;\n \t\t\tcontinue;\n \t\t}\n \n-\t\t/* Align IP on 16B boundary */\n-\t\tskb_reserve(skb, 2);\n-\n \t\tif (kva->nb_segs == 1) {\n \t\t\tmemcpy(skb_put(skb, len), data_kva, len);\n \t\t} else {\n@@ -368,7 +365,6 @@ kni_net_rx_normal(struct kni_dev *kni)\n \t\t\t}\n \t\t}\n \n-\t\tskb->dev = dev;\n \t\tskb->protocol = eth_type_trans(skb, dev);\n \t\tskb->ip_summed = CHECKSUM_UNNECESSARY;\n \n@@ -512,26 +508,20 @@ kni_net_rx_lo_fifo_skb(struct kni_dev *kni)\n \t\tdata_kva = kva2data_kva(kva);\n \t\tkni->va[i] = pa2va(kni->pa[i], kva);\n \n-\t\tskb = dev_alloc_skb(len + 2);\n+\t\tskb = netdev_alloc_skb(dev, len);\n \t\tif (skb) {\n-\t\t\t/* Align IP on 16B boundary */\n-\t\t\tskb_reserve(skb, 2);\n \t\t\tmemcpy(skb_put(skb, len), data_kva, len);\n-\t\t\tskb->dev = dev;\n \t\t\tskb->ip_summed = CHECKSUM_UNNECESSARY;\n \t\t\tdev_kfree_skb(skb);\n \t\t}\n \n \t\t/* Simulate real usage, allocate/copy skb twice */\n-\t\tskb = dev_alloc_skb(len + 2);\n+\t\tskb = netdev_alloc_skb(dev, len);\n \t\tif (skb == NULL) {\n \t\t\tkni->stats.rx_dropped++;\n \t\t\tcontinue;\n \t\t}\n \n-\t\t/* Align IP on 16B boundary */\n-\t\tskb_reserve(skb, 2);\n-\n \t\tif (kva->nb_segs == 1) {\n \t\t\tmemcpy(skb_put(skb, len), data_kva, len);\n \t\t} else {\n@@ -550,7 +540,6 @@ kni_net_rx_lo_fifo_skb(struct kni_dev *kni)\n \t\t\t}\n \t\t}\n \n-\t\tskb->dev = dev;\n \t\tskb->ip_summed = CHECKSUM_UNNECESSARY;\n \n \t\tkni->stats.rx_bytes += len;\n",
    "prefixes": [
        "v3",
        "2/8"
    ]
}