get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85574,
    "url": "https://patches.dpdk.org/api/patches/85574/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201221035052.128292-4-yang_y_yi@163.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": "<20201221035052.128292-4-yang_y_yi@163.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201221035052.128292-4-yang_y_yi@163.com",
    "date": "2020-12-21T03:50:47",
    "name": "[v1,3/8] gro: support IPv6 VXLAN TCP/IPv4",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "cc236b56f1e321f887dc830269f8d8302f49e4cc",
    "submitter": {
        "id": 1806,
        "url": "https://patches.dpdk.org/api/people/1806/?format=api",
        "name": "yang_y_yi",
        "email": "yang_y_yi@163.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201221035052.128292-4-yang_y_yi@163.com/mbox/",
    "series": [
        {
            "id": 14395,
            "url": "https://patches.dpdk.org/api/series/14395/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14395",
            "date": "2020-12-21T03:50:44",
            "name": "gro: support TCP/IPv6 and UDP/IPv6 for VLAN and VXLAN",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/14395/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/85574/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/85574/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 1FEB4A09FE;\n\tMon, 21 Dec 2020 04:51:41 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 404E9CB9F;\n\tMon, 21 Dec 2020 04:51:03 +0100 (CET)",
            "from mail-m972.mail.163.com (mail-m972.mail.163.com [123.126.97.2])\n by dpdk.org (Postfix) with ESMTP id D213ACAE2\n for <dev@dpdk.org>; Mon, 21 Dec 2020 04:50:57 +0100 (CET)",
            "from yangyi0100.home.langchao.com (unknown [111.207.123.53])\n by smtp2 (Coremail) with SMTP id GtxpCgD3vb6cG+BfUOf7Fw--.755S5;\n Mon, 21 Dec 2020 11:50:54 +0800 (CST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=akuGC\n FiRBHgVcGCQmOKA2RA9chWt2RbkWod1Moy3fAk=; b=dt4R1Fqwv860j0Orq5wN6\n s7Hp7jvQS+O1NryjsRrJ0d2iHM2MeTPH5uS7o/ojZlDI+gJYmeJtYlOEknttmV0k\n JJwz2erB/3/DnewFimoHE6sA81kiMYoHjkGnwpfDvnLOLsVR2fRcTGOdX6GDU4Qo\n RB+cBY2mL77F/45MTwvGAM=",
        "From": "yang_y_yi@163.com",
        "To": "dev@dpdk.org",
        "Cc": "jiayu.hu@intel.com, konstantin.ananyev@intel.com, thomas@monjalon.net,\n yangyi01@inspur.com, yang_y_yi@163.com",
        "Date": "Mon, 21 Dec 2020 11:50:47 +0800",
        "Message-Id": "<20201221035052.128292-4-yang_y_yi@163.com>",
        "X-Mailer": "git-send-email 2.19.2.windows.1",
        "In-Reply-To": "<20201221035052.128292-1-yang_y_yi@163.com>",
        "References": "<20201221035052.128292-1-yang_y_yi@163.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "GtxpCgD3vb6cG+BfUOf7Fw--.755S5",
        "X-Coremail-Antispam": "1Uf129KBjvAXoWfuF4rKFy3Xw1kKrWDXr1kXwb_yoW5CFyUZo\n WxXw4Ygr1v9r1Yyr40yr1xury2gw18K3ZxAws8Kr48WwnFyrWUJrZ3Ww4fAa17XrWSvF9Y\n 9wn7Gay7XF42yrZ7n29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3\n AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU4RwZUUUUU",
        "X-Originating-IP": "[111.207.123.53]",
        "X-CM-SenderInfo": "51dqwsp1b1xqqrwthudrp/1tbiMx4Ci1Xl7k1rgAAAsc",
        "Subject": "[dpdk-dev] [PATCH v1 3/8] gro: support IPv6 VXLAN TCP/IPv4",
        "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: Yi Yang <yangyi01@inspur.com>\n\nIPv6 VXLAN TCP/IPv4 GRO can help improve TCP/IPv4 performance\nin IPv6 VXLAN use case.\n\nWith this enabled in DPDK, OVS DPDK can leverage it to improve\nVM-to-VM TCP/IPv4 performance, it will merge small adjacent\nIPv6 VXLAN TCP/IPv4 packets to a big IPv6 VXLAN TCP/IPv4 packet\nimmediate after they are received from a physical NIC. It is\nvery helpful in OVS DPDK IPv6 VXLAN use case.\n\nSigned-off-by: Yi Yang <yangyi01@inspur.com>\n---\n .../prog_guide/generic_receive_offload_lib.rst     |   3 +-\n doc/guides/rel_notes/release_21_02.rst             |   4 +\n lib/librte_gro/gro_vxlan6_tcp4.c                   | 507 +++++++++++++++++++++\n lib/librte_gro/gro_vxlan6_tcp4.h                   | 153 +++++++\n lib/librte_gro/meson.build                         |   2 +-\n lib/librte_gro/rte_gro.c                           |  86 +++-\n lib/librte_gro/rte_gro.h                           |   3 +\n 7 files changed, 747 insertions(+), 11 deletions(-)\n create mode 100644 lib/librte_gro/gro_vxlan6_tcp4.c\n create mode 100644 lib/librte_gro/gro_vxlan6_tcp4.h",
    "diff": "diff --git a/doc/guides/prog_guide/generic_receive_offload_lib.rst b/doc/guides/prog_guide/generic_receive_offload_lib.rst\nindex ecb5909..a822eaf 100644\n--- a/doc/guides/prog_guide/generic_receive_offload_lib.rst\n+++ b/doc/guides/prog_guide/generic_receive_offload_lib.rst\n@@ -32,7 +32,8 @@ fragmentation is possible (i.e., DF==0). Additionally, it complies RFC\n \n Currently, the GRO library provides GRO supports for TCP/IPv4, UDP/IPv4,\n and TCP/IPv6 packets as well as VxLAN packets which contain an outer IPv4\n-header and an inner TCP/IPv4, UDP/IPv4 or TCP/IPv6 packet.\n+header and an inner TCP/IPv4, UDP/IPv4 or TCP/IPv6 packet or an outer IPv6\n+header and an inner TCP/IPv4 packet.\n \n Two Sets of API\n ---------------\ndiff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst\nindex 035d774..3b98915 100644\n--- a/doc/guides/rel_notes/release_21_02.rst\n+++ b/doc/guides/rel_notes/release_21_02.rst\n@@ -65,6 +65,10 @@ New Features\n    Added TCP/IPv6 GRO support for IPv4 VXLAN packets, this enabled TCP/IPv6\n    GRO support for IPv4 VXLAN use case.\n \n+* **Added TCP/IPv4 GRO support for IPv6 VXLAN packets.**\n+\n+   Added TCP/IPv4 GRO support for IPv6 VXLAN packets, this enabled TCP/IPv4\n+   GRO support for IPv6 VXLAN use case.\n \n Removed Items\n -------------\ndiff --git a/lib/librte_gro/gro_vxlan6_tcp4.c b/lib/librte_gro/gro_vxlan6_tcp4.c\nnew file mode 100644\nindex 0000000..1e17c1a\n--- /dev/null\n+++ b/lib/librte_gro/gro_vxlan6_tcp4.c\n@@ -0,0 +1,507 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Inspur Corporation\n+ */\n+\n+#include <rte_malloc.h>\n+#include <rte_mbuf.h>\n+#include <rte_cycles.h>\n+#include <rte_ethdev.h>\n+#include <rte_udp.h>\n+\n+#include \"gro_vxlan6_tcp4.h\"\n+\n+/*\n+ * Check if two IPv6 address is same.\n+ */\n+static inline int rte_is_same_ipv6_addr(const uint8_t *ipv6_a1,\n+\t\t\t\t\tconst uint8_t *ipv6_a2)\n+{\n+\tconst uint64_t *w1 = (const uint64_t *)ipv6_a1;\n+\tconst uint64_t *w2 = (const uint64_t *)ipv6_a2;\n+\n+\treturn ((w1[0] ^ w2[0]) | (w1[1] ^ w2[1])) == 0;\n+}\n+\n+/* Copy IPv6 addr */\n+static inline void gro_ipv6_addr_copy(const uint8_t *ipv6_from,\n+\t\t\t\t      uint8_t *ipv6_to)\n+{\n+\tconst uint64_t *from_words = (const uint64_t *)ipv6_from;\n+\tuint64_t *to_words   = (uint64_t *)ipv6_to;\n+\n+\tto_words[0] = from_words[0];\n+\tto_words[1] = from_words[1];\n+}\n+\n+void *\n+gro_vxlan6_tcp4_tbl_create(uint16_t socket_id,\n+\t\tuint16_t max_flow_num,\n+\t\tuint16_t max_item_per_flow)\n+{\n+\tstruct gro_vxlan6_tcp4_tbl *tbl;\n+\tsize_t size;\n+\tuint32_t entries_num, i;\n+\n+\tentries_num = max_flow_num * max_item_per_flow;\n+\tentries_num = RTE_MIN(entries_num, GRO_VXLAN6_TCP4_TBL_MAX_ITEM_NUM);\n+\n+\tif (entries_num == 0)\n+\t\treturn NULL;\n+\n+\ttbl = rte_zmalloc_socket(__func__,\n+\t\t\tsizeof(struct gro_vxlan6_tcp4_tbl),\n+\t\t\tRTE_CACHE_LINE_SIZE,\n+\t\t\tsocket_id);\n+\tif (tbl == NULL)\n+\t\treturn NULL;\n+\n+\tsize = sizeof(struct gro_vxlan6_tcp4_item) * entries_num;\n+\ttbl->items = rte_zmalloc_socket(__func__,\n+\t\t\tsize,\n+\t\t\tRTE_CACHE_LINE_SIZE,\n+\t\t\tsocket_id);\n+\tif (tbl->items == NULL) {\n+\t\trte_free(tbl);\n+\t\treturn NULL;\n+\t}\n+\ttbl->max_item_num = entries_num;\n+\n+\tsize = sizeof(struct gro_vxlan6_tcp4_flow) * entries_num;\n+\ttbl->flows = rte_zmalloc_socket(__func__,\n+\t\t\tsize,\n+\t\t\tRTE_CACHE_LINE_SIZE,\n+\t\t\tsocket_id);\n+\tif (tbl->flows == NULL) {\n+\t\trte_free(tbl->items);\n+\t\trte_free(tbl);\n+\t\treturn NULL;\n+\t}\n+\n+\tfor (i = 0; i < entries_num; i++)\n+\t\ttbl->flows[i].start_index = INVALID_ARRAY_INDEX;\n+\ttbl->max_flow_num = entries_num;\n+\n+\treturn tbl;\n+}\n+\n+void\n+gro_vxlan6_tcp4_tbl_destroy(void *tbl)\n+{\n+\tstruct gro_vxlan6_tcp4_tbl *vxlan6_tbl = tbl;\n+\n+\tif (vxlan6_tbl) {\n+\t\trte_free(vxlan6_tbl->items);\n+\t\trte_free(vxlan6_tbl->flows);\n+\t}\n+\trte_free(vxlan6_tbl);\n+}\n+\n+static inline uint32_t\n+find_an_empty_item(struct gro_vxlan6_tcp4_tbl *tbl)\n+{\n+\tuint32_t max_item_num = tbl->max_item_num, i;\n+\n+\tfor (i = 0; i < max_item_num; i++)\n+\t\tif (tbl->items[i].inner_item.firstseg == NULL)\n+\t\t\treturn i;\n+\treturn INVALID_ARRAY_INDEX;\n+}\n+\n+static inline uint32_t\n+find_an_empty_flow(struct gro_vxlan6_tcp4_tbl *tbl)\n+{\n+\tuint32_t max_flow_num = tbl->max_flow_num, i;\n+\n+\tfor (i = 0; i < max_flow_num; i++)\n+\t\tif (tbl->flows[i].start_index == INVALID_ARRAY_INDEX)\n+\t\t\treturn i;\n+\treturn INVALID_ARRAY_INDEX;\n+}\n+\n+static inline uint32_t\n+insert_new_item(struct gro_vxlan6_tcp4_tbl *tbl,\n+\t\tstruct rte_mbuf *pkt,\n+\t\tuint64_t start_time,\n+\t\tuint32_t prev_idx,\n+\t\tuint32_t sent_seq,\n+\t\tuint16_t ip_id,\n+\t\tuint8_t is_atomic)\n+{\n+\tuint32_t item_idx;\n+\n+\titem_idx = find_an_empty_item(tbl);\n+\tif (unlikely(item_idx == INVALID_ARRAY_INDEX))\n+\t\treturn INVALID_ARRAY_INDEX;\n+\n+\ttbl->items[item_idx].inner_item.firstseg = pkt;\n+\ttbl->items[item_idx].inner_item.lastseg = rte_pktmbuf_lastseg(pkt);\n+\ttbl->items[item_idx].inner_item.start_time = start_time;\n+\ttbl->items[item_idx].inner_item.next_pkt_idx = INVALID_ARRAY_INDEX;\n+\ttbl->items[item_idx].inner_item.sent_seq = sent_seq;\n+\ttbl->items[item_idx].inner_item.ip_id = ip_id;\n+\ttbl->items[item_idx].inner_item.nb_merged = 1;\n+\ttbl->items[item_idx].inner_item.is_atomic = is_atomic;\n+\ttbl->item_num++;\n+\n+\t/* If the previous packet exists, chain the new one with it. */\n+\tif (prev_idx != INVALID_ARRAY_INDEX) {\n+\t\ttbl->items[item_idx].inner_item.next_pkt_idx =\n+\t\t\ttbl->items[prev_idx].inner_item.next_pkt_idx;\n+\t\ttbl->items[prev_idx].inner_item.next_pkt_idx = item_idx;\n+\t}\n+\n+\treturn item_idx;\n+}\n+\n+static inline uint32_t\n+delete_item(struct gro_vxlan6_tcp4_tbl *tbl,\n+\t\tuint32_t item_idx,\n+\t\tuint32_t prev_item_idx)\n+{\n+\tuint32_t next_idx = tbl->items[item_idx].inner_item.next_pkt_idx;\n+\n+\t/* NULL indicates an empty item. */\n+\ttbl->items[item_idx].inner_item.firstseg = NULL;\n+\ttbl->item_num--;\n+\tif (prev_item_idx != INVALID_ARRAY_INDEX)\n+\t\ttbl->items[prev_item_idx].inner_item.next_pkt_idx = next_idx;\n+\n+\treturn next_idx;\n+}\n+\n+static inline uint32_t\n+insert_new_flow(struct gro_vxlan6_tcp4_tbl *tbl,\n+\t\tstruct vxlan6_tcp4_flow_key *src,\n+\t\tuint32_t item_idx)\n+{\n+\tstruct vxlan6_tcp4_flow_key *dst;\n+\tuint32_t flow_idx;\n+\n+\tflow_idx = find_an_empty_flow(tbl);\n+\tif (unlikely(flow_idx == INVALID_ARRAY_INDEX))\n+\t\treturn INVALID_ARRAY_INDEX;\n+\n+\tdst = &(tbl->flows[flow_idx].key);\n+\n+\trte_ether_addr_copy(&(src->inner_key.eth_saddr),\n+\t\t\t&(dst->inner_key.eth_saddr));\n+\trte_ether_addr_copy(&(src->inner_key.eth_daddr),\n+\t\t\t&(dst->inner_key.eth_daddr));\n+\tdst->inner_key.ip_src_addr = src->inner_key.ip_src_addr;\n+\tdst->inner_key.ip_dst_addr = src->inner_key.ip_dst_addr;\n+\tdst->inner_key.recv_ack = src->inner_key.recv_ack;\n+\tdst->inner_key.src_port = src->inner_key.src_port;\n+\tdst->inner_key.dst_port = src->inner_key.dst_port;\n+\n+\tdst->vxlan_hdr.vx_flags = src->vxlan_hdr.vx_flags;\n+\tdst->vxlan_hdr.vx_vni = src->vxlan_hdr.vx_vni;\n+\trte_ether_addr_copy(&(src->outer_eth_saddr), &(dst->outer_eth_saddr));\n+\trte_ether_addr_copy(&(src->outer_eth_daddr), &(dst->outer_eth_daddr));\n+\tgro_ipv6_addr_copy(src->outer_ip_saddr, dst->outer_ip_saddr);\n+\tgro_ipv6_addr_copy(src->outer_ip_daddr, dst->outer_ip_daddr);\n+\tdst->outer_src_port = src->outer_src_port;\n+\tdst->outer_dst_port = src->outer_dst_port;\n+\n+\ttbl->flows[flow_idx].start_index = item_idx;\n+\ttbl->flow_num++;\n+\n+\treturn flow_idx;\n+}\n+\n+static inline int\n+is_same_vxlan6_tcp4_flow(struct vxlan6_tcp4_flow_key k1,\n+\t\tstruct vxlan6_tcp4_flow_key k2)\n+{\n+\treturn (rte_is_same_ether_addr(&k1.outer_eth_saddr,\n+\t\t\t\t\t&k2.outer_eth_saddr) &&\n+\t\t\trte_is_same_ether_addr(&k1.outer_eth_daddr,\n+\t\t\t\t&k2.outer_eth_daddr) &&\n+\t\t\trte_is_same_ipv6_addr(k1.outer_ip_saddr,\n+\t\t\t\tk2.outer_ip_saddr) &&\n+\t\t\trte_is_same_ipv6_addr(k1.outer_ip_daddr,\n+\t\t\t\tk2.outer_ip_daddr) &&\n+\t\t\t(k1.outer_src_port == k2.outer_src_port) &&\n+\t\t\t(k1.outer_dst_port == k2.outer_dst_port) &&\n+\t\t\t(k1.vxlan_hdr.vx_flags == k2.vxlan_hdr.vx_flags) &&\n+\t\t\t(k1.vxlan_hdr.vx_vni == k2.vxlan_hdr.vx_vni) &&\n+\t\t\tis_same_tcp4_flow(k1.inner_key, k2.inner_key));\n+}\n+\n+static inline int\n+check_vxlan6_seq_option(struct gro_vxlan6_tcp4_item *item,\n+\t\tstruct rte_tcp_hdr *tcp_hdr,\n+\t\tuint32_t sent_seq,\n+\t\tuint16_t ip_id,\n+\t\tuint16_t tcp_hl,\n+\t\tuint16_t tcp_dl,\n+\t\tuint8_t is_atomic)\n+{\n+\tstruct rte_mbuf *pkt = item->inner_item.firstseg;\n+\tint cmp;\n+\tuint16_t l2_offset;\n+\n+\tl2_offset = pkt->outer_l2_len + pkt->outer_l3_len;\n+\tcmp = check_seq_option(&item->inner_item, tcp_hdr, sent_seq, ip_id,\n+\t\t\ttcp_hl, tcp_dl, l2_offset, is_atomic);\n+\tif (cmp > 0)\n+\t\t/* Append the new packet. */\n+\t\treturn 1;\n+\telse if (cmp < 0)\n+\t\t/* Prepend the new packet. */\n+\t\treturn -1;\n+\n+\treturn 0;\n+}\n+\n+static inline int\n+merge_two_vxlan6_tcp4_packets(struct gro_vxlan6_tcp4_item *item,\n+\t\tstruct rte_mbuf *pkt,\n+\t\tint cmp,\n+\t\tuint32_t sent_seq,\n+\t\tuint16_t ip_id)\n+{\n+\tif (merge_two_tcp4_packets(&item->inner_item, pkt, cmp, sent_seq,\n+\t\t\t\tip_id, pkt->outer_l2_len +\n+\t\t\t\tpkt->outer_l3_len))\n+\t\treturn 1;\n+\n+\treturn 0;\n+}\n+\n+static inline void\n+update_vxlan6_header(struct gro_vxlan6_tcp4_item *item)\n+{\n+\tstruct rte_ipv6_hdr *ipv6_hdr;\n+\tstruct rte_ipv4_hdr *ipv4_hdr;\n+\tstruct rte_udp_hdr *udp_hdr;\n+\tstruct rte_mbuf *pkt = item->inner_item.firstseg;\n+\tuint16_t len;\n+\n+\t/* Update the outer IPv6 header. */\n+\tlen = pkt->pkt_len - pkt->outer_l2_len;\n+\tipv6_hdr = (struct rte_ipv6_hdr *)(rte_pktmbuf_mtod(pkt, char *) +\n+\t\t\tpkt->outer_l2_len);\n+\tipv6_hdr->payload_len = rte_cpu_to_be_16(len - pkt->outer_l3_len);\n+\n+\t/* Update the outer UDP header. */\n+\tlen -= pkt->outer_l3_len;\n+\tudp_hdr = (struct rte_udp_hdr *)((char *)ipv6_hdr + pkt->outer_l3_len);\n+\tudp_hdr->dgram_len = rte_cpu_to_be_16(len);\n+\n+\t/* Update the inner IPv4 header. */\n+\tlen -= pkt->l2_len;\n+\tipv4_hdr = (struct rte_ipv4_hdr *)((char *)udp_hdr + pkt->l2_len);\n+\tipv4_hdr->total_length = rte_cpu_to_be_16(len);\n+}\n+\n+int32_t\n+gro_vxlan6_tcp4_reassemble(struct rte_mbuf *pkt,\n+\t\tstruct gro_vxlan6_tcp4_tbl *tbl,\n+\t\tuint64_t start_time)\n+{\n+\tstruct rte_ether_hdr *outer_eth_hdr, *eth_hdr;\n+\tstruct rte_ipv6_hdr *outer_ipv6_hdr;\n+\tstruct rte_ipv4_hdr *ipv4_hdr;\n+\tstruct rte_tcp_hdr *tcp_hdr;\n+\tstruct rte_udp_hdr *udp_hdr;\n+\tstruct rte_vxlan_hdr *vxlan_hdr;\n+\tuint32_t sent_seq;\n+\tint32_t tcp_dl;\n+\tuint16_t frag_off, ip_id;\n+\tuint8_t is_atomic;\n+\n+\tstruct vxlan6_tcp4_flow_key key;\n+\tuint32_t cur_idx, prev_idx, item_idx;\n+\tuint32_t i, max_flow_num, remaining_flow_num;\n+\tint cmp;\n+\tuint16_t hdr_len;\n+\tuint8_t find;\n+\n+\t/*\n+\t * Don't process the packet whose TCP header length is greater\n+\t * than 60 bytes or less than 20 bytes.\n+\t */\n+\tif (unlikely(INVALID_TCP_HDRLEN(pkt->l4_len)))\n+\t\treturn -1;\n+\n+\touter_eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);\n+\touter_ipv6_hdr = (struct rte_ipv6_hdr *)((char *)outer_eth_hdr +\n+\t\t\tpkt->outer_l2_len);\n+\tudp_hdr = (struct rte_udp_hdr *)((char *)outer_ipv6_hdr +\n+\t\t\tpkt->outer_l3_len);\n+\tvxlan_hdr = (struct rte_vxlan_hdr *)((char *)udp_hdr +\n+\t\t\tsizeof(struct rte_udp_hdr));\n+\teth_hdr = (struct rte_ether_hdr *)((char *)vxlan_hdr +\n+\t\t\tsizeof(struct rte_vxlan_hdr));\n+\tipv4_hdr = (struct rte_ipv4_hdr *)((char *)udp_hdr + pkt->l2_len);\n+\ttcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);\n+\n+\t/*\n+\t * Don't process the packet which has FIN, SYN, RST, PSH, URG,\n+\t * ECE or CWR set.\n+\t */\n+\tif (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)\n+\t\treturn -1;\n+\n+\thdr_len = pkt->outer_l2_len + pkt->outer_l3_len + pkt->l2_len +\n+\t\tpkt->l3_len + pkt->l4_len;\n+\t/*\n+\t * Don't process the packet whose payload length is less than or\n+\t * equal to 0.\n+\t */\n+\tif (pkt->pkt_len <= hdr_len)\n+\t\treturn -1;\n+\ttcp_dl = pkt->pkt_len - hdr_len;\n+\n+\t/*\n+\t * Save IPv4 ID for the packet whose DF bit is 0. For the packet\n+\t * whose DF bit is 1, IPv4 ID is ignored.\n+\t */\n+\tfrag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);\n+\tis_atomic = (frag_off & RTE_IPV4_HDR_DF_FLAG) == RTE_IPV4_HDR_DF_FLAG;\n+\tip_id = is_atomic ? 0 : rte_be_to_cpu_16(ipv4_hdr->packet_id);\n+\n+\tsent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);\n+\n+\trte_ether_addr_copy(&(eth_hdr->s_addr), &(key.inner_key.eth_saddr));\n+\trte_ether_addr_copy(&(eth_hdr->d_addr), &(key.inner_key.eth_daddr));\n+\tkey.inner_key.ip_src_addr = ipv4_hdr->src_addr;\n+\tkey.inner_key.ip_dst_addr = ipv4_hdr->dst_addr;\n+\tkey.inner_key.recv_ack = tcp_hdr->recv_ack;\n+\tkey.inner_key.src_port = tcp_hdr->src_port;\n+\tkey.inner_key.dst_port = tcp_hdr->dst_port;\n+\n+\tkey.vxlan_hdr.vx_flags = vxlan_hdr->vx_flags;\n+\tkey.vxlan_hdr.vx_vni = vxlan_hdr->vx_vni;\n+\trte_ether_addr_copy(&(outer_eth_hdr->s_addr), &(key.outer_eth_saddr));\n+\trte_ether_addr_copy(&(outer_eth_hdr->d_addr), &(key.outer_eth_daddr));\n+\tgro_ipv6_addr_copy(outer_ipv6_hdr->src_addr, key.outer_ip_saddr);\n+\tgro_ipv6_addr_copy(outer_ipv6_hdr->dst_addr, key.outer_ip_daddr);\n+\tkey.outer_src_port = udp_hdr->src_port;\n+\tkey.outer_dst_port = udp_hdr->dst_port;\n+\n+\t/* Search for a matched flow. */\n+\tmax_flow_num = tbl->max_flow_num;\n+\tremaining_flow_num = tbl->flow_num;\n+\tfind = 0;\n+\tfor (i = 0; i < max_flow_num && remaining_flow_num; i++) {\n+\t\tif (tbl->flows[i].start_index != INVALID_ARRAY_INDEX) {\n+\t\t\tif (is_same_vxlan6_tcp4_flow(tbl->flows[i].key, key)) {\n+\t\t\t\tfind = 1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tremaining_flow_num--;\n+\t\t}\n+\t}\n+\n+\t/*\n+\t * Can't find a matched flow. Insert a new flow and store the\n+\t * packet into the flow.\n+\t */\n+\tif (find == 0) {\n+\t\titem_idx = insert_new_item(tbl, pkt, start_time,\n+\t\t\t\tINVALID_ARRAY_INDEX, sent_seq,\n+\t\t\t\tip_id, is_atomic);\n+\t\tif (item_idx == INVALID_ARRAY_INDEX)\n+\t\t\treturn -1;\n+\t\tif (insert_new_flow(tbl, &key, item_idx) ==\n+\t\t\t\tINVALID_ARRAY_INDEX) {\n+\t\t\t/*\n+\t\t\t * Fail to insert a new flow, so\n+\t\t\t * delete the inserted packet.\n+\t\t\t */\n+\t\t\tdelete_item(tbl, item_idx, INVALID_ARRAY_INDEX);\n+\t\t\treturn -1;\n+\t\t}\n+\t\treturn 0;\n+\t}\n+\n+\t/* Check all packets in the flow and try to find a neighbor. */\n+\tcur_idx = tbl->flows[i].start_index;\n+\tprev_idx = cur_idx;\n+\tdo {\n+\t\tcmp = check_vxlan6_seq_option(&(tbl->items[cur_idx]), tcp_hdr,\n+\t\t\t\tsent_seq, ip_id, pkt->l4_len,\n+\t\t\t\ttcp_dl, is_atomic);\n+\t\tif (cmp) {\n+\t\t\tif (merge_two_vxlan6_tcp4_packets(\n+\t\t\t\t\t\t&(tbl->items[cur_idx]),\n+\t\t\t\t\t\tpkt, cmp, sent_seq, ip_id))\n+\t\t\t\treturn 1;\n+\t\t\t/*\n+\t\t\t * Can't merge two packets, as the packet\n+\t\t\t * length will be greater than the max value.\n+\t\t\t * Insert the packet into the flow.\n+\t\t\t */\n+\t\t\tif (insert_new_item(tbl, pkt, start_time, prev_idx,\n+\t\t\t\t\t    sent_seq, ip_id, is_atomic) ==\n+\t\t\t\t\tINVALID_ARRAY_INDEX)\n+\t\t\t\treturn -1;\n+\t\t\treturn 0;\n+\t\t}\n+\t\tprev_idx = cur_idx;\n+\t\tcur_idx = tbl->items[cur_idx].inner_item.next_pkt_idx;\n+\t} while (cur_idx != INVALID_ARRAY_INDEX);\n+\n+\t/* Can't find neighbor. Insert the packet into the flow. */\n+\tif (insert_new_item(tbl, pkt, start_time, prev_idx, sent_seq,\n+\t\t\t\tip_id, is_atomic)\n+\t\t\t\t== INVALID_ARRAY_INDEX)\n+\t\treturn -1;\n+\n+\treturn 0;\n+}\n+\n+uint16_t\n+gro_vxlan6_tcp4_tbl_timeout_flush(struct gro_vxlan6_tcp4_tbl *tbl,\n+\t\tuint64_t flush_timestamp,\n+\t\tstruct rte_mbuf **out,\n+\t\tuint16_t nb_out)\n+{\n+\tuint16_t k = 0;\n+\tuint32_t i, j;\n+\tuint32_t max_flow_num = tbl->max_flow_num;\n+\n+\tfor (i = 0; i < max_flow_num; i++) {\n+\t\tif (unlikely(tbl->flow_num == 0))\n+\t\t\treturn k;\n+\n+\t\tj = tbl->flows[i].start_index;\n+\t\twhile (j != INVALID_ARRAY_INDEX) {\n+\t\t\tif (tbl->items[j].inner_item.start_time <=\n+\t\t\t\t\tflush_timestamp) {\n+\t\t\t\tout[k++] = tbl->items[j].inner_item.firstseg;\n+\t\t\t\tif (tbl->items[j].inner_item.nb_merged > 1)\n+\t\t\t\t\tupdate_vxlan6_header(&(tbl->items[j]));\n+\t\t\t\t/*\n+\t\t\t\t * Delete the item and get the next packet\n+\t\t\t\t * index.\n+\t\t\t\t */\n+\t\t\t\tj = delete_item(tbl, j, INVALID_ARRAY_INDEX);\n+\t\t\t\ttbl->flows[i].start_index = j;\n+\t\t\t\tif (j == INVALID_ARRAY_INDEX)\n+\t\t\t\t\ttbl->flow_num--;\n+\n+\t\t\t\tif (unlikely(k == nb_out))\n+\t\t\t\t\treturn k;\n+\t\t\t} else\n+\t\t\t\t/*\n+\t\t\t\t * The left packets in the flow won't be\n+\t\t\t\t * timeout. Go to check other flows.\n+\t\t\t\t */\n+\t\t\t\tbreak;\n+\t\t}\n+\t}\n+\treturn k;\n+}\n+\n+uint32_t\n+gro_vxlan6_tcp4_tbl_pkt_count(void *tbl)\n+{\n+\tstruct gro_vxlan6_tcp4_tbl *gro_tbl = tbl;\n+\n+\tif (gro_tbl)\n+\t\treturn gro_tbl->item_num;\n+\n+\treturn 0;\n+}\ndiff --git a/lib/librte_gro/gro_vxlan6_tcp4.h b/lib/librte_gro/gro_vxlan6_tcp4.h\nnew file mode 100644\nindex 0000000..2516429\n--- /dev/null\n+++ b/lib/librte_gro/gro_vxlan6_tcp4.h\n@@ -0,0 +1,153 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Inspur Corporation\n+ */\n+\n+#ifndef _GRO_VXLAN6_TCP4_H_\n+#define _GRO_VXLAN6_TCP4_H_\n+\n+#include \"gro_tcp4.h\"\n+\n+#define GRO_VXLAN6_TCP4_TBL_MAX_ITEM_NUM (1024UL * 1024UL)\n+\n+/* Header fields representing a IPv6 VxLAN flow */\n+struct vxlan6_tcp4_flow_key {\n+\tstruct tcp4_flow_key inner_key;\n+\tstruct rte_vxlan_hdr vxlan_hdr;\n+\n+\tstruct rte_ether_addr outer_eth_saddr;\n+\tstruct rte_ether_addr outer_eth_daddr;\n+\n+\tuint8_t outer_ip_saddr[16];\n+\tuint8_t outer_ip_daddr[16];\n+\n+\t/* Outer UDP ports */\n+\tuint16_t outer_src_port;\n+\tuint16_t outer_dst_port;\n+\n+};\n+\n+struct gro_vxlan6_tcp4_flow {\n+\tstruct vxlan6_tcp4_flow_key key;\n+\t/*\n+\t * The index of the first packet in the flow. INVALID_ARRAY_INDEX\n+\t * indicates an empty flow.\n+\t */\n+\tuint32_t start_index;\n+};\n+\n+struct gro_vxlan6_tcp4_item {\n+\tstruct gro_tcp4_item inner_item;\n+};\n+\n+/*\n+ * IPv6 VxLAN (with an outer IPv6 header and an inner TCP/IPv4 packet)\n+ * reassembly table structure\n+ */\n+struct gro_vxlan6_tcp4_tbl {\n+\t/* item array */\n+\tstruct gro_vxlan6_tcp4_item *items;\n+\t/* flow array */\n+\tstruct gro_vxlan6_tcp4_flow *flows;\n+\t/* current item number */\n+\tuint32_t item_num;\n+\t/* current flow number */\n+\tuint32_t flow_num;\n+\t/* the maximum item number */\n+\tuint32_t max_item_num;\n+\t/* the maximum flow number */\n+\tuint32_t max_flow_num;\n+};\n+\n+\n+/**\n+ * This function creates a IPv6 VxLAN reassembly table for IPv6 VxLAN packets\n+ * which have an outer IPv6 header and an inner TCP/IPv4 packet.\n+ *\n+ * @param socket_id\n+ *  Socket index for allocating the table\n+ * @param max_flow_num\n+ *  The maximum number of flows in the table\n+ * @param max_item_per_flow\n+ *  The maximum number of packets per flow\n+ *\n+ * @return\n+ *  - Return the table pointer on success.\n+ *  - Return NULL on failure.\n+ */\n+void *gro_vxlan6_tcp4_tbl_create(uint16_t socket_id,\n+\t\tuint16_t max_flow_num,\n+\t\tuint16_t max_item_per_flow);\n+\n+/**\n+ * This function destroys a IPv6 VxLAN reassembly table.\n+ *\n+ * @param tbl\n+ *  Pointer pointing to the IPv6 VxLAN reassembly table\n+ */\n+void gro_vxlan6_tcp4_tbl_destroy(void *tbl);\n+\n+/**\n+ * This function merges a IPv6 VxLAN packet which has an outer IPv6 header and\n+ * an inner TCP/IPv4 packet. It does not process the packet, whose TCP\n+ * header has SYN, FIN, RST, PSH, CWR, ECE or URG bit set, or which\n+ * does not have payload.\n+ *\n+ * This function doesi not check if the packet has correct checksums and\n+ * does not re-calculate checksums for the merged packet. Additionally,\n+ * it assumes the packets are complete (i.e., MF==0 && frag_off==0), when\n+ * IP fragmentation is possible (i.e., DF==0). It returns the packet, if\n+ * the packet has invalid parameters (e.g. SYN bit is set) or there is no\n+ * available space in the table.\n+ *\n+ * @param pkt\n+ *  Packet to reassemble\n+ * @param tbl\n+ *  Pointer pointing to the IPv6 VxLAN reassembly table\n+ * @start_time\n+ *  The time when the packet is inserted into the table\n+ *\n+ * @return\n+ *  - Return a positive value if the packet is merged.\n+ *  - Return zero if the packet isn't merged but stored in the table.\n+ *  - Return a negative value for invalid parameters or no available\n+ *    space in the table.\n+ */\n+int32_t gro_vxlan6_tcp4_reassemble(struct rte_mbuf *pkt,\n+\t\tstruct gro_vxlan6_tcp4_tbl *tbl,\n+\t\tuint64_t start_time);\n+\n+/**\n+ * This function flushes timeout packets in the IPv6 VxLAN reassembly table,\n+ * and without updating checksums.\n+ *\n+ * @param tbl\n+ *  Pointer pointing to a IPv6 VxLAN GRO table\n+ * @param flush_timestamp\n+ *  This function flushes packets which are inserted into the table\n+ *  before or at the flush_timestamp.\n+ * @param out\n+ *  Pointer array used to keep flushed packets\n+ * @param nb_out\n+ *  The element number in 'out'. It also determines the maximum number of\n+ *  packets that can be flushed finally.\n+ *\n+ * @return\n+ *  The number of flushed packets\n+ */\n+uint16_t gro_vxlan6_tcp4_tbl_timeout_flush(struct gro_vxlan6_tcp4_tbl *tbl,\n+\t\tuint64_t flush_timestamp,\n+\t\tstruct rte_mbuf **out,\n+\t\tuint16_t nb_out);\n+\n+/**\n+ * This function returns the number of the packets in a IPv6 VxLAN\n+ * reassembly table.\n+ *\n+ * @param tbl\n+ *  Pointer pointing to the IPv6 VxLAN reassembly table\n+ *\n+ * @return\n+ *  The number of packets in the table\n+ */\n+uint32_t gro_vxlan6_tcp4_tbl_pkt_count(void *tbl);\n+#endif\ndiff --git a/lib/librte_gro/meson.build b/lib/librte_gro/meson.build\nindex 020e7e8..994ee06 100644\n--- a/lib/librte_gro/meson.build\n+++ b/lib/librte_gro/meson.build\n@@ -1,6 +1,6 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2017 Intel Corporation\n \n-sources = files('rte_gro.c', 'gro_tcp4.c', 'gro_udp4.c', 'gro_vxlan_tcp4.c', 'gro_vxlan_udp4.c', 'gro_tcp6.c', 'gro_vxlan_tcp6.c')\n+sources = files('rte_gro.c', 'gro_tcp4.c', 'gro_udp4.c', 'gro_vxlan_tcp4.c', 'gro_vxlan_udp4.c', 'gro_tcp6.c', 'gro_vxlan_tcp6.c', 'gro_vxlan6_tcp4.c')\n headers = files('rte_gro.h')\n deps += ['ethdev']\ndiff --git a/lib/librte_gro/rte_gro.c b/lib/librte_gro/rte_gro.c\nindex 89fed3c..12ed3b2 100644\n--- a/lib/librte_gro/rte_gro.c\n+++ b/lib/librte_gro/rte_gro.c\n@@ -11,6 +11,7 @@\n #include \"gro_tcp4.h\"\n #include \"gro_tcp6.h\"\n #include \"gro_udp4.h\"\n+#include \"gro_vxlan6_tcp4.h\"\n #include \"gro_vxlan_tcp4.h\"\n #include \"gro_vxlan_tcp6.h\"\n #include \"gro_vxlan_udp4.h\"\n@@ -24,16 +25,18 @@\n static gro_tbl_create_fn tbl_create_fn[RTE_GRO_TYPE_MAX_NUM] = {\n \t\tgro_tcp4_tbl_create, gro_vxlan_tcp4_tbl_create,\n \t\tgro_udp4_tbl_create, gro_vxlan_udp4_tbl_create,\n-\t\tgro_tcp6_tbl_create, gro_vxlan_tcp6_tbl_create, NULL};\n+\t\tgro_tcp6_tbl_create, gro_vxlan_tcp6_tbl_create,\n+\t\tgro_vxlan6_tcp4_tbl_create, NULL};\n static gro_tbl_destroy_fn tbl_destroy_fn[RTE_GRO_TYPE_MAX_NUM] = {\n \t\t\tgro_tcp4_tbl_destroy, gro_vxlan_tcp4_tbl_destroy,\n \t\t\tgro_udp4_tbl_destroy, gro_vxlan_udp4_tbl_destroy,\n-\t\t\tgro_tcp6_tbl_destroy, gro_vxlan_tcp6_tbl_destroy, NULL};\n+\t\t\tgro_tcp6_tbl_destroy, gro_vxlan_tcp6_tbl_destroy,\n+\t\t\tgro_vxlan6_tcp4_tbl_destroy, NULL};\n static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {\n \t\t\tgro_tcp4_tbl_pkt_count, gro_vxlan_tcp4_tbl_pkt_count,\n \t\t\tgro_udp4_tbl_pkt_count, gro_vxlan_udp4_tbl_pkt_count,\n \t\t\tgro_tcp6_tbl_pkt_count, gro_vxlan_tcp6_tbl_pkt_count,\n-\t\t\tNULL};\n+\t\t\tgro_vxlan6_tcp4_tbl_pkt_count, NULL};\n \n #define IS_IPV4_TCP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \\\n \t\t((ptype & RTE_PTYPE_L4_TCP) == RTE_PTYPE_L4_TCP) && \\\n@@ -86,6 +89,19 @@\n \t\t ((ptype & RTE_PTYPE_INNER_L3_MASK) == \\\n \t\t  RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN)))\n \n+#define IS_IPV6_VXLAN_TCP4_PKT(ptype) (RTE_ETH_IS_IPV6_HDR(ptype) && \\\n+\t\t((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \\\n+\t\t((ptype & RTE_PTYPE_TUNNEL_VXLAN) == \\\n+\t\t RTE_PTYPE_TUNNEL_VXLAN) && \\\n+\t\t((ptype & RTE_PTYPE_INNER_L4_TCP) == \\\n+\t\t RTE_PTYPE_INNER_L4_TCP) && \\\n+\t\t(((ptype & RTE_PTYPE_INNER_L3_MASK) == \\\n+\t\t  RTE_PTYPE_INNER_L3_IPV4) || \\\n+\t\t ((ptype & RTE_PTYPE_INNER_L3_MASK) == \\\n+\t\t  RTE_PTYPE_INNER_L3_IPV4_EXT) || \\\n+\t\t ((ptype & RTE_PTYPE_INNER_L3_MASK) == \\\n+\t\t  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)))\n+\n /*\n  * GRO context structure. It keeps the table structures, which are\n  * used to merge packets, for different GRO types. Before using\n@@ -174,7 +190,7 @@ struct gro_ctx {\n \tstruct gro_udp4_flow udp_flows[RTE_GRO_MAX_BURST_ITEM_NUM];\n \tstruct gro_udp4_item udp_items[RTE_GRO_MAX_BURST_ITEM_NUM] = {{0} };\n \n-\t/* Allocate a reassembly table for VXLAN TCP GRO */\n+\t/* Allocate a reassembly table for IPv4 VXLAN TCP/IPv4 GRO */\n \tstruct gro_vxlan_tcp4_tbl vxlan_tcp_tbl;\n \tstruct gro_vxlan_tcp4_flow vxlan_tcp_flows[RTE_GRO_MAX_BURST_ITEM_NUM];\n \tstruct gro_vxlan_tcp4_item vxlan_tcp_items[RTE_GRO_MAX_BURST_ITEM_NUM]\n@@ -197,19 +213,28 @@ struct gro_ctx {\n \tstruct gro_vxlan_tcp6_item vxlan_tcp6_items[RTE_GRO_MAX_BURST_ITEM_NUM]\n \t\t\t= {{{0}, 0, 0} };\n \n+\t/* Allocate a reassembly table for IPv6 VXLAN TCP/IPv4 GRO */\n+\tstruct gro_vxlan6_tcp4_tbl vxlan6_tcp4_tbl;\n+\tstruct gro_vxlan6_tcp4_flow\n+\t\tvxlan6_tcp4_flows[RTE_GRO_MAX_BURST_ITEM_NUM];\n+\tstruct gro_vxlan6_tcp4_item\n+\t\tvxlan6_tcp4_items[RTE_GRO_MAX_BURST_ITEM_NUM] = {{{0}} };\n+\n \tstruct rte_mbuf *unprocess_pkts[nb_pkts];\n \tuint32_t item_num;\n \tint32_t ret;\n \tuint16_t i, unprocess_num = 0, nb_after_gro = nb_pkts;\n \tuint8_t do_tcp4_gro = 0, do_vxlan_tcp_gro = 0, do_udp4_gro = 0,\n-\t\tdo_vxlan_udp_gro = 0, do_tcp6_gro = 0, do_vxlan_tcp6_gro = 0;\n+\t\tdo_vxlan_udp_gro = 0, do_tcp6_gro = 0, do_vxlan_tcp6_gro = 0,\n+\t\tdo_vxlan6_tcp4_gro = 0;\n \n \tif (unlikely((param->gro_types & (RTE_GRO_IPV4_VXLAN_TCP_IPV4 |\n \t\t\t\t\tRTE_GRO_TCP_IPV4 |\n \t\t\t\t\tRTE_GRO_IPV4_VXLAN_UDP_IPV4 |\n \t\t\t\t\tRTE_GRO_UDP_IPV4 |\n \t\t\t\t\tRTE_GRO_TCP_IPV6 |\n-\t\t\t\t\tRTE_GRO_IPV4_VXLAN_TCP_IPV6)) == 0))\n+\t\t\t\t\tRTE_GRO_IPV4_VXLAN_TCP_IPV6 |\n+\t\t\t\t\tRTE_GRO_IPV6_VXLAN_TCP_IPV4)) == 0))\n \t\treturn nb_pkts;\n \n \t/* Get the maximum number of packets */\n@@ -295,6 +320,19 @@ struct gro_ctx {\n \t\tdo_vxlan_tcp6_gro = 1;\n \t}\n \n+\tif (param->gro_types & RTE_GRO_IPV6_VXLAN_TCP_IPV4) {\n+\t\tfor (i = 0; i < item_num; i++)\n+\t\t\tvxlan6_tcp4_flows[i].start_index = INVALID_ARRAY_INDEX;\n+\n+\t\tvxlan6_tcp4_tbl.flows = vxlan6_tcp4_flows;\n+\t\tvxlan6_tcp4_tbl.items = vxlan6_tcp4_items;\n+\t\tvxlan6_tcp4_tbl.flow_num = 0;\n+\t\tvxlan6_tcp4_tbl.item_num = 0;\n+\t\tvxlan6_tcp4_tbl.max_flow_num = item_num;\n+\t\tvxlan6_tcp4_tbl.max_item_num = item_num;\n+\t\tdo_vxlan6_tcp4_gro = 1;\n+\t}\n+\n \tfor (i = 0; i < nb_pkts; i++) {\n \t\t/*\n \t\t * The timestamp is ignored, since all packets\n@@ -351,6 +389,15 @@ struct gro_ctx {\n \t\t\t\tnb_after_gro--;\n \t\t\telse if (ret < 0)\n \t\t\t\tunprocess_pkts[unprocess_num++] = pkts[i];\n+\t\t} else if (IS_IPV6_VXLAN_TCP4_PKT(pkts[i]->packet_type) &&\n+\t\t\t\tdo_vxlan6_tcp4_gro) {\n+\t\t\tret = gro_vxlan6_tcp4_reassemble(pkts[i],\n+\t\t\t\t\t\t\t&vxlan6_tcp4_tbl, 0);\n+\t\t\tif (ret > 0)\n+\t\t\t\t/* Merge successfully */\n+\t\t\t\tnb_after_gro--;\n+\t\t\telse if (ret < 0)\n+\t\t\t\tunprocess_pkts[unprocess_num++] = pkts[i];\n \t\t} else\n \t\t\tunprocess_pkts[unprocess_num++] = pkts[i];\n \t}\n@@ -390,6 +437,11 @@ struct gro_ctx {\n \t\t\t\t\t0, &pkts[i], nb_pkts - i);\n \t\t}\n \n+\t\tif (do_vxlan6_tcp4_gro) {\n+\t\t\ti += gro_vxlan6_tcp4_tbl_timeout_flush(&vxlan6_tcp4_tbl,\n+\t\t\t\t\t0, &pkts[i], nb_pkts - i);\n+\t\t}\n+\n \t\t/* Copy unprocessed packets */\n \t\tif (unprocess_num > 0) {\n \t\t\tmemcpy(&pkts[i], unprocess_pkts,\n@@ -410,18 +462,19 @@ struct gro_ctx {\n \tstruct rte_mbuf *unprocess_pkts[nb_pkts];\n \tstruct gro_ctx *gro_ctx = ctx;\n \tvoid *tcp_tbl, *udp_tbl, *vxlan_tcp_tbl, *vxlan_udp_tbl, *tcp6_tbl,\n-\t\t*vxlan_tcp6_tbl;\n+\t\t*vxlan_tcp6_tbl, *vxlan6_tcp4_tbl;\n \tuint64_t current_time;\n \tuint16_t i, unprocess_num = 0;\n \tuint8_t do_tcp4_gro, do_vxlan_tcp_gro, do_udp4_gro, do_vxlan_udp_gro,\n-\t\tdo_tcp6_gro, do_vxlan_tcp6_gro;\n+\t\tdo_tcp6_gro, do_vxlan_tcp6_gro, do_vxlan6_tcp4_gro;\n \n \tif (unlikely((gro_ctx->gro_types & (RTE_GRO_IPV4_VXLAN_TCP_IPV4 |\n \t\t\t\t\tRTE_GRO_TCP_IPV4 |\n \t\t\t\t\tRTE_GRO_IPV4_VXLAN_UDP_IPV4 |\n \t\t\t\t\tRTE_GRO_UDP_IPV4 |\n \t\t\t\t\tRTE_GRO_TCP_IPV6 |\n-\t\t\t\t\tRTE_GRO_IPV4_VXLAN_TCP_IPV6)) == 0))\n+\t\t\t\t\tRTE_GRO_IPV4_VXLAN_TCP_IPV6 |\n+\t\t\t\t\tRTE_GRO_IPV6_VXLAN_TCP_IPV4)) == 0))\n \t\treturn nb_pkts;\n \n \ttcp_tbl = gro_ctx->tbls[RTE_GRO_TCP_IPV4_INDEX];\n@@ -430,6 +483,7 @@ struct gro_ctx {\n \tvxlan_udp_tbl = gro_ctx->tbls[RTE_GRO_IPV4_VXLAN_UDP_IPV4_INDEX];\n \ttcp6_tbl = gro_ctx->tbls[RTE_GRO_TCP_IPV6_INDEX];\n \tvxlan_tcp6_tbl = gro_ctx->tbls[RTE_GRO_IPV4_VXLAN_TCP_IPV6_INDEX];\n+\tvxlan6_tcp4_tbl = gro_ctx->tbls[RTE_GRO_IPV6_VXLAN_TCP_IPV4_INDEX];\n \n \tdo_tcp4_gro = (gro_ctx->gro_types & RTE_GRO_TCP_IPV4) ==\n \t\tRTE_GRO_TCP_IPV4;\n@@ -443,6 +497,8 @@ struct gro_ctx {\n \t\tRTE_GRO_TCP_IPV6;\n \tdo_vxlan_tcp6_gro = (gro_ctx->gro_types & RTE_GRO_IPV4_VXLAN_TCP_IPV6)\n \t\t\t\t== RTE_GRO_IPV4_VXLAN_TCP_IPV6;\n+\tdo_vxlan6_tcp4_gro = (gro_ctx->gro_types & RTE_GRO_IPV6_VXLAN_TCP_IPV4)\n+\t\t\t\t== RTE_GRO_IPV6_VXLAN_TCP_IPV4;\n \n \tcurrent_time = rte_rdtsc();\n \n@@ -477,6 +533,11 @@ struct gro_ctx {\n \t\t\tif (gro_vxlan_tcp6_reassemble(pkts[i], vxlan_tcp6_tbl,\n \t\t\t\t\t\tcurrent_time) < 0)\n \t\t\t\tunprocess_pkts[unprocess_num++] = pkts[i];\n+\t\t} else if (IS_IPV6_VXLAN_TCP4_PKT(pkts[i]->packet_type) &&\n+\t\t\t\tdo_vxlan6_tcp4_gro) {\n+\t\t\tif (gro_vxlan6_tcp4_reassemble(pkts[i], vxlan6_tcp4_tbl,\n+\t\t\t\t\t\tcurrent_time) < 0)\n+\t\t\t\tunprocess_pkts[unprocess_num++] = pkts[i];\n \t\t} else\n \t\t\tunprocess_pkts[unprocess_num++] = pkts[i];\n \t}\n@@ -546,6 +607,13 @@ struct gro_ctx {\n \t\tnum += gro_vxlan_tcp6_tbl_timeout_flush(gro_ctx->tbls[\n \t\t\t\tRTE_GRO_IPV4_VXLAN_TCP_IPV6_INDEX],\n \t\t\t\tflush_timestamp, &out[num], left_nb_out);\n+\t\tleft_nb_out = max_nb_out - num;\n+\t}\n+\n+\tif ((gro_types & RTE_GRO_IPV6_VXLAN_TCP_IPV4) && left_nb_out > 0) {\n+\t\tnum += gro_vxlan6_tcp4_tbl_timeout_flush(gro_ctx->tbls[\n+\t\t\t\tRTE_GRO_IPV6_VXLAN_TCP_IPV4_INDEX],\n+\t\t\t\tflush_timestamp, &out[num], left_nb_out);\n \t}\n \n \treturn num;\ndiff --git a/lib/librte_gro/rte_gro.h b/lib/librte_gro/rte_gro.h\nindex 41a2bec..2949980 100644\n--- a/lib/librte_gro/rte_gro.h\n+++ b/lib/librte_gro/rte_gro.h\n@@ -44,6 +44,9 @@\n #define RTE_GRO_IPV4_VXLAN_TCP_IPV6_INDEX 5\n #define RTE_GRO_IPV4_VXLAN_TCP_IPV6 (1ULL << RTE_GRO_IPV4_VXLAN_TCP_IPV6_INDEX)\n /**< IPv4 VxLAN TCP/IPv6 GRO flag. */\n+#define RTE_GRO_IPV6_VXLAN_TCP_IPV4_INDEX 6\n+#define RTE_GRO_IPV6_VXLAN_TCP_IPV4 (1ULL << RTE_GRO_IPV6_VXLAN_TCP_IPV4_INDEX)\n+/**< IPv6 VxLAN TCP/IPv4 GRO flag. */\n \n /**\n  * Structure used to create GRO context objects or used to pass\n",
    "prefixes": [
        "v1",
        "3/8"
    ]
}