get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68153,
    "url": "https://patches.dpdk.org/api/patches/68153/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200411000945.15311-3-jia.guo@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": "<20200411000945.15311-3-jia.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200411000945.15311-3-jia.guo@intel.com",
    "date": "2020-04-11T00:09:43",
    "name": "[v3,2/4] net/iavf: add RSS configuration for VFs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f83c16e3daac04ec2aabfece13163556e5a96c28",
    "submitter": {
        "id": 507,
        "url": "https://patches.dpdk.org/api/people/507/?format=api",
        "name": "Guo, Jia",
        "email": "jia.guo@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "https://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200411000945.15311-3-jia.guo@intel.com/mbox/",
    "series": [
        {
            "id": 9306,
            "url": "https://patches.dpdk.org/api/series/9306/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9306",
            "date": "2020-04-11T00:09:41",
            "name": "add RSS configuration for iavf",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/9306/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/68153/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/68153/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 7B98AA059F;\n\tFri, 10 Apr 2020 17:13:50 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A83A91D516;\n\tFri, 10 Apr 2020 17:13:40 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id 7243B1C29C\n for <dev@dpdk.org>; Fri, 10 Apr 2020 17:13:38 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Apr 2020 08:13:36 -0700",
            "from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128])\n by fmsmga005.fm.intel.com with ESMTP; 10 Apr 2020 08:13:33 -0700"
        ],
        "IronPort-SDR": [
            "\n ITccgZfoWvJJ/jQR1ApySs5TF3gF/4TjSWCTcVnnXXVGV9mEYnBVbSo7ESsux4QV+fJjEuJF9D\n v+6/wafJcP+A==",
            "\n iG97KUH1S7yK0ea1jRLLQKxp0/wRyR40O8GujmNDJqrOkJX050BoCzrQh3jTUr3WgDz7R/BrK5\n VaslyitwAz/g=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,367,1580803200\"; d=\"scan'208\";a=\"452407765\"",
        "From": "Jeff Guo <jia.guo@intel.com>",
        "To": "xiaolong.ye@intel.com,\n\tqi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, jingjing.wu@intel.com, yahui.cao@intel.com,\n simei.su@intel.com, jia.guo@intel.com",
        "Date": "Fri, 10 Apr 2020 20:09:43 -0400",
        "Message-Id": "<20200411000945.15311-3-jia.guo@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200411000945.15311-1-jia.guo@intel.com>",
        "References": "<20200318170401.7938-5-jia.guo@intel.com>\n <20200411000945.15311-1-jia.guo@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [dpdk-dev v3 2/4] net/iavf: add RSS configuration for VFs",
        "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": "The VF must be capable of configuring RSS. Add a virtchnl handler to parse\na specific RSS configuration, and process the configuration for VFs, such\nas add or delete a RSS rule.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\n---\nv3->v2:\n1.add doc in release note\n2.refine some naming base on virtchnl definition.\n---\n doc/guides/rel_notes/release_20_05.rst |    2 +\n drivers/net/iavf/Makefile              |    1 +\n drivers/net/iavf/iavf.h                |    2 +\n drivers/net/iavf/iavf_hash.c           | 1108 ++++++++++++++++++++++++\n drivers/net/iavf/iavf_vchnl.c          |   33 +-\n drivers/net/iavf/meson.build           |    1 +\n 6 files changed, 1142 insertions(+), 5 deletions(-)\n create mode 100644 drivers/net/iavf/iavf_hash.c",
    "diff": "diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst\nindex 4b81893ff..b5962d8e4 100644\n--- a/doc/guides/rel_notes/release_20_05.rst\n+++ b/doc/guides/rel_notes/release_20_05.rst\n@@ -98,6 +98,8 @@ New Features\n   Update the Intel iavf driver with new features and improvements, including:\n \n   * Added generic filter support.\n+  * Added advanced RSS configuration for VFs.\n+\n \n Removed Items\n -------------\ndiff --git a/drivers/net/iavf/Makefile b/drivers/net/iavf/Makefile\nindex 1bf0f26b5..7b0093a3e 100644\n--- a/drivers/net/iavf/Makefile\n+++ b/drivers/net/iavf/Makefile\n@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c\n SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c\n SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c\n SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c\n+SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c\n ifeq ($(CONFIG_RTE_ARCH_X86), y)\n SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c\n endif\ndiff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h\nindex 78bdaff20..d813296d3 100644\n--- a/drivers/net/iavf/iavf.h\n+++ b/drivers/net/iavf/iavf.h\n@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,\n int iavf_add_del_eth_addr(struct iavf_adapter *adapter,\n \t\t\t struct rte_ether_addr *addr, bool add);\n int iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add);\n+int iavf_add_del_rss_cfg(struct iavf_adapter *adapter,\n+\t\t\t struct virtchnl_rss_cfg *rss_cfg, bool add);\n #endif /* _IAVF_ETHDEV_H_ */\ndiff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c\nnew file mode 100644\nindex 000000000..f831738cc\n--- /dev/null\n+++ b/drivers/net/iavf/iavf_hash.c\n@@ -0,0 +1,1108 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Intel Corporation\n+ */\n+\n+#include <sys/queue.h>\n+#include <stdio.h>\n+#include <errno.h>\n+#include <stdint.h>\n+#include <string.h>\n+#include <unistd.h>\n+#include <stdarg.h>\n+\n+#include <rte_debug.h>\n+#include <rte_ether.h>\n+#include <rte_ethdev_driver.h>\n+#include <rte_log.h>\n+#include <rte_malloc.h>\n+#include <rte_eth_ctrl.h>\n+#include <rte_tailq.h>\n+#include <rte_flow_driver.h>\n+\n+#include \"iavf_log.h\"\n+#include \"iavf.h\"\n+#include \"iavf_generic_flow.h\"\n+\n+struct rss_type_match_hdr {\n+\tuint32_t hdr_mask;\n+\tuint64_t eth_rss_hint;\n+};\n+\n+struct iavf_hash_match_type {\n+\tuint64_t hash_type;\n+\tstruct virtchnl_proto_hdrs *proto_hdrs;\n+};\n+\n+struct iavf_rss_meta {\n+\tstruct virtchnl_proto_hdrs *proto_hdrs;\n+\tuint32_t hash_function;\n+};\n+\n+struct iavf_hash_flow_cfg {\n+\tbool simple_xor;\n+\tstruct virtchnl_rss_cfg *rss_cfg;\n+};\n+\n+static int\n+iavf_hash_init(struct iavf_adapter *ad);\n+static int\n+iavf_hash_create(struct iavf_adapter *ad, struct rte_flow *flow, void *meta,\n+\t\t struct rte_flow_error *error);\n+static int\n+iavf_hash_destroy(struct iavf_adapter *ad, struct rte_flow *flow,\n+\t\t  struct rte_flow_error *error);\n+static void\n+iavf_hash_uninit(struct iavf_adapter *ad);\n+static void\n+iavf_hash_free(struct rte_flow *flow);\n+static int\n+iavf_hash_parse_pattern_action(struct iavf_adapter *ad,\n+\t\t\t       struct iavf_pattern_match_item *array,\n+\t\t\t       uint32_t array_len,\n+\t\t\t       const struct rte_flow_item pattern[],\n+\t\t\t       const struct rte_flow_action actions[],\n+\t\t\t       void **meta,\n+\t\t\t       struct rte_flow_error *error);\n+\n+/* Generate flow hash field from flow field type(s) */\n+#define IAVF_FLOW_HASH_ETH\t\\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_ETH_DST) | \\\n+\t BIT_ULL(VIRTCHNL_PROTO_HDR_ETH_SRC))\n+#define IAVF_FLOW_HASH_IPV4\t\\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \\\n+\t BIT_ULL(VIRTCHNL_PROTO_HDR_IPV4_DST))\n+#define IAVF_FLOW_HASH_IPV6\t\\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \\\n+\t BIT_ULL(VIRTCHNL_PROTO_HDR_IPV6_DST))\n+#define IAVF_FLOW_HASH_TCP_PORT\t\\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_TCP_SRC_PORT) | \\\n+\t BIT_ULL(VIRTCHNL_PROTO_HDR_TCP_DST_PORT))\n+#define IAVF_FLOW_HASH_UDP_PORT\t\\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT) | \\\n+\t BIT_ULL(VIRTCHNL_PROTO_HDR_UDP_DST_PORT))\n+#define IAVF_FLOW_HASH_SCTP_PORT\t\\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT) | \\\n+\t BIT_ULL(VIRTCHNL_PROTO_HDR_SCTP_DST_PORT))\n+\n+#define IAVF_HASH_INVALID\t0\n+#define IAVF_HASH_TCP_IPV4\t(IAVF_FLOW_HASH_IPV4 | IAVF_FLOW_HASH_TCP_PORT)\n+#define IAVF_HASH_TCP_IPV6\t(IAVF_FLOW_HASH_IPV6 | IAVF_FLOW_HASH_TCP_PORT)\n+#define IAVF_HASH_UDP_IPV4\t(IAVF_FLOW_HASH_IPV4 | IAVF_FLOW_HASH_UDP_PORT)\n+#define IAVF_HASH_UDP_IPV6\t(IAVF_FLOW_HASH_IPV6 | IAVF_FLOW_HASH_UDP_PORT)\n+#define IAVF_HASH_SCTP_IPV4\t(IAVF_FLOW_HASH_IPV4 | IAVF_FLOW_HASH_SCTP_PORT)\n+#define IAVF_HASH_SCTP_IPV6\t(IAVF_FLOW_HASH_IPV6 | IAVF_FLOW_HASH_SCTP_PORT)\n+\n+#define IAVF_FLOW_HASH_GTP_U_TEID \\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_GTPU_IP_TEID))\n+\n+#define IAVF_FLOW_HASH_GTP_U_IPV4_TEID \\\n+\t(IAVF_FLOW_HASH_IPV4 | IAVF_FLOW_HASH_GTP_U_TEID)\n+#define IAVF_FLOW_HASH_GTP_U_IPV6_TEID \\\n+\t(IAVF_FLOW_HASH_IPV6 | IAVF_FLOW_HASH_GTP_U_TEID)\n+\n+#define IAVF_FLOW_HASH_GTP_U_EH_TEID \\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_GTPU_IP_TEID))\n+\n+#define IAVF_FLOW_HASH_GTP_U_EH_QFI \\\n+\t(BIT_ULL(VIRTCHNL_PROTO_HDR_GTPU_EH_QFI))\n+\n+#define IAVF_FLOW_HASH_GTP_U_IPV4_EH \\\n+\t(IAVF_FLOW_HASH_IPV4 | IAVF_FLOW_HASH_GTP_U_EH_TEID | \\\n+\t IAVF_FLOW_HASH_GTP_U_EH_QFI)\n+#define IAVF_FLOW_HASH_GTP_U_IPV6_EH \\\n+\t(IAVF_FLOW_HASH_IPV6 | IAVF_FLOW_HASH_GTP_U_EH_TEID | \\\n+\t IAVF_FLOW_HASH_GTP_U_EH_QFI)\n+\n+/* The first member is protocol header, the second member is ETH_RSS_*. */\n+struct rss_type_match_hdr iavf_hint_empty = {\n+\tVIRTCHNL_PROTO_HDR_NONE, 0};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4 = {\n+\tVIRTCHNL_PROTO_HDR_IPV4, ETH_RSS_IPV4};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_udp = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_UDP,\n+\tETH_RSS_NONFRAG_IPV4_UDP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_tcp = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_TCP,\n+\tETH_RSS_NONFRAG_IPV4_TCP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_sctp = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_SCTP,\n+\tETH_RSS_NONFRAG_IPV4_SCTP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_gtpu_eh = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_UDP |\n+\tVIRTCHNL_PROTO_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_esp = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_ESP, ETH_RSS_IPV4};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_ah = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_AH, ETH_RSS_IPV4};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_l2tpv3 = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_L2TPV3, ETH_RSS_IPV4};\n+struct rss_type_match_hdr iavf_hint_eth_ipv4_pfcp = {\n+\tVIRTCHNL_PROTO_HDR_IPV4 | VIRTCHNL_PROTO_HDR_UDP |\n+\tVIRTCHNL_PROTO_HDR_PFCP, ETH_RSS_NONFRAG_IPV4_UDP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6 = {\n+\tVIRTCHNL_PROTO_HDR_IPV6, ETH_RSS_IPV6};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6_udp = {\n+\tVIRTCHNL_PROTO_HDR_IPV6 | VIRTCHNL_PROTO_HDR_UDP,\n+\tETH_RSS_NONFRAG_IPV6_UDP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6_tcp = {\n+\tVIRTCHNL_PROTO_HDR_IPV6 | VIRTCHNL_PROTO_HDR_TCP,\n+\tETH_RSS_NONFRAG_IPV6_TCP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6_sctp = {\n+\tVIRTCHNL_PROTO_HDR_IPV6 | VIRTCHNL_PROTO_HDR_SCTP,\n+\tETH_RSS_NONFRAG_IPV6_SCTP};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6_esp = {\n+\tVIRTCHNL_PROTO_HDR_IPV6 | VIRTCHNL_PROTO_HDR_ESP, ETH_RSS_IPV6};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6_ah = {\n+\tVIRTCHNL_PROTO_HDR_IPV6 | VIRTCHNL_PROTO_HDR_AH, ETH_RSS_IPV6};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6_l2tpv3 = {\n+\tVIRTCHNL_PROTO_HDR_IPV6 | VIRTCHNL_PROTO_HDR_L2TPV3, ETH_RSS_IPV6};\n+struct rss_type_match_hdr iavf_hint_eth_ipv6_pfcp = {\n+\tVIRTCHNL_PROTO_HDR_IPV6 | VIRTCHNL_PROTO_HDR_UDP |\n+\tVIRTCHNL_PROTO_HDR_PFCP, ETH_RSS_NONFRAG_IPV6_UDP};\n+\n+/* Supported pattern for hash. */\n+static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {\n+\t{iavf_pattern_eth_ipv4, IAVF_INSET_NONE, &iavf_hint_eth_ipv4},\n+\t{iavf_pattern_eth_ipv4_udp, IAVF_INSET_NONE, &iavf_hint_eth_ipv4_udp},\n+\t{iavf_pattern_eth_ipv4_tcp, IAVF_INSET_NONE, &iavf_hint_eth_ipv4_tcp},\n+\t{iavf_pattern_eth_ipv4_sctp, IAVF_INSET_NONE, &iavf_hint_eth_ipv4_sctp},\n+\t{iavf_pattern_eth_ipv6, IAVF_INSET_NONE, &iavf_hint_eth_ipv6},\n+\t{iavf_pattern_eth_ipv4_gtpu_eh_ipv4,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv4_gtpu_eh},\n+\t{iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv4_gtpu_eh},\n+\t{iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv4_gtpu_eh},\n+\t{iavf_pattern_eth_ipv4_esp,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv4_esp},\n+\t{iavf_pattern_eth_ipv4_ah,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv4_ah},\n+\t{iavf_pattern_eth_ipv4_l2tpv3,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv4_l2tpv3},\n+\t{iavf_pattern_eth_ipv4_pfcp,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv4_pfcp},\n+\t{iavf_pattern_eth_ipv6_udp, IAVF_INSET_NONE, &iavf_hint_eth_ipv6_udp},\n+\t{iavf_pattern_eth_ipv6_tcp, IAVF_INSET_NONE, &iavf_hint_eth_ipv6_tcp},\n+\t{iavf_pattern_eth_ipv6_sctp, IAVF_INSET_NONE, &iavf_hint_eth_ipv6_sctp},\n+\t{iavf_pattern_eth_ipv6_esp,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv6_esp},\n+\t{iavf_pattern_eth_ipv6_ah,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv6_ah},\n+\t{iavf_pattern_eth_ipv6_l2tpv3,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv6_l2tpv3},\n+\t{iavf_pattern_eth_ipv6_pfcp,\n+\t\t\t\tIAVF_INSET_NONE, &iavf_hint_eth_ipv6_pfcp},\n+\t{iavf_pattern_empty, IAVF_INSET_NONE, &iavf_hint_empty},\n+};\n+\n+#define\tGTP_EH_PDU_LINK_UP\t\t1\n+#define\tGTP_EH_PDU_LINK_DWN\t\t0\n+\n+#define TUNNEL_LEVEL_OUTER\t\t0\n+#define TUNNEL_LEVEL_FIRST_INNER\t1\n+\n+#define PROTO_COUNT_ONE\t\t\t1\n+#define PROTO_COUNT_TWO\t\t\t2\n+#define PROTO_COUNT_THREE\t\t3\n+\n+#define BUFF_NOUSED\t\t\t0\n+#define FIELD_FOR_PROTO_ONLY\t\t0\n+\n+#define proto_hint_eth_src { \\\n+\tVIRTCHNL_PROTO_HDR_ETH, VIRTCHNL_PROTO_HDR_ETH_SRC, {BUFF_NOUSED } }\n+\n+#define proto_hint_eth_dst { \\\n+\tVIRTCHNL_PROTO_HDR_ETH, VIRTCHNL_PROTO_HDR_ETH_DST, {BUFF_NOUSED } }\n+\n+#define proto_hint_svlan { \\\n+\tVIRTCHNL_PROTO_HDR_S_VLAN, VIRTCHNL_PROTO_HDR_S_VLAN_ID, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_cvlan { \\\n+\tVIRTCHNL_PROTO_HDR_C_VLAN, VIRTCHNL_PROTO_HDR_C_VLAN_ID, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_ipv4_src { \\\n+\tVIRTCHNL_PROTO_HDR_IPV4, VIRTCHNL_PROTO_HDR_IPV4_SRC, {BUFF_NOUSED } }\n+\n+#define proto_hint_ipv4_dst { \\\n+\tVIRTCHNL_PROTO_HDR_IPV4, VIRTCHNL_PROTO_HDR_IPV4_DST, {BUFF_NOUSED } }\n+\n+#define proto_hint_ipv4_only { \\\n+\tVIRTCHNL_PROTO_HDR_IPV4, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n+#define proto_hint_ipv4 { \\\n+\tVIRTCHNL_PROTO_HDR_IPV4, \\\n+\tVIRTCHNL_PROTO_HDR_IPV4_SRC | VIRTCHNL_PROTO_HDR_IPV4_DST, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_udp_src_port { \\\n+\tVIRTCHNL_PROTO_HDR_UDP, VIRTCHNL_PROTO_HDR_UDP_SRC_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_udp_dst_port { \\\n+\tVIRTCHNL_PROTO_HDR_UDP, VIRTCHNL_PROTO_HDR_UDP_DST_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_udp_only { \\\n+\tVIRTCHNL_PROTO_HDR_UDP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n+#define proto_hint_udp { \\\n+\tVIRTCHNL_PROTO_HDR_UDP, \\\n+\tVIRTCHNL_PROTO_HDR_UDP_SRC_PORT | VIRTCHNL_PROTO_HDR_UDP_DST_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_tcp_src_port { \\\n+\tVIRTCHNL_PROTO_HDR_TCP, VIRTCHNL_PROTO_HDR_TCP_SRC_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_tcp_dst_port { \\\n+\tVIRTCHNL_PROTO_HDR_TCP, VIRTCHNL_PROTO_HDR_TCP_DST_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_tcp_only { \\\n+\tVIRTCHNL_PROTO_HDR_TCP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n+#define proto_hint_tcp { \\\n+\tVIRTCHNL_PROTO_HDR_TCP, \\\n+\tVIRTCHNL_PROTO_HDR_TCP_SRC_PORT | VIRTCHNL_PROTO_HDR_TCP_DST_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_sctp_src_port { \\\n+\tVIRTCHNL_PROTO_HDR_SCTP, VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_sctp_dst_port { \\\n+\tVIRTCHNL_PROTO_HDR_SCTP, VIRTCHNL_PROTO_HDR_SCTP_DST_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_sctp_only { \\\n+\tVIRTCHNL_PROTO_HDR_SCTP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n+#define proto_hint_sctp { \\\n+\tVIRTCHNL_PROTO_HDR_SCTP, \\\n+\tVIRTCHNL_PROTO_HDR_SCTP_SRC_PORT | VIRTCHNL_PROTO_HDR_SCTP_DST_PORT, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_ipv6_src { \\\n+\tVIRTCHNL_PROTO_HDR_IPV6, VIRTCHNL_PROTO_HDR_IPV6_SRC, {BUFF_NOUSED } }\n+\n+#define proto_hint_ipv6_dst { \\\n+\tVIRTCHNL_PROTO_HDR_IPV6, VIRTCHNL_PROTO_HDR_IPV6_DST, {BUFF_NOUSED } }\n+\n+#define proto_hint_ipv6_only { \\\n+\tVIRTCHNL_PROTO_HDR_IPV6, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n+#define proto_hint_ipv6 { \\\n+\tVIRTCHNL_PROTO_HDR_IPV6, \\\n+\tVIRTCHNL_PROTO_HDR_IPV6_SRC | VIRTCHNL_PROTO_HDR_IPV6_DST, \\\n+\t{BUFF_NOUSED } }\n+\n+#define proto_hint_gtpu_up_only { \\\n+\tVIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP, \\\n+\tFIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n+#define proto_hint_gtpu_dwn_only { \\\n+\tVIRTCHNL_PROTO_HDR_GTPU_EH_PDU_DWN, \\\n+\tFIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n+#define proto_hint_esp { \\\n+\tVIRTCHNL_PROTO_HDR_ESP, \\\n+\tVIRTCHNL_PROTO_HDR_ESP_SPI, {BUFF_NOUSED } }\n+\n+#define proto_hint_ah { \\\n+\tVIRTCHNL_PROTO_HDR_AH, \\\n+\tVIRTCHNL_PROTO_HDR_AH_SPI, {BUFF_NOUSED } }\n+\n+#define proto_hint_l2tpv3 { \\\n+\tVIRTCHNL_PROTO_HDR_L2TPV3, \\\n+\tVIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID, {BUFF_NOUSED } }\n+\n+#define proto_hint_pfcp { \\\n+\tVIRTCHNL_PROTO_HDR_PFCP, VIRTCHNL_PROTO_HDR_PFCP_SEID, {BUFF_NOUSED } }\n+\n+struct virtchnl_proto_hdrs hdrs_hint_eth_src = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_eth_src }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_eth_dst = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_eth_dst }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_svlan = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_svlan }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_cvlan = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_cvlan }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4_src }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4_dst }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_up = {\n+\tTUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only,\n+\tproto_hint_ipv4_src }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_dwn = {\n+\tTUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only,\n+\tproto_hint_ipv4_dst }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_esp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_esp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_ah = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_ah }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_l2tpv3 = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_l2tpv3 }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_pfcp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_pfcp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4 = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4 }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,\n+\tproto_hint_udp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,\n+\tproto_hint_udp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,\n+\tproto_hint_udp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,\n+\tproto_hint_udp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_udp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_udp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4,\n+\tproto_hint_udp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,\n+\tproto_hint_tcp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,\n+\tproto_hint_tcp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,\n+\tproto_hint_tcp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,\n+\tproto_hint_tcp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_tcp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_tcp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4,\n+\tproto_hint_tcp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_sctp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,\n+\tproto_hint_sctp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_sctp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,\n+\tproto_hint_sctp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_sctp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,\n+\tproto_hint_sctp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_sctp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,\n+\tproto_hint_sctp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_sctp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_sctp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_sctp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,\n+\tproto_hint_sctp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_sctp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4,\n+\tproto_hint_sctp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_src }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_dst }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_esp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,\n+\tproto_hint_esp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_ah = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,\n+\tproto_hint_ah }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_l2tpv3 = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,\n+\tproto_hint_l2tpv3 }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_pfcp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,\n+\tproto_hint_pfcp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6 = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6 }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_udp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,\n+\tproto_hint_udp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_udp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,\n+\tproto_hint_udp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_udp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,\n+\tproto_hint_udp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_udp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,\n+\tproto_hint_udp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only,\n+\tproto_hint_udp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only,\n+\tproto_hint_udp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6,\n+\tproto_hint_udp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_tcp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,\n+\tproto_hint_tcp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_tcp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,\n+\tproto_hint_tcp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_tcp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,\n+\tproto_hint_tcp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_tcp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,\n+\tproto_hint_tcp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only,\n+\tproto_hint_tcp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only,\n+\tproto_hint_tcp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6,\n+\tproto_hint_tcp }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_sctp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,\n+\tproto_hint_sctp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_sctp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,\n+\tproto_hint_sctp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_sctp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,\n+\tproto_hint_sctp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_sctp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,\n+\tproto_hint_sctp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp_src_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only,\n+\tproto_hint_sctp_src_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp_dst_port = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only,\n+\tproto_hint_sctp_dst_port }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp = {\n+\tTUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6,\n+\tproto_hint_sctp }\n+};\n+\n+/**\n+ * The first member is hash type,\n+ * the second member is virtchnl protocol hdrs.\n+ */\n+struct iavf_hash_match_type iavf_hash_type_list[] = {\n+\t/* IPV4 */\n+\t{ETH_RSS_IPV4 | ETH_RSS_ETH_SRC_ONLY,\t&hdrs_hint_eth_src},\n+\t{ETH_RSS_IPV4 | ETH_RSS_ETH_DST_ONLY,\t&hdrs_hint_eth_dst},\n+\t{ETH_RSS_IPV4 | ETH_RSS_S_VLAN,\t\t&hdrs_hint_svlan},\n+\t{ETH_RSS_IPV4 | ETH_RSS_C_VLAN,\t\t&hdrs_hint_cvlan},\n+\t{ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY,\t&hdrs_hint_ipv4_src},\n+\t{ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY,\t&hdrs_hint_ipv4_dst},\n+\t{ETH_RSS_IPV4 | ETH_RSS_ESP,\t\t&hdrs_hint_ipv4_esp},\n+\t{ETH_RSS_IPV4 | ETH_RSS_AH,\t\t&hdrs_hint_ipv4_ah},\n+\t{ETH_RSS_IPV4 | ETH_RSS_L2TPV3,\t\t&hdrs_hint_ipv4_l2tpv3},\n+\t{ETH_RSS_IPV4,\t\t\t\t&hdrs_hint_ipv4},\n+\t/* IPV4 UDP */\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src_udp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src_udp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU,\n+\t\t\t\t\t&hdrs_hint_ipv4_src_gtpu_up},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst_udp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst_udp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst_gtpu_dwn},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_udp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_udp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_PFCP,\n+\t\t\t\t\t&hdrs_hint_ipv4_pfcp},\n+\t{ETH_RSS_NONFRAG_IPV4_UDP,\t&hdrs_hint_ipv4_udp},\n+\t/* IPV4 TCP */\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src_tcp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src_tcp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst_tcp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst_tcp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_tcp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_tcp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_TCP,\t&hdrs_hint_ipv4_tcp},\n+\t/* IPV4 SCTP */\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src_sctp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src_sctp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_src},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst_sctp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst_sctp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_dst},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_sctp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv4_sctp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV4_SCTP,\t&hdrs_hint_ipv4_sctp},\n+\t/* IPV6 */\n+\t{ETH_RSS_IPV6 | ETH_RSS_ETH_SRC_ONLY,\t&hdrs_hint_eth_src},\n+\t{ETH_RSS_IPV6 | ETH_RSS_ETH_DST_ONLY,\t&hdrs_hint_eth_dst},\n+\t{ETH_RSS_IPV6 | ETH_RSS_S_VLAN,\t\t&hdrs_hint_svlan},\n+\t{ETH_RSS_IPV6 | ETH_RSS_C_VLAN,\t\t&hdrs_hint_cvlan},\n+\t{ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY,\t&hdrs_hint_ipv6_src},\n+\t{ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY,\t&hdrs_hint_ipv6_dst},\n+\t{ETH_RSS_IPV6 | ETH_RSS_ESP,\t\t&hdrs_hint_ipv6_esp},\n+\t{ETH_RSS_IPV6 | ETH_RSS_AH,\t\t&hdrs_hint_ipv6_ah},\n+\t{ETH_RSS_IPV6 | ETH_RSS_L2TPV3,\t\t&hdrs_hint_ipv6_l2tpv3},\n+\t{ETH_RSS_IPV6,\t\t\t\t&hdrs_hint_ipv6},\n+\t/* IPV6 UDP */\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src_udp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src_udp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst_udp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst_udp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_udp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_udp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_PFCP,\n+\t\t\t\t\t&hdrs_hint_ipv6_pfcp},\n+\t{ETH_RSS_NONFRAG_IPV6_UDP,\t&hdrs_hint_ipv6_udp},\n+\t/* IPV6 TCP */\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src_tcp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src_tcp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst_tcp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst_tcp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_tcp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_tcp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_TCP,\t&hdrs_hint_ipv6_tcp},\n+\t/* IPV6 SCTP */\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src_sctp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src_sctp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_src},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst_sctp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst_sctp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_dst},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_sctp_src_port},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY,\n+\t\t\t\t\t&hdrs_hint_ipv6_sctp_dst_port},\n+\t{ETH_RSS_NONFRAG_IPV6_SCTP,\t&hdrs_hint_ipv6_sctp},\n+};\n+\n+static struct iavf_flow_engine iavf_hash_engine = {\n+\t.init = iavf_hash_init,\n+\t.create = iavf_hash_create,\n+\t.destroy = iavf_hash_destroy,\n+\t.uninit = iavf_hash_uninit,\n+\t.free = iavf_hash_free,\n+\t.type = IAVF_FLOW_ENGINE_HASH,\n+};\n+\n+/* Register parser for comms package. */\n+static struct iavf_flow_parser iavf_hash_parser = {\n+\t.engine = &iavf_hash_engine,\n+\t.array = iavf_hash_pattern_list,\n+\t.array_len = RTE_DIM(iavf_hash_pattern_list),\n+\t.parse_pattern_action = iavf_hash_parse_pattern_action,\n+\t.stage = IAVF_FLOW_STAGE_RSS,\n+};\n+\n+RTE_INIT(iavf_hash_engine_init)\n+{\n+\tstruct iavf_flow_engine *engine = &iavf_hash_engine;\n+\n+\tiavf_register_flow_engine(engine);\n+}\n+\n+static int\n+iavf_hash_init(struct iavf_adapter *ad)\n+{\n+\tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);\n+\tstruct iavf_flow_parser *parser;\n+\n+\tif (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF))\n+\t\treturn -ENOTSUP;\n+\n+\tparser = &iavf_hash_parser;\n+\n+\treturn iavf_register_parser(parser, ad);\n+}\n+\n+static int\n+iavf_hash_check_inset(const struct rte_flow_item pattern[],\n+\t\t      struct rte_flow_error *error)\n+{\n+\tconst struct rte_flow_item *item = pattern;\n+\n+\tfor (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {\n+\t\tif (item->last) {\n+\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ITEM, item,\n+\t\t\t\t\t   \"Not support range\");\n+\t\t\treturn -rte_errno;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static uint64_t\n+iavf_rss_hf_refine(uint64_t rss_hf, const struct rte_flow_item pattern[],\n+\t\t   const struct rte_flow_action *action,\n+\t\t   struct rte_flow_error *error)\n+{\n+\tconst struct rte_flow_item *item;\n+\n+\tfor (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {\n+\t\tif (item->type == RTE_FLOW_ITEM_TYPE_GTP_PSC) {\n+\t\t\tconst struct rte_flow_action_rss *rss = action->conf;\n+\t\t\tconst struct rte_flow_item_gtp_psc *psc = item->spec;\n+\n+\t\t\tif (psc && ((psc->pdu_type == GTP_EH_PDU_LINK_UP &&\n+\t\t\t\t     (rss->types & ETH_RSS_L3_SRC_ONLY)) ||\n+\t\t\t\t    (!psc->pdu_type &&\n+\t\t\t\t     (rss->types & ETH_RSS_L3_DST_ONLY)))) {\n+\t\t\t\trss_hf |= ETH_RSS_GTPU;\n+\t\t\t} else {\n+\t\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ITEM_SPEC,\n+\t\t\t\t\t\t   pattern,\n+\t\t\t\t\t\t   \"Invalid input set\");\n+\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\treturn rss_hf;\n+}\n+\n+static int\n+iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,\n+\t\t       const struct rte_flow_item pattern[],\n+\t\t       const struct rte_flow_action actions[],\n+\t\t       void **meta, struct rte_flow_error *error)\n+{\n+\tstruct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;\n+\tstruct rss_type_match_hdr *m = (struct rss_type_match_hdr *)\n+\t\t\t\t(pattern_match_item->meta);\n+\tuint32_t type_list_len = RTE_DIM(iavf_hash_type_list);\n+\tstruct iavf_hash_match_type *type_match_item;\n+\tenum rte_flow_action_type action_type;\n+\tconst struct rte_flow_action_rss *rss;\n+\tconst struct rte_flow_action *action;\n+\tuint64_t rss_hf;\n+\tuint16_t i;\n+\tbool item_found = false;\n+\n+\t/* Supported action is RSS. */\n+\tfor (action = actions; action->type !=\n+\t\tRTE_FLOW_ACTION_TYPE_END; action++) {\n+\t\taction_type = action->type;\n+\t\tswitch (action_type) {\n+\t\tcase RTE_FLOW_ACTION_TYPE_RSS:\n+\t\t\trss = action->conf;\n+\t\t\trss_hf = rss->types;\n+\n+\t\t\t/**\n+\t\t\t * Check simultaneous use of SRC_ONLY and DST_ONLY\n+\t\t\t * of the same level.\n+\t\t\t */\n+\t\t\trss_hf = rte_eth_rss_hf_refine(rss_hf);\n+\n+\t\t\t/**\n+\t\t\t * Check the item spec with the rss action and\n+\t\t\t * refine rss hash field.\n+\t\t\t */\n+\t\t\trss_hf = iavf_rss_hf_refine(rss_hf, pattern, action,\n+\t\t\t\t\t\t    error);\n+\n+\t\t\t/* Check if pattern is empty. */\n+\t\t\tif (pattern_match_item->pattern_list !=\n+\t\t\t\tiavf_pattern_empty && rss->func ==\n+\t\t\t\tRTE_ETH_HASH_FUNCTION_SIMPLE_XOR)\n+\t\t\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION, action,\n+\t\t\t\t\t\"Not supported flow\");\n+\n+\t\t\t/* Check if rss types match pattern. */\n+\t\t\tif (rss->func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) {\n+\t\t\t\tif (((rss_hf & ETH_RSS_IPV4) !=\n+\t\t\t\t\tm->eth_rss_hint) &&\n+\t\t\t\t    ((rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) !=\n+\t\t\t\t\tm->eth_rss_hint) &&\n+\t\t\t\t    ((rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) !=\n+\t\t\t\t\tm->eth_rss_hint) &&\n+\t\t\t\t    ((rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) !=\n+\t\t\t\t\tm->eth_rss_hint) &&\n+\t\t\t\t    ((rss_hf & ETH_RSS_IPV6) !=\n+\t\t\t\t\tm->eth_rss_hint) &&\n+\t\t\t\t    ((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) !=\n+\t\t\t\t\tm->eth_rss_hint) &&\n+\t\t\t\t    ((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) !=\n+\t\t\t\t\tm->eth_rss_hint) &&\n+\t\t\t\t    ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) !=\n+\t\t\t\t\tm->eth_rss_hint))\n+\t\t\t\t\treturn rte_flow_error_set(error,\n+\t\t\t\t\tENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\taction, \"Not supported RSS types\");\n+\t\t\t}\n+\n+\t\t\tif (rss->level)\n+\t\t\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION, action,\n+\t\t\t\t\t\"a nonzero RSS encapsulation level is not supported\");\n+\n+\t\t\tif (rss->key_len)\n+\t\t\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION, action,\n+\t\t\t\t\t\"a nonzero RSS key_len is not supported\");\n+\n+\t\t\tif (rss->queue_num)\n+\t\t\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION, action,\n+\t\t\t\t\t\"a non-NULL RSS queue is not supported\");\n+\n+\t\t\t/* Check hash function and save it to rss_meta. */\n+\t\t\tif (rss->func == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)\n+\t\t\t\trss_meta->hash_function =\n+\t\t\t\tRTE_ETH_HASH_FUNCTION_SIMPLE_XOR;\n+\n+\t\t\tif (rss->func ==\n+\t\t\t    RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)\n+\t\t\t\trss_meta->hash_function =\n+\t\t\t\tRTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;\n+\n+\t\t\ttype_match_item =\n+\t\t\trte_zmalloc(\"iavf_type_match_item\",\n+\t\t\t\t    sizeof(struct iavf_hash_match_type), 0);\n+\t\t\tif (!type_match_item) {\n+\t\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_HANDLE,\n+\t\t\t\t\t\t   NULL,\n+\t\t\t\t\t\t   \"No memory for type_match_item\");\n+\t\t\t\treturn -ENOMEM;\n+\t\t\t}\n+\n+\t\t\t/* Find matched proto hdrs according to hash type. */\n+\t\t\tfor (i = 0; i < type_list_len; i++) {\n+\t\t\t\tstruct iavf_hash_match_type *ht_map =\n+\t\t\t\t\t&iavf_hash_type_list[i];\n+\t\t\t\tif (rss_hf == ht_map->hash_type) {\n+\t\t\t\t\ttype_match_item->hash_type =\n+\t\t\t\t\t\tht_map->hash_type;\n+\t\t\t\t\ttype_match_item->proto_hdrs =\n+\t\t\t\t\t\tht_map->proto_hdrs;\n+\t\t\t\t\trss_meta->proto_hdrs =\n+\t\t\t\t\t\ttype_match_item->proto_hdrs;\n+\t\t\t\t\titem_found = true;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\trte_free(type_match_item);\n+\n+\t\t\tif (!item_found)\n+\t\t\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION, action,\n+\t\t\t\t\t\"Not supported flow\");\n+\t\t\tbreak;\n+\n+\t\tcase RTE_FLOW_ACTION_TYPE_END:\n+\t\t\tbreak;\n+\n+\t\tdefault:\n+\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ACTION, action,\n+\t\t\t\t\t   \"Invalid action.\");\n+\t\t\treturn -rte_errno;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad,\n+\t\t\t       struct iavf_pattern_match_item *array,\n+\t\t\t       uint32_t array_len,\n+\t\t\t       const struct rte_flow_item pattern[],\n+\t\t\t       const struct rte_flow_action actions[],\n+\t\t\t       void **meta,\n+\t\t\t       struct rte_flow_error *error)\n+{\n+\tstruct iavf_pattern_match_item *pattern_match_item;\n+\tstruct iavf_rss_meta *rss_meta_ptr;\n+\tint ret = 0;\n+\n+\trss_meta_ptr = rte_zmalloc(NULL, sizeof(*rss_meta_ptr), 0);\n+\tif (!rss_meta_ptr) {\n+\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,\n+\t\t\t\t   \"No memory for rss_meta_ptr\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\t/* Check rss supported pattern and find matched pattern. */\n+\tpattern_match_item =\n+\t\tiavf_search_pattern_match_item(pattern, array, array_len,\n+\t\t\t\t\t       error);\n+\tif (!pattern_match_item) {\n+\t\tret = -rte_errno;\n+\t\tgoto error;\n+\t}\n+\n+\tret = iavf_hash_check_inset(pattern, error);\n+\tif (ret)\n+\t\tgoto error;\n+\n+\t/* Check rss action. */\n+\tret = iavf_hash_parse_action(pattern_match_item, pattern, actions,\n+\t\t\t\t     (void **)&rss_meta_ptr, error);\n+\n+error:\n+\tif (!ret && meta)\n+\t\t*meta = rss_meta_ptr;\n+\telse\n+\t\trte_free(rss_meta_ptr);\n+\n+\trte_free(pattern_match_item);\n+\n+\treturn ret;\n+}\n+\n+static int\n+iavf_hash_create(__rte_unused struct iavf_adapter *ad,\n+\t\t __rte_unused struct rte_flow *flow, void *meta,\n+\t\t __rte_unused struct rte_flow_error *error)\n+{\n+\tstruct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)meta;\n+\tstruct virtchnl_rss_cfg *rss_cfg;\n+\tint ret = 0;\n+\n+\trss_cfg = rte_zmalloc(\"iavf rss rule\",\n+\t\t\t      sizeof(struct virtchnl_rss_cfg), 0);\n+\tif (!rss_cfg) {\n+\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,\n+\t\t\t\t   \"No memory for rss rule\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\trss_cfg->proto_hdrs = *rss_meta->proto_hdrs;\n+\trss_cfg->rss_algorithm = rss_meta->hash_function;\n+\n+\tret = iavf_add_del_rss_cfg(ad, rss_cfg, true);\n+\tif (!ret) {\n+\t\tflow->rule = rss_cfg;\n+\t} else {\n+\t\tPMD_DRV_LOG(ERR, \"fail to add RSS configure\");\n+\t\trte_free(rss_cfg);\n+\t}\n+\n+\treturn ret;\n+}\n+\n+static int\n+iavf_hash_destroy(__rte_unused struct iavf_adapter *ad,\n+\t\t  struct rte_flow *flow,\n+\t\t  __rte_unused struct rte_flow_error *error)\n+{\n+\tstruct virtchnl_rss_cfg *rss_cfg;\n+\tint ret = 0;\n+\n+\trss_cfg = (struct virtchnl_rss_cfg *)flow->rule;\n+\n+\tret = iavf_add_del_rss_cfg(ad, rss_cfg, false);\n+\tif (ret)\n+\t\tPMD_DRV_LOG(ERR, \"fail to del RSS configure\");\n+\n+\treturn ret;\n+}\n+\n+static void\n+iavf_hash_uninit(struct iavf_adapter *ad)\n+{\n+\tiavf_unregister_parser(&iavf_hash_parser, ad);\n+}\n+\n+static void\n+iavf_hash_free(struct rte_flow *flow)\n+{\n+\trte_free(flow->rule);\n+}\ndiff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c\nindex 3f0d23a92..b97326f2e 100644\n--- a/drivers/net/iavf/iavf_vchnl.c\n+++ b/drivers/net/iavf/iavf_vchnl.c\n@@ -335,12 +335,9 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)\n \targs.out_buffer = vf->aq_resp;\n \targs.out_size = IAVF_AQ_BUF_SZ;\n \n-\t/* TODO: basic offload capabilities, need to\n-\t * add advanced/optional offload capabilities\n-\t */\n-\n \tcaps = IAVF_BASIC_OFFLOAD_CAPS | VIRTCHNL_VF_CAP_ADV_LINK_SPEED |\n-\t\tVIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC;\n+\t\tVIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC |\n+\t\tVIRTCHNL_VF_OFFLOAD_ADV_RSS_PF;\n \n \targs.in_args = (uint8_t *)&caps;\n \targs.in_args_size = sizeof(caps);\n@@ -842,3 +839,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)\n \n \treturn err;\n }\n+\n+int\n+iavf_add_del_rss_cfg(struct iavf_adapter *adapter,\n+\t\t     struct virtchnl_rss_cfg *rss_cfg, bool add)\n+{\n+\tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tstruct iavf_cmd_info args;\n+\tint err;\n+\n+\tmemset(&args, 0, sizeof(args));\n+\targs.ops = add ? VIRTCHNL_OP_ADD_RSS_CFG :\n+\t\tVIRTCHNL_OP_DEL_RSS_CFG;\n+\targs.in_args = (u8 *)rss_cfg;\n+\targs.in_args_size = sizeof(*rss_cfg);\n+\targs.out_buffer = vf->aq_resp;\n+\targs.out_size = IAVF_AQ_BUF_SZ;\n+\n+\terr = iavf_execute_vf_cmd(adapter, &args);\n+\tif (err)\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"Failed to execute command of %s\",\n+\t\t\t    add ? \"OP_ADD_RSS_CFG\" :\n+\t\t\t    \"OP_DEL_RSS_INPUT_CFG\");\n+\n+\treturn err;\n+}\ndiff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build\nindex 32eabca4b..5a5cdd562 100644\n--- a/drivers/net/iavf/meson.build\n+++ b/drivers/net/iavf/meson.build\n@@ -13,6 +13,7 @@ sources = files(\n \t'iavf_rxtx.c',\n \t'iavf_vchnl.c',\n \t'iavf_generic_flow.c',\n+\t'iavf_hash.c',\n )\n \n if arch_subdir == 'x86'\n",
    "prefixes": [
        "v3",
        "2/4"
    ]
}