get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83413,
    "url": "https://patches.dpdk.org/api/patches/83413/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1604327899-60126-3-git-send-email-oulijun@huawei.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1604327899-60126-3-git-send-email-oulijun@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1604327899-60126-3-git-send-email-oulijun@huawei.com",
    "date": "2020-11-02T14:38:13",
    "name": "[2/8] net/hns3: fix Tx cksum outer header prepare",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "eadaadb6e40fc57a80865870c348f3da73fe9175",
    "submitter": {
        "id": 1675,
        "url": "https://patches.dpdk.org/api/people/1675/?format=api",
        "name": "Lijun Ou",
        "email": "oulijun@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1604327899-60126-3-git-send-email-oulijun@huawei.com/mbox/",
    "series": [
        {
            "id": 13574,
            "url": "https://patches.dpdk.org/api/series/13574/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13574",
            "date": "2020-11-02T14:38:11",
            "name": "misc fixes for hns3",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/13574/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/83413/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/83413/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 62628A04E7;\n\tMon,  2 Nov 2020 15:38:18 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AD57EC900;\n\tMon,  2 Nov 2020 15:37:58 +0100 (CET)",
            "from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by dpdk.org (Postfix) with ESMTP id 18075C8DE\n for <dev@dpdk.org>; Mon,  2 Nov 2020 15:37:55 +0100 (CET)",
            "from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CPwW51LLDzhfpS\n for <dev@dpdk.org>; Mon,  2 Nov 2020 22:37:53 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id\n 14.3.487.0; Mon, 2 Nov 2020 22:37:46 +0800"
        ],
        "From": "Lijun Ou <oulijun@huawei.com>",
        "To": "<ferruh.yigit@intel.com>",
        "CC": "<dev@dpdk.org>, <linuxarm@huawei.com>",
        "Date": "Mon, 2 Nov 2020 22:38:13 +0800",
        "Message-ID": "<1604327899-60126-3-git-send-email-oulijun@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1604327899-60126-1-git-send-email-oulijun@huawei.com>",
        "References": "<1604327899-60126-1-git-send-email-oulijun@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH 2/8] net/hns3: fix Tx cksum outer header prepare",
        "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": "From: Chengchang Tang <tangchengchang@huawei.com>\n\nCurrently, there are two mistakes in Tx checksum outer header prepare.\n1) Check whether the packet outer header is IPV4 based on PKT_TX_IPV4\n   which is incorrect.\n2) For HIP08, the outer UDP cksum could not be offloaded. And driver\n   should ensure the outer udp cksum filed set to 0. In current code,\n   PKT_TX_UDP_CKSUM is used to determine whether the outer layer of\n   the packet is a UDP header. Actually, for tunnel TSO, the flag will\n   never be set.\n\nFor the first mistake, it is fixed by replacing PKT_TX_IPV4 with\nPKT_TX_OUTER_IPV4. And the protocol number in L3 header is used to check\nwhether the outer L4 header is UDP.\n\nFixes: bba636698316 (\"net/hns3: support Rx/Tx and related operations\")\nFixes: 6dca716c9e1d (\"net/hns3: support TSO\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengchang Tang <tangchengchang@huawei.com>\nSigned-off-by: Lijun Ou <oulijun@huawei.com>\n---\n drivers/net/hns3/hns3_rxtx.c | 25 ++++++++++++++-----------\n 1 file changed, 14 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex 2988a4b..9cd728b 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -3151,26 +3151,29 @@ static void\n hns3_outer_header_cksum_prepare(struct rte_mbuf *m)\n {\n \tuint64_t ol_flags = m->ol_flags;\n-\tstruct rte_ipv4_hdr *ipv4_hdr;\n-\tstruct rte_udp_hdr *udp_hdr;\n-\tuint32_t paylen, hdr_len;\n+\tuint32_t paylen, hdr_len, l4_proto;\n \n \tif (!(ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)))\n \t\treturn;\n \n-\tif (ol_flags & PKT_TX_IPV4) {\n+\tif (ol_flags & PKT_TX_OUTER_IPV4) {\n+\t\tstruct rte_ipv4_hdr *ipv4_hdr;\n \t\tipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,\n \t\t\t\t\t\t   m->outer_l2_len);\n-\n-\t\tif (ol_flags & PKT_TX_IP_CKSUM)\n+\t\tl4_proto = ipv4_hdr->next_proto_id;\n+\t\tif (ol_flags & PKT_TX_OUTER_IP_CKSUM)\n \t\t\tipv4_hdr->hdr_checksum = 0;\n+\t} else {\n+\t\tstruct rte_ipv6_hdr *ipv6_hdr;\n+\t\tipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,\n+\t\t\t\t\t\t   m->outer_l2_len);\n+\t\tl4_proto = ipv6_hdr->proto;\n \t}\n-\n-\tif ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM &&\n-\t    ol_flags & PKT_TX_TCP_SEG) {\n+\t/* driver should ensure the outer udp cksum is 0 for TUNNEL TSO */\n+\tif (l4_proto == IPPROTO_UDP && (ol_flags & PKT_TX_TCP_SEG)) {\n+\t\tstruct rte_udp_hdr *udp_hdr;\n \t\thdr_len = m->l2_len + m->l3_len + m->l4_len;\n-\t\thdr_len += (ol_flags & PKT_TX_TUNNEL_MASK) ?\n-\t\t\t\tm->outer_l2_len + m->outer_l3_len : 0;\n+\t\thdr_len += m->outer_l2_len + m->outer_l3_len;\n \t\tpaylen = m->pkt_len - hdr_len;\n \t\tif (paylen <= m->tso_segsz)\n \t\t\treturn;\n",
    "prefixes": [
        "2/8"
    ]
}