get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 70654,
    "url": "http://patches.dpdk.org/api/patches/70654/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200527144003.3592-1-guohongzhi1@huawei.com/",
    "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": "<20200527144003.3592-1-guohongzhi1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200527144003.3592-1-guohongzhi1@huawei.com",
    "date": "2020-05-27T14:40:03",
    "name": "bugfix: udptcp_checksum should tread tcp and udp differently",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2ffa4d9e3c1d4fb3651c08b779e81ca259c2d590",
    "submitter": {
        "id": 1710,
        "url": "http://patches.dpdk.org/api/people/1710/?format=api",
        "name": "Hongzhi Guo",
        "email": "guohongzhi1@huawei.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200527144003.3592-1-guohongzhi1@huawei.com/mbox/",
    "series": [
        {
            "id": 10254,
            "url": "http://patches.dpdk.org/api/series/10254/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10254",
            "date": "2020-05-27T14:40:03",
            "name": "bugfix: udptcp_checksum should tread tcp and udp differently",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/10254/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/70654/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/70654/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 C5FE8A034E;\n\tWed, 27 May 2020 16:40:18 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1093F1DA7D;\n\tWed, 27 May 2020 16:40:18 +0200 (CEST)",
            "from huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by dpdk.org (Postfix) with ESMTP id 166491DA75;\n Wed, 27 May 2020 16:40:16 +0200 (CEST)",
            "from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58])\n by Forcepoint Email with ESMTP id 0C2FA362E4E9EDBFFEE8;\n Wed, 27 May 2020 22:40:14 +0800 (CST)",
            "from DESKTOP-ORJPOMD.china.huawei.com (10.173.251.143) by\n DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id\n 14.3.487.0; Wed, 27 May 2020 22:40:06 +0800"
        ],
        "From": "guohongzhi <guohongzhi1@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<stable@dpdk.org>, <olivier.matz@6wind.com>, <mb@smartsharesystems.com>,\n <konstantin.ananyev@intel.com>, <jiayu.hu@intel.com>,\n <ferruh.yigit@intel.com>, <nicolas.chautru@intel.com>,\n <cristian.dumitrescu@intel.com>, <zhoujingbin@huawei.com>,\n <chenchanghu@huawei.com>, <jerry.lilijun@huawei.com>,\n <haifeng.lin@huawei.com>, <guohongzhi1@huawei.com>",
        "Date": "Wed, 27 May 2020 22:40:03 +0800",
        "Message-ID": "<20200527144003.3592-1-guohongzhi1@huawei.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.173.251.143]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH] bugfix: udptcp_checksum should tread tcp and udp\n\tdifferently",
        "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": "RFC 768 for UDP specifies:\nIf the computed  checksum  is zero,  it is transmitted  as all ones.\nAn all zero transmitted checksum  value means that the transmitter\ngenerated  no checksum.\n\nRFC 793 for TCP has no such special treatment for the checksum of zero.\n\nSigned-off-by: guohongzhi <guohongzhi1@huawei.com>\n---\n lib/librte_net/rte_ip.h | 13 +++++++++----\n 1 file changed, 9 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h\nindex 1ceb7b7..8bef313 100644\n--- a/lib/librte_net/rte_ip.h\n+++ b/lib/librte_net/rte_ip.h\n@@ -324,8 +324,7 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags)\n  * @param l4_hdr\n  *   The pointer to the beginning of the L4 header.\n  * @return\n- *   The complemented checksum to set in the IP packet\n- *   or 0 on error\n+ *   The complemented checksum to set in the IP packet.\n  */\n static inline uint16_t\n rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)\n@@ -344,7 +343,10 @@ rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)\n \n \tcksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);\n \tcksum = (~cksum) & 0xffff;\n-\tif (cksum == 0)\n+\t/* For Udp, if the computed checksum is zero,\n+\t * it is transmitted as all ones.RFC768\n+\t */\n+\tif (cksum == 0 && ipv4_hdr->next_proto_id == IPPROTO_UDP)\n \t\tcksum = 0xffff;\n \n \treturn (uint16_t)cksum;\n@@ -436,7 +438,10 @@ rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)\n \n \tcksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);\n \tcksum = (~cksum) & 0xffff;\n-\tif (cksum == 0)\n+\t/* For Udp, if the computed checksum is zero,\n+\t * it is transmitted as all ones.RFC768\n+\t */\n+\tif (cksum == 0 && ipv6_hdr->proto == IPPROTO_UDP)\n \t\tcksum = 0xffff;\n \n \treturn (uint16_t)cksum;\n",
    "prefixes": []
}