get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2449,
    "url": "https://patches.dpdk.org/api/patches/2449/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421883395-27235-12-git-send-email-olivier.matz@6wind.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": "<1421883395-27235-12-git-send-email-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421883395-27235-12-git-send-email-olivier.matz@6wind.com",
    "date": "2015-01-21T23:36:30",
    "name": "[dpdk-dev,RFC,11/16] testpmd: rename vxlan in outer_ip in csum commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "eead96838702d3cdefc3537b93191d2c3935fc0c",
    "submitter": {
        "id": 8,
        "url": "https://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421883395-27235-12-git-send-email-olivier.matz@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2449/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2449/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 1B9105AC7;\n\tThu, 22 Jan 2015 00:37:05 +0100 (CET)",
            "from mail-wi0-f175.google.com (mail-wi0-f175.google.com\n\t[209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 0988E5A98\n\tfor <dev@dpdk.org>; Thu, 22 Jan 2015 00:36:57 +0100 (CET)",
            "by mail-wi0-f175.google.com with SMTP id fb4so31885717wid.2\n\tfor <dev@dpdk.org>; Wed, 21 Jan 2015 15:36:56 -0800 (PST)",
            "from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by mx.google.com with ESMTPSA id\n\twa5sm1710761wjc.8.2015.01.21.15.36.56\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 21 Jan 2015 15:36:56 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=oBVw2ouhe4Qzaqsi+ijvLzSuC7pPeqI0B7IaEe7jYbE=;\n\tb=W1Pbq8ZZwhgOhn4qotOR4siSqaWczAjsZuzRNSg28CIJ5eVftHYLwQeam+OITQlf7t\n\tsqZHCbKegXFkS4BqZdfpjNkXYHyYzis1Y4Ri8TNqYVBKDGMTIYiKFxqEZLY/NHDTPL36\n\tViXrJSoyPclK0rAfGningbbPHU8UbhDSEj7tHJbSYV/3HieOSXWb8a0xw/qgqEtKLhfl\n\tbXT2JyepUSSSKer4zr/qURAcPzuzFRs+LrhCsKlBlq9Ap2fw8rfsOFTzhr5yIDaaI2CY\n\twECY2UNwCHttB7t3mDZ3Avl0fzUuyLv78JIud4k6SW2QTwBUY1UJjQPChUTFe/tw7vK7\n\txiiA==",
        "X-Gm-Message-State": "ALoCoQkiB7WaGMLNn2+2GXuLkH+wXWsETPwm1PDorToLL0lrZXXIGLLL1hvwP4VVg6Xpn+f74Wtf",
        "X-Received": "by 10.194.8.232 with SMTP id u8mr33220694wja.47.1421883416924;\n\tWed, 21 Jan 2015 15:36:56 -0800 (PST)",
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 22 Jan 2015 00:36:30 +0100",
        "Message-Id": "<1421883395-27235-12-git-send-email-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.1.3",
        "In-Reply-To": "<1421883395-27235-1-git-send-email-olivier.matz@6wind.com>",
        "References": "<1421883395-27235-1-git-send-email-olivier.matz@6wind.com>",
        "Subject": "[dpdk-dev] [RFC 11/16] testpmd: rename vxlan in outer_ip in csum\n\tcommands",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The tx_checksum command concerns outer IP checksum, not VxLAN checksum.\nActually there is no checkum in VxLAN header, there is one checksum in\nouter IP header, and one checksum in outer UDP header. This option only\ncontrols the outer IP checksum.\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test-pmd/cmdline.c  | 16 ++++++++--------\n app/test-pmd/csumonly.c | 25 ++++++++++++++-----------\n app/test-pmd/testpmd.h  |  4 ++--\n 3 files changed, 24 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 1d294bc..451c728 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -316,12 +316,12 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"    Disable hardware insertion of a VLAN header in\"\n \t\t\t\" packets sent on a port.\\n\\n\"\n \n-\t\t\t\"csum set (ip|udp|tcp|sctp|vxlan) (hw|sw) (port_id)\\n\"\n+\t\t\t\"csum set (ip|udp|tcp|sctp|outer-ip) (hw|sw) (port_id)\\n\"\n \t\t\t\"    Select hardware or software calculation of the\"\n \t\t\t\" checksum with when transmitting a packet using the\"\n \t\t\t\" csum forward engine.\\n\"\n \t\t\t\"    ip|udp|tcp|sctp always concern the inner layer.\\n\"\n-\t\t\t\"    vxlan concerns the outer IP and UDP layer (in\"\n+\t\t\t\"    outer-ip concerns the outer IP layer (in\"\n \t\t\t\" case the packet is recognized as a vxlan packet by\"\n \t\t\t\" the forward engine)\\n\"\n \t\t\t\"    Please check the NIC datasheet for HW limits.\\n\\n\"\n@@ -2887,8 +2887,8 @@ csum_show(int port_id)\n \t\t(ol_flags & TESTPMD_TX_OFFLOAD_TCP_CKSUM) ? \"hw\" : \"sw\");\n \tprintf(\"SCTP checksum offload is %s\\n\",\n \t\t(ol_flags & TESTPMD_TX_OFFLOAD_SCTP_CKSUM) ? \"hw\" : \"sw\");\n-\tprintf(\"VxLAN checksum offload is %s\\n\",\n-\t\t(ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM) ? \"hw\" : \"sw\");\n+\tprintf(\"Outer-Ip checksum offload is %s\\n\",\n+\t\t(ol_flags & TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM) ? \"hw\" : \"sw\");\n \n \t/* display warnings if configuration is not supported by the NIC */\n \trte_eth_dev_info_get(port_id, &dev_info);\n@@ -2942,8 +2942,8 @@ cmd_csum_parsed(void *parsed_result,\n \t\t\tmask = TESTPMD_TX_OFFLOAD_TCP_CKSUM;\n \t\t} else if (!strcmp(res->proto, \"sctp\")) {\n \t\t\tmask = TESTPMD_TX_OFFLOAD_SCTP_CKSUM;\n-\t\t} else if (!strcmp(res->proto, \"vxlan\")) {\n-\t\t\tmask = TESTPMD_TX_OFFLOAD_VXLAN_CKSUM;\n+\t\t} else if (!strcmp(res->proto, \"outer-ip\")) {\n+\t\t\tmask = TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM;\n \t\t}\n \n \t\tif (hw)\n@@ -2962,7 +2962,7 @@ cmdline_parse_token_string_t cmd_csum_mode =\n \t\t\t\tmode, \"set\");\n cmdline_parse_token_string_t cmd_csum_proto =\n \tTOKEN_STRING_INITIALIZER(struct cmd_csum_result,\n-\t\t\t\tproto, \"ip#tcp#udp#sctp#vxlan\");\n+\t\t\t\tproto, \"ip#tcp#udp#sctp#outer-ip\");\n cmdline_parse_token_string_t cmd_csum_hwsw =\n \tTOKEN_STRING_INITIALIZER(struct cmd_csum_result,\n \t\t\t\thwsw, \"hw#sw\");\n@@ -2974,7 +2974,7 @@ cmdline_parse_inst_t cmd_csum_set = {\n \t.f = cmd_csum_parsed,\n \t.data = NULL,\n \t.help_str = \"enable/disable hardware calculation of L3/L4 checksum when \"\n-\t\t\"using csum forward engine: csum set ip|tcp|udp|sctp|vxlan hw|sw <port>\",\n+\t\t\"using csum forward engine: csum set ip|tcp|udp|sctp|outer-ip hw|sw <port>\",\n \t.tokens = {\n \t\t(void *)&cmd_csum_csum,\n \t\t(void *)&cmd_csum_mode,\ndiff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c\nindex 858eb47..3921643 100644\n--- a/app/test-pmd/csumonly.c\n+++ b/app/test-pmd/csumonly.c\n@@ -259,13 +259,16 @@ process_outer_cksums(void *outer_l3_hdr, uint16_t outer_ethertype,\n \t\tipv4_hdr->hdr_checksum = 0;\n \t\tol_flags |= PKT_TX_OUTER_IPV4;\n \n-\t\tif (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM)\n+\t\tif (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM)\n \t\t\tol_flags |= PKT_TX_OUTER_IP_CKSUM;\n \t\telse\n \t\t\tipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);\n-\t} else if (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM)\n+\t} else if (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM)\n \t\tol_flags |= PKT_TX_OUTER_IPV6;\n \n+\t/* outer UDP checksum is always done in software as we have no\n+\t * hardware supporting it today, and no API for it. */\n+\n \tudp_hdr = (struct udp_hdr *)((char *)outer_l3_hdr + outer_l3_len);\n \t/* do not recalculate udp cksum if it was 0 */\n \tif (udp_hdr->dgram_cksum != 0) {\n@@ -300,8 +303,8 @@ process_outer_cksums(void *outer_l3_hdr, uint16_t outer_ethertype,\n  * The testpmd command line for this forward engine sets the flags\n  * TESTPMD_TX_OFFLOAD_* in ports[tx_port].tx_ol_flags. They control\n  * wether a checksum must be calculated in software or in hardware. The\n- * IP, UDP, TCP and SCTP flags always concern the inner layer.  The\n- * VxLAN flag concerns the outer IP (if packet is recognized as a vxlan packet).\n+ * IP, UDP, TCP and SCTP flags always concern the inner layer. The\n+ * OUTER_IP is only useful for tunnel packets.\n  */\n static void\n pkt_burst_checksum_forward(struct fwd_stream *fs)\n@@ -432,18 +435,18 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t/* step 4: fill the mbuf meta data (flags and header lengths) */\n \n \t\tif (tunnel == 1) {\n-\t\t\tif (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM) {\n+\t\t\tif (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM) {\n \t\t\t\tm->outer_l2_len = outer_l2_len;\n \t\t\t\tm->outer_l3_len = outer_l3_len;\n \t\t\t\tm->l2_len = l4_tun_len + l2_len;\n \t\t\t\tm->l3_len = l3_len;\n \t\t\t}\n \t\t\telse {\n-\t\t\t\t/* if we don't do vxlan cksum in hw,\n-\t\t\t\t   outer checksum will be wrong because\n-\t\t\t\t   we changed the ip, but it shows that\n-\t\t\t\t   we can process the inner header cksum\n-\t\t\t\t   in the nic */\n+\t\t\t\t/* if there is a outer UDP cksum\n+\t\t\t\t   processed in sw and the inner in hw,\n+\t\t\t\t   the outer checksum will be wrong as\n+\t\t\t\t   the payload will be modified by the\n+\t\t\t\t   hardware */\n \t\t\t\tm->l2_len = outer_l2_len + outer_l3_len +\n \t\t\t\t\tsizeof(struct udp_hdr) +\n \t\t\t\t\tsizeof(struct vxlan_hdr) + l2_len;\n@@ -502,7 +505,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\t\t\t\"m->l4_len=%d\\n\",\n \t\t\t\t\tm->l2_len, m->l3_len, m->l4_len);\n \t\t\tif ((tunnel == 1) &&\n-\t\t\t\t(testpmd_ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM))\n+\t\t\t\t(testpmd_ol_flags & TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM))\n \t\t\t\tprintf(\"tx: m->outer_l2_len=%d m->outer_l3_len=%d\\n\",\n \t\t\t\t\tm->outer_l2_len, m->outer_l3_len);\n \t\t\tif (tso_segsz != 0)\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 36277de..ecb7d38 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -125,8 +125,8 @@ struct fwd_stream {\n #define TESTPMD_TX_OFFLOAD_TCP_CKSUM         0x0004\n /** Offload SCTP checksum in csum forward engine */\n #define TESTPMD_TX_OFFLOAD_SCTP_CKSUM        0x0008\n-/** Offload VxLAN checksum in csum forward engine */\n-#define TESTPMD_TX_OFFLOAD_VXLAN_CKSUM       0x0010\n+/** Offload outer IP checksum in csum forward engine for recognized tunnels */\n+#define TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM    0x0010\n /** Parse tunnel in csum forward engine. If set, dissect tunnel headers\n  * of rx packets. If not set, treat inner headers as payload. */\n #define TESTPMD_TX_OFFLOAD_PARSE_TUNNEL      0x0020\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "11/16"
    ]
}