get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 25975,
    "url": "https://patches.dpdk.org/api/patches/25975/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1498733940-117800-2-git-send-email-jiayu.hu@intel.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": "<1498733940-117800-2-git-send-email-jiayu.hu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1498733940-117800-2-git-send-email-jiayu.hu@intel.com",
    "date": "2017-06-29T10:58:58",
    "name": "[dpdk-dev,v8,1/3] lib: add Generic Receive Offload API framework",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "79beec6e3170632b6c24122c80fd6b0a9eea1ec3",
    "submitter": {
        "id": 539,
        "url": "https://patches.dpdk.org/api/people/539/?format=api",
        "name": "Hu, Jiayu",
        "email": "jiayu.hu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1498733940-117800-2-git-send-email-jiayu.hu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/25975/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/25975/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 7E70737A6;\n\tThu, 29 Jun 2017 12:57:45 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 0535C374\n\tfor <dev@dpdk.org>; Thu, 29 Jun 2017 12:57:37 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga105.jf.intel.com with ESMTP; 29 Jun 2017 03:57:37 -0700",
            "from dpdk15.sh.intel.com ([10.67.111.77])\n\tby orsmga003.jf.intel.com with ESMTP; 29 Jun 2017 03:57:35 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.40,280,1496127600\"; d=\"scan'208\";a=\"986630231\"",
        "From": "Jiayu Hu <jiayu.hu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "konstantin.ananyev@intel.com, jianfeng.tan@intel.com,\n\tyliu@fridaylinux.org, \n\tstephen@networkplumber.org, jingjing.wu@intel.com, tiwei.bie@intel.com,\n\tlei.a.yao@intel.com, Jiayu Hu <jiayu.hu@intel.com>",
        "Date": "Thu, 29 Jun 2017 18:58:58 +0800",
        "Message-Id": "<1498733940-117800-2-git-send-email-jiayu.hu@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1498733940-117800-1-git-send-email-jiayu.hu@intel.com>",
        "References": "<1498459430-116048-1-git-send-email-jiayu.hu@intel.com>\n\t<1498733940-117800-1-git-send-email-jiayu.hu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v8 1/3] lib: add Generic Receive Offload API\n\tframework",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "Generic Receive Offload (GRO) is a widely used SW-based offloading\ntechnique to reduce per-packet processing overhead. It gains\nperformance by reassembling small packets into large ones. This\npatchset is to support GRO in DPDK. To support GRO, this patch\nimplements a GRO API framework.\n\nTo enable more flexibility to applications, DPDK GRO is implemented as\na user library. Applications explicitly use the GRO library to merge\nsmall packets into large ones. DPDK GRO provides two reassembly modes.\nOne is called lightweight mode, the other is called heavyweight mode.\nIf applications want to merge packets in a simple way and the number\nof packets is relatively small, they can use the lightweight mode.\nIf applications need more fine-grained controls, they can choose the\nheavyweight mode.\n\nrte_gro_reassemble_burst is the main reassembly API which is used in\nlightweight mode and processes N packets at a time. For applications,\nperforming GRO in lightweight mode is simple. They just need to invoke\nrte_gro_reassemble_burst. Applications can get GROed packets as soon as\nrte_gro_reassemble_burst returns.\n\nrte_gro_reassemble is the main reassembly API which is used in\nheavyweight mode and tries to merge N inputted packets with the packets\nin a givn GRO table. For applications, performing GRO in heavyweight\nmode is relatively complicated. Before performing GRO, applications need\nto create a GRO table by rte_gro_tbl_create. Then they can use\nrte_gro_reassemble to merge packets. The GROed packets are in the GRO\ntable. If applications want to get them, applications need to manually\nflush them by flush API.\n\nSigned-off-by: Jiayu Hu <jiayu.hu@intel.com>\n---\n config/common_base                 |   5 ++\n lib/Makefile                       |   2 +\n lib/librte_gro/Makefile            |  50 +++++++++++\n lib/librte_gro/rte_gro.c           | 176 +++++++++++++++++++++++++++++++++++++\n lib/librte_gro/rte_gro.h           | 176 +++++++++++++++++++++++++++++++++++++\n lib/librte_gro/rte_gro_version.map |  12 +++\n mk/rte.app.mk                      |   1 +\n 7 files changed, 422 insertions(+)\n create mode 100644 lib/librte_gro/Makefile\n create mode 100644 lib/librte_gro/rte_gro.c\n create mode 100644 lib/librte_gro/rte_gro.h\n create mode 100644 lib/librte_gro/rte_gro_version.map",
    "diff": "diff --git a/config/common_base b/config/common_base\nindex f6aafd1..167f5ef 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -712,6 +712,11 @@ CONFIG_RTE_LIBRTE_VHOST_DEBUG=n\n CONFIG_RTE_LIBRTE_PMD_VHOST=n\n \n #\n+# Compile GRO library\n+#\n+CONFIG_RTE_LIBRTE_GRO=y\n+\n+#\n #Compile Xen domain0 support\n #\n CONFIG_RTE_LIBRTE_XEN_DOM0=n\ndiff --git a/lib/Makefile b/lib/Makefile\nindex 07e1fd0..ac1c2f6 100644\n--- a/lib/Makefile\n+++ b/lib/Makefile\n@@ -106,6 +106,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_REORDER) += librte_reorder\n DEPDIRS-librte_reorder := librte_eal librte_mempool librte_mbuf\n DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += librte_pdump\n DEPDIRS-librte_pdump := librte_eal librte_mempool librte_mbuf librte_ether\n+DIRS-$(CONFIG_RTE_LIBRTE_GRO) += librte_gro\n+DEPDIRS-librte_gro := librte_eal librte_mbuf librte_ether librte_net\n \n ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)\n DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni\ndiff --git a/lib/librte_gro/Makefile b/lib/librte_gro/Makefile\nnew file mode 100644\nindex 0000000..7e0f128\n--- /dev/null\n+++ b/lib/librte_gro/Makefile\n@@ -0,0 +1,50 @@\n+#   BSD LICENSE\n+#\n+#   Copyright(c) 2017 Intel Corporation. All rights reserved.\n+#   All rights reserved.\n+#\n+#   Redistribution and use in source and binary forms, with or without\n+#   modification, are permitted provided that the following conditions\n+#   are met:\n+#\n+#     * Redistributions of source code must retain the above copyright\n+#       notice, this list of conditions and the following disclaimer.\n+#     * Redistributions in binary form must reproduce the above copyright\n+#       notice, this list of conditions and the following disclaimer in\n+#       the documentation and/or other materials provided with the\n+#       distribution.\n+#     * Neither the name of Intel Corporation nor the names of its\n+#       contributors may be used to endorse or promote products derived\n+#       from this software without specific prior written permission.\n+#\n+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+#   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+include $(RTE_SDK)/mk/rte.vars.mk\n+\n+# library name\n+LIB = librte_gro.a\n+\n+CFLAGS += -O3\n+CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)\n+\n+EXPORT_MAP := rte_gro_version.map\n+\n+LIBABIVER := 1\n+\n+# source files\n+SRCS-$(CONFIG_RTE_LIBRTE_GRO) += rte_gro.c\n+\n+# install this header file\n+SYMLINK-$(CONFIG_RTE_LIBRTE_GRO)-include += rte_gro.h\n+\n+include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/lib/librte_gro/rte_gro.c b/lib/librte_gro/rte_gro.c\nnew file mode 100644\nindex 0000000..7efed18\n--- /dev/null\n+++ b/lib/librte_gro/rte_gro.c\n@@ -0,0 +1,176 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <rte_malloc.h>\n+#include <rte_mbuf.h>\n+\n+#include \"rte_gro.h\"\n+\n+typedef void *(*gro_tbl_create_fn)(uint16_t socket_id,\n+\t\tuint16_t max_flow_num,\n+\t\tuint16_t max_item_per_flow);\n+typedef void (*gro_tbl_destroy_fn)(void *tbl);\n+typedef uint32_t (*gro_tbl_item_num_fn)(void *tbl);\n+\n+static gro_tbl_create_fn tbl_create_functions[RTE_GRO_TYPE_MAX_NUM];\n+static gro_tbl_destroy_fn tbl_destroy_functions[RTE_GRO_TYPE_MAX_NUM];\n+static gro_tbl_item_num_fn tbl_item_num_functions[RTE_GRO_TYPE_MAX_NUM];\n+\n+/**\n+ * GRO table, which is used to merge packets. It keeps many reassembly\n+ * tables of desired GRO types. Applications need to create GRO tables\n+ * before using rte_gro_reassemble to perform GRO.\n+ */\n+struct rte_gro_tbl {\n+\tuint64_t desired_gro_types;\t/**< GRO types to perform */\n+\t/* max TTL measured in nanosecond */\n+\tuint64_t max_timeout_cycles;\n+\t/* max length of merged packet measured in byte */\n+\tuint32_t max_packet_size;\n+\t/* reassebly tables of desired GRO types */\n+\tvoid *tbls[RTE_GRO_TYPE_MAX_NUM];\n+};\n+\n+void *rte_gro_tbl_create(const\n+\t\tconst struct rte_gro_param *param)\n+{\n+\tgro_tbl_create_fn create_tbl_fn;\n+\tgro_tbl_destroy_fn destroy_tbl_fn;\n+\tstruct rte_gro_tbl *gro_tbl;\n+\tuint64_t gro_type_flag = 0;\n+\tuint8_t i, j;\n+\n+\tgro_tbl = rte_zmalloc_socket(__func__,\n+\t\t\tsizeof(struct rte_gro_tbl),\n+\t\t\tRTE_CACHE_LINE_SIZE,\n+\t\t\tparam->socket_id);\n+\tif (gro_tbl == NULL)\n+\t\treturn NULL;\n+\tgro_tbl->max_packet_size = param->max_packet_size;\n+\tgro_tbl->max_timeout_cycles = param->max_timeout_cycles;\n+\tgro_tbl->desired_gro_types = param->desired_gro_types;\n+\n+\tfor (i = 0; i < RTE_GRO_TYPE_MAX_NUM; i++) {\n+\t\tgro_type_flag = 1 << i;\n+\n+\t\tif ((param->desired_gro_types & gro_type_flag) == 0)\n+\t\t\tcontinue;\n+\t\tcreate_tbl_fn = tbl_create_functions[i];\n+\t\tif (create_tbl_fn == NULL)\n+\t\t\tcontinue;\n+\n+\t\tgro_tbl->tbls[i] = create_tbl_fn(\n+\t\t\t\tparam->socket_id,\n+\t\t\t\tparam->max_flow_num,\n+\t\t\t\tparam->max_item_per_flow);\n+\t\tif (gro_tbl->tbls[i] == NULL) {\n+\t\t\t/* destroy all allocated tables */\n+\t\t\tfor (j = 0; j < i; j++) {\n+\t\t\t\tgro_type_flag = 1 << j;\n+\t\t\t\tif ((param->desired_gro_types & gro_type_flag) == 0)\n+\t\t\t\t\tcontinue;\n+\t\t\t\tdestroy_tbl_fn = tbl_destroy_functions[j];\n+\t\t\t\tif (destroy_tbl_fn)\n+\t\t\t\t\tdestroy_tbl_fn(gro_tbl->tbls[j]);\n+\t\t\t}\n+\t\t\trte_free(gro_tbl);\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\treturn gro_tbl;\n+}\n+\n+void rte_gro_tbl_destroy(void *tbl)\n+{\n+\tgro_tbl_destroy_fn destroy_tbl_fn;\n+\tstruct rte_gro_tbl *gro_tbl = (struct rte_gro_tbl *)tbl;\n+\tuint64_t gro_type_flag;\n+\tuint8_t i;\n+\n+\tif (gro_tbl == NULL)\n+\t\treturn;\n+\tfor (i = 0; i < RTE_GRO_TYPE_MAX_NUM; i++) {\n+\t\tgro_type_flag = 1 << i;\n+\t\tif ((gro_tbl->desired_gro_types & gro_type_flag) == 0)\n+\t\t\tcontinue;\n+\t\tdestroy_tbl_fn = tbl_destroy_functions[i];\n+\t\tif (destroy_tbl_fn)\n+\t\t\tdestroy_tbl_fn(gro_tbl->tbls[i]);\n+\t}\n+\trte_free(gro_tbl);\n+}\n+\n+uint16_t\n+rte_gro_reassemble_burst(struct rte_mbuf **pkts __rte_unused,\n+\t\tuint16_t nb_pkts,\n+\t\tconst struct rte_gro_param *param __rte_unused)\n+{\n+\treturn nb_pkts;\n+}\n+\n+uint16_t\n+rte_gro_reassemble(struct rte_mbuf **pkts __rte_unused,\n+\t\tuint16_t nb_pkts,\n+\t\tvoid *tbl __rte_unused)\n+{\n+\treturn nb_pkts;\n+}\n+\n+uint16_t\n+rte_gro_timeout_flush(void *tbl __rte_unused,\n+\t\tuint64_t desired_gro_types __rte_unused,\n+\t\tstruct rte_mbuf **out __rte_unused,\n+\t\tuint16_t max_nb_out __rte_unused)\n+{\n+\treturn 0;\n+}\n+\n+uint64_t rte_gro_tbl_item_num(void *tbl)\n+{\n+\tstruct rte_gro_tbl *gro_tbl = (struct rte_gro_tbl *)tbl;\n+\tgro_tbl_item_num_fn item_num_fn;\n+\tuint64_t item_num = 0;\n+\tuint64_t gro_type_flag;\n+\tuint8_t i;\n+\n+\tfor (i = 0; i < RTE_GRO_TYPE_MAX_NUM; i++) {\n+\t\tgro_type_flag = 1 << i;\n+\t\tif ((gro_tbl->desired_gro_types & gro_type_flag) == 0)\n+\t\t\tcontinue;\n+\n+\t\titem_num_fn = tbl_item_num_functions[i];\n+\t\tif (item_num_fn == NULL)\n+\t\t\tcontinue;\n+\t\titem_num += item_num_fn(gro_tbl->tbls[i]);\n+\t}\n+\treturn item_num;\n+}\ndiff --git a/lib/librte_gro/rte_gro.h b/lib/librte_gro/rte_gro.h\nnew file mode 100644\nindex 0000000..e44a510\n--- /dev/null\n+++ b/lib/librte_gro/rte_gro.h\n@@ -0,0 +1,176 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#ifndef _RTE_GRO_H_\n+#define _RTE_GRO_H_\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * the max packets number that rte_gro_reassemble_burst can\n+ * process in each invocation.\n+ */\n+#define RTE_GRO_MAX_BURST_ITEM_NUM 1024UL\n+\n+/* max number of supported GRO types */\n+#define RTE_GRO_TYPE_MAX_NUM 64\n+#define RTE_GRO_TYPE_SUPPORT_NUM 0\t/**< current supported GRO num */\n+\n+\n+struct rte_gro_param {\n+\tuint64_t desired_gro_types;\t/**< desired GRO types */\n+\tuint32_t max_packet_size;\t/**< max length of merged packets */\n+\tuint16_t max_flow_num;\t/**< max flow number */\n+\tuint16_t max_item_per_flow;\t/**< max packet number per flow */\n+\n+\t/* socket index where the Ethernet port connects to */\n+\tuint16_t socket_id;\n+\t/* max TTL for a packet in the GRO table, measured in nanosecond */\n+\tuint64_t max_timeout_cycles;\n+};\n+\n+/**\n+ * This function create a GRO table, which is used to merge packets in\n+ * rte_gro_reassemble.\n+ *\n+ * @param param\n+ *  applications use it to pass needed parameters to create a GRO table.\n+ * @return\n+ *  if create successfully, return a pointer which points to the GRO\n+ *  table. Otherwise, return NULL.\n+ */\n+void *rte_gro_tbl_create(\n+\t\tconst struct rte_gro_param *param);\n+/**\n+ * This function destroys a GRO table.\n+ */\n+void rte_gro_tbl_destroy(void *tbl);\n+\n+/**\n+ * This is one of the main reassembly APIs, which merges numbers of\n+ * packets at a time. It assumes that all inputted packets are with\n+ * correct checksums. That is, applications should guarantee all\n+ * inputted packets are correct. Besides, it doesn't re-calculate\n+ * checksums for merged packets. If inputted packets are IP fragmented,\n+ * this function assumes them are complete (i.e. with L4 header). After\n+ * finishing processing, it returns all GROed packets to applications\n+ * immediately.\n+ *\n+ * @param pkts\n+ *  a pointer array which points to the packets to reassemble. Besides,\n+ *  it keeps packet addresses for GROed packets.\n+ * @param nb_pkts\n+ *  the number of packets to reassemble.\n+ * @param param\n+ *  applications use it to tell rte_gro_reassemble_burst what rules\n+ *  are demanded.\n+ * @return\n+ *  the number of packets after been GROed.\n+ */\n+uint16_t rte_gro_reassemble_burst(struct rte_mbuf **pkts,\n+\t\tuint16_t nb_pkts,\n+\t\tconst struct rte_gro_param *param);\n+\n+/**\n+ * Reassembly function, which tries to merge inputted packets with\n+ * the packets in a given GRO table. This function assumes all inputted\n+ * packet is with correct checksums. And it won't update checksums if\n+ * two packets are merged. Besides, if inputted packets are IP\n+ * fragmented, this function assumes they are complete packets (i.e.\n+ * with L4 header).\n+ *\n+ * If the inputted packets don't have data or are with unsupported GRO\n+ * types, they won't be processed and are returned to applications.\n+ * Otherwise, the inputted packets are either merged or inserted into\n+ * the table. If applications want get packets in the table, they need\n+ * to call flush API.\n+ *\n+ * @param pkts\n+ *  packet to reassemble. Besides, after this function finishes, it\n+ *  keeps the unprocessed packets (i.e. without data or unsupported\n+ *  GRO types).\n+ * @param nb_pkts\n+ *  the number of packets to reassemble.\n+ * @param tbl\n+ *  a pointer points to a GRO table.\n+ * @return\n+ *  return the number of unprocessed packets (i.e. without data or\n+ *  unsupported GRO types). If all packets are processed (merged or\n+ *  inserted into the table), return 0.\n+ */\n+uint16_t rte_gro_reassemble(struct rte_mbuf **pkts,\n+\t\tuint16_t nb_pkts,\n+\t\tvoid *tbl);\n+\n+/**\n+ * This function flushes the timeout packets from reassembly tables of\n+ * desired GRO types. The max number of flushed timeout packets is the\n+ * element number of the array which is used to keep the flushed packets.\n+ *\n+ * Besides, this function won't re-calculate checksums for merged\n+ * packets in the tables. That is, the returned packets may be with\n+ * wrong checksums.\n+ *\n+ * @param tbl\n+ *  a pointer points to a GRO table object.\n+ * @param desired_gro_types\n+ * rte_gro_timeout_flush only processes packets which belong to the\n+ * GRO types specified by desired_gro_types.\n+ * @param out\n+ *  a pointer array that is used to keep flushed timeout packets.\n+ * @param nb_out\n+ *  the element number of out. It's also the max number of timeout\n+ *  packets that can be flushed finally.\n+ * @return\n+ *  the number of flushed packets. If no packets are flushed, return 0.\n+ */\n+uint16_t rte_gro_timeout_flush(void *tbl,\n+\t\tuint64_t desired_gro_types,\n+\t\tstruct rte_mbuf **out,\n+\t\tuint16_t max_nb_out);\n+\n+/**\n+ * This function returns the number of packets in a given GRO table.\n+ * @param tbl\n+ *  pointer points to a GRO table.\n+ * @return\n+ *  the number of packets in the table.\n+ */\n+uint64_t rte_gro_tbl_item_num(void *tbl);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif\ndiff --git a/lib/librte_gro/rte_gro_version.map b/lib/librte_gro/rte_gro_version.map\nnew file mode 100644\nindex 0000000..358fb9d\n--- /dev/null\n+++ b/lib/librte_gro/rte_gro_version.map\n@@ -0,0 +1,12 @@\n+DPDK_17.08 {\n+\tglobal:\n+\n+\trte_gro_tbl_create;\n+\trte_gro_tbl_destroy;\n+\trte_gro_reassemble_burst;\n+\trte_gro_reassemble;\n+\trte_gro_timeout_flush;\n+\trte_gro_tbl_item_num;\n+\n+\tlocal: *;\n+};\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex bcaf1b3..fc3776d 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -98,6 +98,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)           += -lrte_ring\n _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal\n _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline\n _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder\n+_LDLIBS-$(CONFIG_RTE_LIBRTE_GRO)        \t+= -lrte_gro\n \n ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)\n _LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni\n",
    "prefixes": [
        "dpdk-dev",
        "v8",
        "1/3"
    ]
}