get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 95081,
    "url": "http://patchwork.dpdk.org/api/patches/95081/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210630135158.8108-3-olivier.matz@6wind.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": "<20210630135158.8108-3-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210630135158.8108-3-olivier.matz@6wind.com",
    "date": "2021-06-30T13:51:56",
    "name": "[v2,2/4] net/tap: fix Rx cksum flags on TCP packets",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "dffe57dd64a7999fae4d4f3508bc6fa49fa6a498",
    "submitter": {
        "id": 8,
        "url": "http://patchwork.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patchwork.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210630135158.8108-3-olivier.matz@6wind.com/mbox/",
    "series": [
        {
            "id": 17552,
            "url": "http://patchwork.dpdk.org/api/series/17552/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=17552",
            "date": "2021-06-30T13:51:54",
            "name": "net/tap: fix Rx cksum",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/17552/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/95081/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/95081/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E1317A0A0F;\n\tWed, 30 Jun 2021 15:52:43 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 511BA41282;\n\tWed, 30 Jun 2021 15:52:33 +0200 (CEST)",
            "from mail-wr1-f46.google.com (mail-wr1-f46.google.com\n [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id 0B88C41221\n for <dev@dpdk.org>; Wed, 30 Jun 2021 15:52:29 +0200 (CEST)",
            "by mail-wr1-f46.google.com with SMTP id v5so3773475wrt.3\n for <dev@dpdk.org>; Wed, 30 Jun 2021 06:52:29 -0700 (PDT)",
            "from gojira.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com.\n [62.23.145.78])\n by smtp.gmail.com with ESMTPSA id g15sm193026wrs.50.2021.06.30.06.52.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 30 Jun 2021 06:52:28 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=o4SckZWNiSvzj3qHRROP/H8Lco3apigtHUeYza48pXg=;\n b=TEBQzUD36jvvVkmXs4QCkNvfiBAJSJ5zElTyMXCmWglVfuKjCuwntkK4u71qhxtVE9\n Q9qJQqQPK/ZguyJ0azBhqUC4TsZbkg5jrEA6xlXfwIZYxTDVC8FHHQTwUOrGkUAQ76qi\n II2fDF62YfaouP7AMYxjv8Vf474jefl4y/Ro0W3J3Rt4mEL9PdhB5GqUeNVO/TLuJUtj\n R47/tL/qOh04Qyk4hYDQeZzIM0ete3thjcglVRE97lDhz8uuGH7nmt9P7pBhgB0/Wg04\n W+N8QhFqAJRVd2kyoon5q5TpZPqVAlTSlNmkT3XqINHStgmt8RVWBtfzpLvl50YviG+U\n 2x+A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=o4SckZWNiSvzj3qHRROP/H8Lco3apigtHUeYza48pXg=;\n b=ejZdXyaAioDTGA35g2Dt91I9ZXB1/toYI1znhSbuagQpB2lBd4QcaKB4agmrghT5gF\n WdY4f/KATSQ36900TaXhnjkwzS+QzOZFk7wAXKf5173jvrducGbv3Vnss6i+CHOhNKRo\n F+4GtZPNmUNzaMCo5p+EQjFCfYpHdo2iIvFgh5prTDc1YvKwJAhpzS/5/HOsyUfYGGoq\n M+vlkJnfnkqIwos08EiGjEmh5ps7CK1uHWq3CBzyyZ7yDxp0cXoYN9mndykU1h9HoBvb\n oQHjn8v9r74zbTV5yMT/tPwEHB1VcTHNiiXodboFP5THmZq7ffFkjdOIYFwFjH7yOKnW\n QmFg==",
        "X-Gm-Message-State": "AOAM531/ltwywfxjfGBxh0WGLL3rIG9TiPTGEH+2csUFbpo1QfEhR3r+\n pl0e9Y6FWzHo4P2u7ij1QWxmajTDO3AfWg==",
        "X-Google-Smtp-Source": "\n ABdhPJwvO0ceaT1Gwcfx1CktkNozvZ6zMAlUDokAskoESFBWJEYOu7M5ofJecmRKPvhAMnh6ogTJ1A==",
        "X-Received": "by 2002:a5d:534d:: with SMTP id\n t13mr19746490wrv.171.1625061148887;\n Wed, 30 Jun 2021 06:52:28 -0700 (PDT)",
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "guohongzhi1@huawei.com, keith.wiles@intel.com, mb@smartsharesystems.com,\n thomas@monjalon.net, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru,\n stable@dpdk.org",
        "Date": "Wed, 30 Jun 2021 15:51:56 +0200",
        "Message-Id": "<20210630135158.8108-3-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.29.2",
        "In-Reply-To": "<20210630135158.8108-1-olivier.matz@6wind.com>",
        "References": "<20210427135755.927-1-olivier.matz@6wind.com>\n <20210630135158.8108-1-olivier.matz@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 2/4] net/tap: fix Rx cksum flags on TCP packets",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Since commit d5df2ae0428a (\"net: fix unneeded replacement of TCP\nchecksum 0\"), the functions rte_ipv4_udptcp_cksum() or\nrte_ipv6_udptcp_cksum() can return either 0x0000 or 0xffff when used to\nverify a packet containing a valid checksum.\n\nThis new behavior broke the checksum verification in tap driver for TCP\npackets: these packets are marked with PKT_RX_L4_CKSUM_BAD.\n\nFix this by checking the 2 possible values. A next commit will introduce\na checksum verification helper to simplify this a bit.\n\nFixes: d5df2ae0428a (\"net: fix unneeded replacement of TCP checksum 0\")\nCc: stable@dpdk.org\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\nAcked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n drivers/net/tap/rte_eth_tap.c | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex 5513cfd2d7..5429f611c1 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -350,6 +350,8 @@ tap_verify_csum(struct rte_mbuf *mbuf)\n \t\treturn;\n \t}\n \tif (l4 == RTE_PTYPE_L4_UDP || l4 == RTE_PTYPE_L4_TCP) {\n+\t\tint cksum_ok;\n+\n \t\tl4_hdr = rte_pktmbuf_mtod_offset(mbuf, void *, l2_len + l3_len);\n \t\t/* Don't verify checksum for multi-segment packets. */\n \t\tif (mbuf->nb_segs > 1)\n@@ -367,13 +369,13 @@ tap_verify_csum(struct rte_mbuf *mbuf)\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\t\tcksum = rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);\n \t\t} else { /* l3 == RTE_PTYPE_L3_IPV6, checked above */\n-\t\t\tcksum = ~rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);\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+\t\tcksum_ok = (cksum == 0) || (cksum == 0xffff);\n+\t\tmbuf->ol_flags |= cksum_ok ?\n+\t\t\tPKT_RX_L4_CKSUM_GOOD : PKT_RX_L4_CKSUM_BAD;\n \t}\n }\n \n",
    "prefixes": [
        "v2",
        "2/4"
    ]
}