Show a patch.

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

{
    "id": 226,
    "url": "https://patches.dpdk.org/api/patches/226/",
    "web_url": "https://patches.dpdk.org/patch/226/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1409038294-21693-8-git-send-email-jijiang.liu@intel.com>",
    "date": "2014-08-26T07:31:34",
    "name": "[dpdk-dev,v2,7/7] app/testpmd:test VxLAN Tx checksum offload",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a6b90c1f013620a77a4f1f51e248e328911eddc5",
    "submitter": {
        "id": 52,
        "url": "https://patches.dpdk.org/api/people/52/",
        "name": "Jijiang Liu",
        "email": "jijiang.liu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/226/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/226/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/226/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Date": "Tue, 26 Aug 2014 15:31:34 +0800",
        "In-Reply-To": "<1409038294-21693-1-git-send-email-jijiang.liu@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<1409038294-21693-1-git-send-email-jijiang.liu@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "Received": [
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 3D3BA38EB\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 09:28:08 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 26 Aug 2014 00:31:59 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 26 Aug 2014 00:31:57 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s7Q7VtCT027308;\n\tTue, 26 Aug 2014 15:31:55 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s7Q7VqHa021856; Tue, 26 Aug 2014 15:31:54 +0800",
            "(from jijiangl@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s7Q7Vpl9021852; \n\tTue, 26 Aug 2014 15:31:51 +0800"
        ],
        "From": "Jijiang Liu <jijiang.liu@intel.com>",
        "Precedence": "list",
        "X-ExtLoop1": "1",
        "Message-Id": "<1409038294-21693-8-git-send-email-jijiang.liu@intel.com>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v2 7/7]app/testpmd:test VxLAN Tx checksum offload",
        "X-List-Received-Date": "Tue, 26 Aug 2014 07:28:10 -0000",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<jijiangl@shecgisg004.sh.intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,402,1406617200\"; d=\"scan'208\";a=\"563466075\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "Add test cases in testpmd to test VxLAN Tx Checksum offload, which include\n - IPv4 tunnel and IPv6 tunnel s \n - outer L3, inner L3 and L4 checksum offload for Tx side.\n\nSigned-off-by: jijiangl <jijiang.liu@intel.com>\nAcked-by: Helin Zhang <helin.zhang@intel.com>\nAcked-by: Jingjing Wu <jingjing.wu@intel.com>\nAcked-by: Jing Chen <jing.d.chen@intel.com>\n\n---\n app/test-pmd/config.c   |    6 +-\n app/test-pmd/csumonly.c |  194 +++++++++++++++++++++++++++++++++++++++++++----\n 2 files changed, 183 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 606e34a..fe77b89 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1719,9 +1719,9 @@ tx_cksum_set(portid_t port_id, uint8_t cksum_mask)\n \tuint16_t tx_ol_flags;\n \tif (port_id_is_invalid(port_id))\n \t\treturn;\n-\t/* Clear last 4 bits and then set L3/4 checksum mask again */\n-\ttx_ol_flags = (uint16_t) (ports[port_id].tx_ol_flags & 0xFFF0);\n-\tports[port_id].tx_ol_flags = (uint16_t) ((cksum_mask & 0xf) | tx_ol_flags);\n+\t/* Clear last 8 bits and then set L3/4 checksum mask again */\n+\ttx_ol_flags = (uint16_t) (ports[port_id].tx_ol_flags & 0xFF00);\n+\tports[port_id].tx_ol_flags = (uint16_t) ((cksum_mask & 0xff) | tx_ol_flags);\n }\n \n void\ndiff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c\nindex e5a1f52..cb2a483 100644\n--- a/app/test-pmd/csumonly.c\n+++ b/app/test-pmd/csumonly.c\n@@ -196,7 +196,6 @@ get_ipv6_udptcp_checksum(struct ipv6_hdr *ipv6_hdr, uint16_t *l4_hdr)\n \treturn (uint16_t)cksum;\n }\n \n-\n /*\n  * Forwarding of packets. Change the checksum field with HW or SW methods\n  * The HW/SW method selection depends on the ol_flags on every packet\n@@ -209,10 +208,16 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \tstruct rte_mbuf  *mb;\n \tstruct ether_hdr *eth_hdr;\n \tstruct ipv4_hdr  *ipv4_hdr;\n+\tstruct ether_hdr *inner_eth_hdr;\n+\tstruct ipv4_hdr  *inner_ipv4_hdr = NULL;\n \tstruct ipv6_hdr  *ipv6_hdr;\n+\tstruct ipv6_hdr  *inner_ipv6_hdr = NULL;\n \tstruct udp_hdr   *udp_hdr;\n+\tstruct udp_hdr   *inner_udp_hdr;\n \tstruct tcp_hdr   *tcp_hdr;\n+\tstruct tcp_hdr   *inner_tcp_hdr;\n \tstruct sctp_hdr  *sctp_hdr;\n+\tstruct sctp_hdr  *inner_sctp_hdr;\n \n \tuint16_t nb_rx;\n \tuint16_t nb_tx;\n@@ -221,12 +226,18 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \tuint16_t pkt_ol_flags;\n \tuint16_t tx_ol_flags;\n \tuint16_t l4_proto;\n+\tuint16_t inner_l4_proto = 0;\n \tuint16_t eth_type;\n \tuint8_t  l2_len;\n \tuint8_t  l3_len;\n+\tuint8_t  inner_l2_len;\n+\tuint8_t  inner_l3_len = 0;\n \n \tuint32_t rx_bad_ip_csum;\n \tuint32_t rx_bad_l4_csum;\n+\tuint8_t  ipv4_tunnel;\n+\tuint8_t  ipv6_tunnel;\n+\tuint16_t ptype;\n \n #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES\n \tuint64_t start_tsc;\n@@ -261,8 +272,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\tmb = pkts_burst[i];\n \t\tl2_len  = sizeof(struct ether_hdr);\n \t\tpkt_ol_flags = mb->ol_flags;\n+\t\tptype = mb->reserved;\n \t\tol_flags = (uint16_t) (pkt_ol_flags & (~PKT_TX_L4_MASK));\n \n+\t\tipv4_tunnel = IS_ETH_IPV4_TUNNEL(ptype);\n+\t\tipv6_tunnel = IS_ETH_IPV6_TUNNEL(ptype);\n+\n \t\teth_hdr = (struct ether_hdr *) mb->pkt.data;\n \t\teth_type = rte_be_to_cpu_16(eth_hdr->ether_type);\n \t\tif (eth_type == ETHER_TYPE_VLAN) {\n@@ -295,7 +310,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t *      + ipv4 or ipv6\n \t\t *      + udp or tcp or sctp or others\n \t\t */\n-\t\tif (pkt_ol_flags & PKT_RX_IPV4_HDR) {\n+\t\tif (pkt_ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_IPV4_HDR_EXT)) {\n \n \t\t\t/* Do not support ipv4 option field */\n \t\t\tl3_len = sizeof(struct ipv4_hdr) ;\n@@ -325,17 +340,92 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\t\tif (tx_ol_flags & 0x2) {\n \t\t\t\t\t/* HW Offload */\n \t\t\t\t\tol_flags |= PKT_TX_UDP_CKSUM;\n-\t\t\t\t\t/* Pseudo header sum need be set properly */\n-\t\t\t\t\tudp_hdr->dgram_cksum = get_ipv4_psd_sum(ipv4_hdr);\n+\t\t\t\t\tif (ipv4_tunnel)\n+\t\t\t\t\t\tudp_hdr->dgram_cksum = 0;\n+\t\t\t\t\telse\n+\t\t\t\t\t\t/* Pseudo header sum need be set properly */\n+\t\t\t\t\t\tudp_hdr->dgram_cksum =\n+\t\t\t\t\t\t\tget_ipv4_psd_sum(ipv4_hdr);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t/* SW Implementation, clear checksum field first */\n \t\t\t\t\tudp_hdr->dgram_cksum = 0;\n \t\t\t\t\tudp_hdr->dgram_cksum = get_ipv4_udptcp_checksum(ipv4_hdr,\n-\t\t\t\t\t\t\t(uint16_t*)udp_hdr);\n+\t\t\t\t\t\t\t\t\t(uint16_t *)udp_hdr);\n \t\t\t\t}\n-\t\t\t}\n-\t\t\telse if (l4_proto == IPPROTO_TCP){\n+\n+\t\t\t\tif (ipv4_tunnel) {\n+\n+\t\t\t\t\tuint16_t len;\n+\n+\t\t\t\t\t/* Check if inner L3/L4 checkum flag is set */\n+\t\t\t\t\tif (tx_ol_flags & 0xF0)\n+\t\t\t\t\t\tol_flags |= PKT_TX_VXLAN_CKSUM;\n+\n+\t\t\t\t\tinner_l2_len  = sizeof(struct ether_hdr);\n+\t\t\t\t\tinner_eth_hdr = (struct ether_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + l2_len + l3_len\n+\t\t\t\t\t\t\t\t + ETHER_VXLAN_HLEN);\n+\n+\t\t\t\t\teth_type = rte_be_to_cpu_16(inner_eth_hdr->ether_type);\n+\t\t\t\t\tif (eth_type == ETHER_TYPE_VLAN) {\n+\t\t\t\t\t\tol_flags |= PKT_TX_IVLAN_PKT;\n+\t\t\t\t\t\tinner_l2_len += sizeof(struct vlan_hdr);\n+\t\t\t\t\t\teth_type = rte_be_to_cpu_16(*(uint16_t *)\n+\t\t\t\t\t\t\t((uintptr_t)&eth_hdr->ether_type +\n+\t\t\t\t\t\t\t\tsizeof(struct vlan_hdr)));\n+\t\t\t\t\t}\n+\n+\t\t\t\t\tlen = l2_len + l3_len + ETHER_VXLAN_HLEN + inner_l2_len;\n+\t\t\t\t\tif (eth_type == ETHER_TYPE_IPv4) {\n+\t\t\t\t\t\tinner_l3_len = sizeof(struct ipv4_hdr);\n+\t\t\t\t\t\tinner_ipv4_hdr = (struct ipv4_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len);\n+\t\t\t\t\t\tinner_l4_proto = inner_ipv4_hdr->next_proto_id;\n+\n+\t\t\t\t\t\tif (tx_ol_flags & 0x10)\n+\t\t\t\t\t\t\t/* Do not delete, this is required by HW*/\n+\t\t\t\t\t\t\tinner_ipv4_hdr->hdr_checksum = 0;\n+\t\t\t\t\t\t\tol_flags |= PKT_TX_IPV4_CSUM;\n+\n+\t\t\t\t\t} else if (eth_type == ETHER_TYPE_IPv6) {\n+\t\t\t\t\t\tinner_l3_len = sizeof(struct ipv6_hdr);\n+\t\t\t\t\t\tinner_ipv6_hdr = (struct ipv6_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len);\n+\t\t\t\t\t\tinner_l4_proto = inner_ipv6_hdr->proto;\n+\t\t\t\t\t}\n+\t\t\t\t\tif ((inner_l4_proto == IPPROTO_UDP) && (tx_ol_flags & 0x20)) {\n+\n+\t\t\t\t\t\t/* HW Offload */\n+\t\t\t\t\t\tol_flags |= PKT_TX_UDP_CKSUM;\n+\t\t\t\t\t\tinner_udp_hdr = (struct udp_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len + inner_l3_len);\n+\t\t\t\t\t\tif (eth_type == ETHER_TYPE_IPv4)\n+\t\t\t\t\t\t\tinner_udp_hdr->dgram_cksum = get_ipv4_psd_sum(inner_ipv4_hdr);\n+\t\t\t\t\t\telse if (eth_type == ETHER_TYPE_IPv6)\n+\t\t\t\t\t\t\tinner_udp_hdr->dgram_cksum = get_ipv6_psd_sum(inner_ipv6_hdr);\n+\n+\t\t\t\t\t} else if ((inner_l4_proto == IPPROTO_TCP) && (tx_ol_flags & 0x40)) {\n+\t\t\t\t\t\t/* HW Offload */\n+\t\t\t\t\t\tol_flags |= PKT_TX_TCP_CKSUM;\n+\t\t\t\t\t\tinner_tcp_hdr = (struct tcp_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len + inner_l3_len);\n+\t\t\t\t\t\tif (eth_type == ETHER_TYPE_IPv4)\n+\t\t\t\t\t\t\tinner_tcp_hdr->cksum = get_ipv4_psd_sum(inner_ipv4_hdr);\n+\t\t\t\t\t\telse if (eth_type == ETHER_TYPE_IPv6)\n+\t\t\t\t\t\t\tinner_tcp_hdr->cksum = get_ipv6_psd_sum(inner_ipv6_hdr);\n+\t\t\t\t\t} else if ((inner_l4_proto == IPPROTO_SCTP) && (tx_ol_flags & 0x80)) {\n+\t\t\t\t\t\t/* HW Offload */\n+\t\t\t\t\t\tol_flags |= PKT_TX_SCTP_CKSUM;\n+\t\t\t\t\t\tinner_sctp_hdr = (struct sctp_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len + inner_l3_len);\n+\t\t\t\t\t\tinner_sctp_hdr->cksum = 0;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\tmb->reserved = inner_l3_len;\n+\t\t\t\t}\n+\n+\t\t\t} else if (l4_proto == IPPROTO_TCP) {\n \t\t\t\ttcp_hdr = (struct tcp_hdr*) (rte_pktmbuf_mtod(mb,\n \t\t\t\t\t\tunsigned char *) + l2_len + l3_len);\n \t\t\t\tif (tx_ol_flags & 0x4) {\n@@ -347,8 +437,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\t\t\ttcp_hdr->cksum = get_ipv4_udptcp_checksum(ipv4_hdr,\n \t\t\t\t\t\t\t(uint16_t*)tcp_hdr);\n \t\t\t\t}\n-\t\t\t}\n-\t\t\telse if (l4_proto == IPPROTO_SCTP) {\n+\t\t\t} else if (l4_proto == IPPROTO_SCTP) {\n \t\t\t\tsctp_hdr = (struct sctp_hdr*) (rte_pktmbuf_mtod(mb,\n \t\t\t\t\t\tunsigned char *) + l2_len + l3_len);\n \n@@ -367,9 +456,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\t\t}\n \t\t\t}\n \t\t\t/* End of L4 Handling*/\n-\t\t}\n-\t\telse if (pkt_ol_flags & PKT_RX_IPV6_HDR) {\n-\n+\t\t} else if (pkt_ol_flags & (PKT_RX_IPV6_HDR | PKT_RX_IPV6_HDR_EXT)) {\n \t\t\tipv6_hdr = (struct ipv6_hdr *) (rte_pktmbuf_mtod(mb,\n \t\t\t\t\tunsigned char *) + l2_len);\n \t\t\tl3_len = sizeof(struct ipv6_hdr) ;\n@@ -382,15 +469,94 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\t\tif (tx_ol_flags & 0x2) {\n \t\t\t\t\t/* HW Offload */\n \t\t\t\t\tol_flags |= PKT_TX_UDP_CKSUM;\n-\t\t\t\t\tudp_hdr->dgram_cksum = get_ipv6_psd_sum(ipv6_hdr);\n+\t\t\t\t\tif (ipv6_tunnel)\n+\t\t\t\t\t\tudp_hdr->dgram_cksum = 0;\n+\t\t\t\t\telse\n+\t\t\t\t\t\tudp_hdr->dgram_cksum =\n+\t\t\t\t\t\t\tget_ipv6_psd_sum(ipv6_hdr);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t/* SW Implementation */\n \t\t\t\t\t/* checksum field need be clear first */\n \t\t\t\t\tudp_hdr->dgram_cksum = 0;\n \t\t\t\t\tudp_hdr->dgram_cksum = get_ipv6_udptcp_checksum(ipv6_hdr,\n-\t\t\t\t\t\t\t(uint16_t*)udp_hdr);\n+\t\t\t\t\t\t\t\t(uint16_t *)udp_hdr);\n \t\t\t\t}\n+\n+\t\t\t\tif (ipv6_tunnel) {\n+\n+\t\t\t\t\tuint16_t len;\n+\n+\t\t\t\t\t/* Check if inner L3/L4 checksum flag is set */\n+\t\t\t\t\tif (tx_ol_flags & 0xF0)\n+\t\t\t\t\t\tol_flags |= PKT_TX_VXLAN_CKSUM;\n+\n+\t\t\t\t\tinner_l2_len  = sizeof(struct ether_hdr);\n+\t\t\t\t\tinner_eth_hdr = (struct ether_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\tunsigned char *) + l2_len + l3_len + ETHER_VXLAN_HLEN);\n+\t\t\t\t\teth_type = rte_be_to_cpu_16(inner_eth_hdr->ether_type);\n+\n+\t\t\t\t\tif (eth_type == ETHER_TYPE_VLAN) {\n+\t\t\t\t\t\tol_flags |= PKT_TX_IVLAN_PKT;\n+\t\t\t\t\t\tinner_l2_len += sizeof(struct vlan_hdr);\n+\t\t\t\t\t\teth_type = rte_be_to_cpu_16(*(uint16_t *)\n+\t\t\t\t\t\t\t((uintptr_t)&eth_hdr->ether_type +\n+\t\t\t\t\t\t\tsizeof(struct vlan_hdr)));\n+\t\t\t\t\t}\n+\n+\t\t\t\t\tlen = l2_len + l3_len + ETHER_VXLAN_HLEN + inner_l2_len;\n+\n+\t\t\t\t\tif (eth_type == ETHER_TYPE_IPv4) {\n+\t\t\t\t\t\tinner_l3_len = sizeof(struct ipv4_hdr);\n+\t\t\t\t\t\tinner_ipv4_hdr = (struct ipv4_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len);\n+\t\t\t\t\t\tinner_l4_proto = inner_ipv4_hdr->next_proto_id;\n+\n+\t\t\t\t\t\t/* HW offload */\n+\t\t\t\t\t\tif (tx_ol_flags & 0x10)\n+\t\t\t\t\t\t\t/* Do not delete, this is required by HW*/\n+\t\t\t\t\t\t\tinner_ipv4_hdr->hdr_checksum = 0;\n+\t\t\t\t\t\t\tol_flags |= PKT_TX_IPV4_CSUM;\n+\t\t\t\t\t} else if (eth_type == ETHER_TYPE_IPv6) {\n+\t\t\t\t\t\tinner_l3_len = sizeof(struct ipv6_hdr);\n+\t\t\t\t\t\tinner_ipv6_hdr = (struct ipv6_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\tunsigned char *) + len);\n+\t\t\t\t\t\tinner_l4_proto = inner_ipv6_hdr->proto;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\tif ((inner_l4_proto == IPPROTO_UDP) && (tx_ol_flags & 0x20)) {\n+\t\t\t\t\t\tinner_udp_hdr = (struct udp_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\tunsigned char *) + len + inner_l3_len);\n+\t\t\t\t\t\t/* HW offload */\n+\t\t\t\t\t\tol_flags |= PKT_TX_UDP_CKSUM;\n+\t\t\t\t\t\tinner_udp_hdr->dgram_cksum = 0;\n+\t\t\t\t\t\tif (eth_type == ETHER_TYPE_IPv4)\n+\t\t\t\t\t\t\tinner_udp_hdr->dgram_cksum = get_ipv4_psd_sum(inner_ipv4_hdr);\n+\t\t\t\t\t\telse if (eth_type == ETHER_TYPE_IPv6)\n+\t\t\t\t\t\t\tinner_udp_hdr->dgram_cksum = get_ipv6_psd_sum(inner_ipv6_hdr);\n+\t\t\t\t\t} else if ((inner_l4_proto == IPPROTO_TCP) && (tx_ol_flags & 0x40)) {\n+\t\t\t\t\t\t/* HW offload */\n+\t\t\t\t\t\tol_flags |= PKT_TX_TCP_CKSUM;\n+\t\t\t\t\t\tinner_tcp_hdr = (struct tcp_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len + inner_l3_len);\n+\n+\t\t\t\t\t\tif (eth_type == ETHER_TYPE_IPv4)\n+\t\t\t\t\t\t\tinner_tcp_hdr->cksum = get_ipv4_psd_sum(inner_ipv4_hdr);\n+\t\t\t\t\t\telse if (eth_type == ETHER_TYPE_IPv6)\n+\t\t\t\t\t\t\tinner_tcp_hdr->cksum = get_ipv6_psd_sum(inner_ipv6_hdr);\n+\n+\t\t\t\t\t} else if ((inner_l4_proto == IPPROTO_SCTP) && (tx_ol_flags & 0x80)) {\n+\t\t\t\t\t\t/* HW offload */\n+\t\t\t\t\t\tol_flags |= PKT_TX_SCTP_CKSUM;\n+\t\t\t\t\t\tinner_sctp_hdr = (struct sctp_hdr *) (rte_pktmbuf_mtod(mb,\n+\t\t\t\t\t\t\t\tunsigned char *) + len + inner_l3_len);\n+\t\t\t\t\t\tinner_sctp_hdr->cksum = 0;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\t/* pass the inner l3 length to driver */\n+\t\t\t\t\tmb->reserved = inner_l3_len;\n+\t\t\t\t}\n+\n \t\t\t}\n \t\t\telse if (l4_proto == IPPROTO_TCP) {\n \t\t\t\ttcp_hdr = (struct tcp_hdr*) (rte_pktmbuf_mtod(mb,\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "7/7"
    ]
}