get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129907,
    "url": "http://patches.dpdk.org/api/patches/129907/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230804082849.533059-1-kaiwenx.deng@intel.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": "<20230804082849.533059-1-kaiwenx.deng@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230804082849.533059-1-kaiwenx.deng@intel.com",
    "date": "2023-08-04T08:28:48",
    "name": "app/test-pmd: fix L4 checksum with padding data",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3def3d55cbd28fa7575fad3213789349c8e6ca9b",
    "submitter": {
        "id": 2886,
        "url": "http://patches.dpdk.org/api/people/2886/?format=api",
        "name": "Kaiwen Deng",
        "email": "kaiwenx.deng@intel.com"
    },
    "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/20230804082849.533059-1-kaiwenx.deng@intel.com/mbox/",
    "series": [
        {
            "id": 29111,
            "url": "http://patches.dpdk.org/api/series/29111/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29111",
            "date": "2023-08-04T08:28:48",
            "name": "app/test-pmd: fix L4 checksum with padding data",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/29111/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/129907/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/129907/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 1443242FD0;\n\tFri,  4 Aug 2023 11:07:47 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9731240EE1;\n\tFri,  4 Aug 2023 11:07:46 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 77FE840E2D;\n Fri,  4 Aug 2023 11:07:44 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 04 Aug 2023 02:07:43 -0700",
            "from shwdenpg561.ccr.corp.intel.com (HELO dpdk..) ([10.239.252.3])\n by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 04 Aug 2023 02:07:40 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1691140064; x=1722676064;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=YkNZl2/OItXHweL2wSzGRPSn8HhTz0dk0Wc1ADlcFTc=;\n b=mvIOQpbQR/5pFZhWXhn8ASRXso2CnT1et65kxf2RaCPR8I9by/BD4yLc\n CkN2HXPw07EsCH2iKBgqNv+FuMA7feGQRR6Ab/YVTcTsoF9xipMkaPq5v\n BHyXYlLVAKAfsAmMlkwXwZwyj/eG/rhesFiRMv4yRjXQHOs+W4YbJEoDy\n eaby4WL+/e2GSUJhQYOPb0T5E5szCgMfTcvi0KdYlZNaqUB9fKL/e4C3+\n D+cFENMXPhOZqP84ZeySndAn5DtNltgee4c2jAU0I3n4bMLW5xkNNq788\n GHkY68QcZ3eSADxcBzoR0cCZS42CbJ8e7ZTsbMb7romBi/b/8pwK1ACh/ w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10791\"; a=\"373760229\"",
            "E=Sophos;i=\"6.01,254,1684825200\"; d=\"scan'208\";a=\"373760229\"",
            "E=McAfee;i=\"6600,9927,10791\"; a=\"903829614\"",
            "E=Sophos;i=\"6.01,254,1684825200\"; d=\"scan'208\";a=\"903829614\""
        ],
        "X-ExtLoop1": "1",
        "From": "Kaiwen Deng <kaiwenx.deng@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org, qiming.yang@intel.com, yidingx.zhou@intel.com,\n Kaiwen Deng <kaiwenx.deng@intel.com>,\n Aman Singh <aman.deep.singh@intel.com>,\n Yuying Zhang <yuying.zhang@intel.com>,\n Olivier Matz <olivier.matz@6wind.com>,\n Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "Subject": "[PATCH] app/test-pmd: fix L4 checksum with padding data",
        "Date": "Fri,  4 Aug 2023 16:28:48 +0800",
        "Message-Id": "<20230804082849.533059-1-kaiwenx.deng@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "IEEE 802 packets may have a minimum size limit. The data fields\nshould be padded when necessary. In some cases, the padding data\nis not zero. Testpmd does not trim these IP packets to the true\nlength of the frame, so errors will occur when calculating TCP\nor UDP checksum.\n\nThis commit fixes this issue by triming IP packets to the true\nlength of the frame in testpmd.\n\nFixes: 03d17e4d0179 (\"app/testpmd: do not change IP addrs in checksum engine\")\nCc: stable@dpdk.org\n\nSigned-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>\n---\n app/test-pmd/csumonly.c | 32 ++++++++++++++++++++++++++++++++\n 1 file changed, 32 insertions(+)",
    "diff": "diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c\nindex 7af635e3f7..58b72b714a 100644\n--- a/app/test-pmd/csumonly.c\n+++ b/app/test-pmd/csumonly.c\n@@ -853,12 +853,14 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \tuint16_t nb_rx;\n \tuint16_t nb_prep;\n \tuint16_t i;\n+\tuint16_t pad_len;\n \tuint64_t rx_ol_flags, tx_ol_flags;\n \tuint64_t tx_offloads;\n \tuint32_t rx_bad_ip_csum;\n \tuint32_t rx_bad_l4_csum;\n \tuint32_t rx_bad_outer_l4_csum;\n \tuint32_t rx_bad_outer_ip_csum;\n+\tuint32_t l3_off;\n \tstruct testpmd_offload_info info;\n \n \t/* receive a burst of packet */\n@@ -980,6 +982,36 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\tl3_hdr = (char *)l3_hdr + info.outer_l3_len + info.l2_len;\n \t\t}\n \n+\t\tif (info.is_tunnel) {\n+\t\t\tl3_off = info.outer_l2_len +\n+\t\t\t\t\tinfo.outer_l3_len +\n+\t\t\t\t\tinfo.l2_len;\n+\t\t} else {\n+\t\t\tl3_off = info.l2_len;\n+\t\t}\n+\t\tswitch (info.ethertype) {\n+\t\tcase _htons(RTE_ETHER_TYPE_IPV4):\n+\t\t\tpad_len = rte_pktmbuf_data_len(m) -\n+\t\t\t\t\t(l3_off +\n+\t\t\t\t\trte_be_to_cpu_16(\n+\t\t\t\t\t((struct rte_ipv4_hdr *)l3_hdr)->total_length));\n+\t\t\tbreak;\n+\t\tcase _htons(RTE_ETHER_TYPE_IPV6):\n+\t\t\tpad_len = rte_pktmbuf_data_len(m) -\n+\t\t\t\t\t(l3_off +\n+\t\t\t\t\trte_be_to_cpu_16(\n+\t\t\t\t\t((struct rte_ipv6_hdr *)l3_hdr)->payload_len));\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tpad_len = 0;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (pad_len) {\n+\t\t\trte_pktmbuf_data_len(m) = rte_pktmbuf_data_len(m) - pad_len;\n+\t\t\trte_pktmbuf_pkt_len(m) = rte_pktmbuf_data_len(m);\n+\t\t}\n+\n \t\t/* step 2: depending on user command line configuration,\n \t\t * recompute checksum either in software or flag the\n \t\t * mbuf to offload the calculation to the NIC. If TSO\n",
    "prefixes": []
}