get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83849,
    "url": "http://patches.dpdk.org/api/patches/83849/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201109142217.115918-1-michael.pfeiffer@tu-ilmenau.de/",
    "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": "<20201109142217.115918-1-michael.pfeiffer@tu-ilmenau.de>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201109142217.115918-1-michael.pfeiffer@tu-ilmenau.de",
    "date": "2020-11-09T14:22:17",
    "name": "net/tap: Allow all-zero checksum for UDP over IPv4",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8c55e6ac76df81d7b4c0f8e0d4cc5f7c3e27ee8d",
    "submitter": {
        "id": 1506,
        "url": "http://patches.dpdk.org/api/people/1506/?format=api",
        "name": "Michael Pfeiffer",
        "email": "michael.pfeiffer@tu-ilmenau.de"
    },
    "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/20201109142217.115918-1-michael.pfeiffer@tu-ilmenau.de/mbox/",
    "series": [
        {
            "id": 13747,
            "url": "http://patches.dpdk.org/api/series/13747/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13747",
            "date": "2020-11-09T14:22:17",
            "name": "net/tap: Allow all-zero checksum for UDP over IPv4",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/13747/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/83849/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/83849/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 09BBBA0527;\n\tMon,  9 Nov 2020 15:22:36 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A26B85B3A;\n\tMon,  9 Nov 2020 15:22:34 +0100 (CET)",
            "from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de [141.24.186.67])\n by dpdk.org (Postfix) with ESMTP id BEBFF5AB8\n for <dev@dpdk.org>; Mon,  9 Nov 2020 15:22:32 +0100 (CET)",
            "from localhost.localdomain (unknown [91.137.63.238])\n (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n (No client certificate requested)\n by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 6BCC9580060;\n Mon,  9 Nov 2020 15:22:31 +0100 (CET)"
        ],
        "From": "Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>",
        "To": "Keith Wiles <keith.wiles@intel.com>",
        "Cc": "dev@dpdk.org,\n\tMichael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>",
        "Date": "Mon,  9 Nov 2020 15:22:17 +0100",
        "Message-Id": "<20201109142217.115918-1-michael.pfeiffer@tu-ilmenau.de>",
        "X-Mailer": "git-send-email 2.29.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] net/tap: Allow all-zero checksum for UDP over\n\tIPv4",
        "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": "Unlike TCP, UDP checksums are optional and may be zero to indicate \"not\nset\" [RFC 768] (except for IPv6, where this prohibited [RFC 8200]). Add\nthis special case to the checksum offload emulation in net/tap.\n\nSigned-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>\n---\n drivers/net/tap/rte_eth_tap.c | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex 2f8abb12c..e486b41c5 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -303,6 +303,7 @@ tap_verify_csum(struct rte_mbuf *mbuf)\n \tuint16_t cksum = 0;\n \tvoid *l3_hdr;\n \tvoid *l4_hdr;\n+\tstruct rte_udp_hdr *udp_hdr;\n \n \tif (l2 == RTE_PTYPE_L2_ETHER_VLAN)\n \t\tl2_len += 4;\n@@ -349,10 +350,18 @@ tap_verify_csum(struct rte_mbuf *mbuf)\n \t\t/* Don't verify checksum for multi-segment packets. */\n \t\tif (mbuf->nb_segs > 1)\n \t\t\treturn;\n-\t\tif (l3 == RTE_PTYPE_L3_IPV4)\n+\t\tif (l3 == RTE_PTYPE_L3_IPV4) {\n+\t\t\tif (l4 == RTE_PTYPE_L4_UDP) {\n+\t\t\t\tudp_hdr = (struct rte_udp_hdr *)l4_hdr;\n+\t\t\t\tif (udp_hdr->dgram_cksum == 0) {\n+\t\t\t\t\tmbuf->ol_flags |= PKT_RX_L4_CKSUM_NONE;\n+\t\t\t\t\treturn;\n+\t\t\t\t}\n+\t\t\t}\n \t\t\tcksum = ~rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);\n-\t\telse if (l3 == RTE_PTYPE_L3_IPV6)\n+\t\t} else if (l3 == RTE_PTYPE_L3_IPV6) {\n \t\t\tcksum = ~rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);\n+\t\t}\n \t\tmbuf->ol_flags |= cksum ?\n \t\t\tPKT_RX_L4_CKSUM_BAD :\n \t\t\tPKT_RX_L4_CKSUM_GOOD;\n",
    "prefixes": []
}