get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2363,
    "url": "https://patches.dpdk.org/api/patches/2363/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421650577-25969-6-git-send-email-helin.zhang@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": "<1421650577-25969-6-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421650577-25969-6-git-send-email-helin.zhang@intel.com",
    "date": "2015-01-19T06:56:15",
    "name": "[dpdk-dev,5/7] ethdev: unification of flow types",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "82335350943a87bc33ccb3233bbf958b61f560e1",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421650577-25969-6-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2363/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2363/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 0167B5A81;\n\tMon, 19 Jan 2015 07:56:41 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id A60385AA2\n\tfor <dev@dpdk.org>; Mon, 19 Jan 2015 07:56:37 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga102.jf.intel.com with ESMTP; 18 Jan 2015 22:53:42 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga002.fm.intel.com with ESMTP; 18 Jan 2015 22:56:34 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t0J6uWnl015688;\n\tMon, 19 Jan 2015 14:56:32 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t0J6uUgd026038; Mon, 19 Jan 2015 14:56:32 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0J6uT7x026034; \n\tMon, 19 Jan 2015 14:56:29 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.09,425,1418112000\"; d=\"scan'208\";a=\"663906391\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 19 Jan 2015 14:56:15 +0800",
        "Message-Id": "<1421650577-25969-6-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1421650577-25969-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1421650577-25969-1-git-send-email-helin.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 5/7] ethdev: unification of flow types",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Flow types was defined actually for i40e hardware specifically,\nand wasn't able to be used for defining RSS offload types of all\nPMDs. It removed the enum flow types, and uses macros instead\nwith new names. The new macros can be used for defining RSS\noffload types later. Also modifications are made in i40e and\ntestpmd accordingly.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n app/test-pmd/cmdline.c            | 88 ++++++++++++++++++++++++---------------\n app/test-pmd/config.c             | 71 +++++++++++++++++++++----------\n lib/librte_ether/rte_eth_ctrl.h   | 55 ++++++++++++++----------\n lib/librte_pmd_i40e/i40e_ethdev.c | 68 +++++++++++++++++-------------\n lib/librte_pmd_i40e/i40e_ethdev.h | 34 +++++++--------\n lib/librte_pmd_i40e/i40e_fdir.c   | 84 ++++++++++++++++++-------------------\n 6 files changed, 235 insertions(+), 165 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 4618b92..80b9c32 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -707,7 +707,7 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"    get info of a flex filter.\\n\\n\"\n \n \t\t\t\"flow_director_filter (port_id) (add|del)\"\n-\t\t\t\" flow (ip4|ip4-frag|ip6|ip6-frag)\"\n+\t\t\t\" flow (ipv4-other|ipv4-frag|ipv6-other|ipv6-frag)\"\n \t\t\t\" src (src_ip_address) dst (dst_ip_address)\"\n \t\t\t\" flexbytes (flexbytes_value)\"\n \t\t\t\" (drop|fwd) queue (queue_id) fd_id (fd_id_value)\\n\"\n@@ -733,7 +733,8 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"    Flush all flow director entries of a device.\\n\\n\"\n \n \t\t\t\"flow_director_flex_mask (port_id)\"\n-\t\t\t\" flow (ip4|ip4-frag|tcp4|udp4|sctp4|ip6|ip6-frag|tcp6|udp6|sctp6|all)\"\n+\t\t\t\" flow (ipv4-other|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|\"\n+\t\t\t\"ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|all)\"\n \t\t\t\" (mask)\\n\"\n \t\t\t\"    Configure mask of flex payload.\\n\\n\"\n \n@@ -8158,31 +8159,34 @@ parse_flexbytes(const char *q_arg, uint8_t *flexbytes, uint16_t max_num)\n \treturn ret;\n }\n \n-static enum rte_eth_flow_type\n+static uint16_t\n str2flowtype(char *string)\n {\n \tuint8_t i = 0;\n \tstatic const struct {\n \t\tchar str[32];\n-\t\tenum rte_eth_flow_type type;\n+\t\tuint16_t type;\n \t} flowtype_str[] = {\n-\t\t{\"ip4\", RTE_ETH_FLOW_TYPE_IPV4_OTHER},\n-\t\t{\"ip4-frag\", RTE_ETH_FLOW_TYPE_FRAG_IPV4},\n-\t\t{\"udp4\", RTE_ETH_FLOW_TYPE_UDPV4},\n-\t\t{\"tcp4\", RTE_ETH_FLOW_TYPE_TCPV4},\n-\t\t{\"sctp4\", RTE_ETH_FLOW_TYPE_SCTPV4},\n-\t\t{\"ip6\", RTE_ETH_FLOW_TYPE_IPV6_OTHER},\n-\t\t{\"ip6-frag\", RTE_ETH_FLOW_TYPE_FRAG_IPV6},\n-\t\t{\"udp6\", RTE_ETH_FLOW_TYPE_UDPV6},\n-\t\t{\"tcp6\", RTE_ETH_FLOW_TYPE_TCPV6},\n-\t\t{\"sctp6\", RTE_ETH_FLOW_TYPE_TCPV6},\n+\t\t{\"ipv4\", ETH_FLOW_TYPE_IPV4},\n+\t\t{\"ipv4-frag\", ETH_FLOW_TYPE_FRAG_IPV4},\n+\t\t{\"ipv4-tcp\", ETH_FLOW_TYPE_NONFRAG_IPV4_TCP},\n+\t\t{\"ipv4-udp\", ETH_FLOW_TYPE_NONFRAG_IPV4_UDP},\n+\t\t{\"ipv4-sctp\", ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP},\n+\t\t{\"ipv4-other\", ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER},\n+\t\t{\"ipv6\", ETH_FLOW_TYPE_IPV6},\n+\t\t{\"ipv6-frag\", ETH_FLOW_TYPE_FRAG_IPV6},\n+\t\t{\"ipv6-tcp\", ETH_FLOW_TYPE_NONFRAG_IPV6_TCP},\n+\t\t{\"ipv6-udp\", ETH_FLOW_TYPE_NONFRAG_IPV6_UDP},\n+\t\t{\"ipv6-sctp\", ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP},\n+\t\t{\"ipv6-other\", ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER},\n+\t\t{\"l2_payload\", ETH_FLOW_TYPE_L2_PAYLOAD},\n \t};\n \n \tfor (i = 0; i < RTE_DIM(flowtype_str); i++) {\n \t\tif (!strcmp(flowtype_str[i].str, string))\n \t\t\treturn flowtype_str[i].type;\n \t}\n-\treturn RTE_ETH_FLOW_TYPE_NONE;\n+\treturn ETH_FLOW_TYPE_UNKNOWN;\n }\n \n #define IPV4_ADDR_TO_UINT(ip_addr, ip) \\\n@@ -8235,9 +8239,9 @@ cmd_flow_director_filter_parsed(void *parsed_result,\n \n \tentry.input.flow_type = str2flowtype(res->flow_type);\n \tswitch (entry.input.flow_type) {\n-\tcase RTE_ETH_FLOW_TYPE_IPV4_OTHER:\n-\tcase RTE_ETH_FLOW_TYPE_UDPV4:\n-\tcase RTE_ETH_FLOW_TYPE_TCPV4:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_UDP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_TCP:\n \t\tIPV4_ADDR_TO_UINT(res->ip_dst,\n \t\t\tentry.input.flow.ip4_flow.dst_ip);\n \t\tIPV4_ADDR_TO_UINT(res->ip_src,\n@@ -8248,7 +8252,7 @@ cmd_flow_director_filter_parsed(void *parsed_result,\n \t\tentry.input.flow.udp4_flow.src_port =\n \t\t\t\trte_cpu_to_be_16(res->port_src);\n \t\tbreak;\n-\tcase RTE_ETH_FLOW_TYPE_SCTPV4:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP:\n \t\tIPV4_ADDR_TO_UINT(res->ip_dst,\n \t\t\tentry.input.flow.sctp4_flow.ip.dst_ip);\n \t\tIPV4_ADDR_TO_UINT(res->ip_src,\n@@ -8257,9 +8261,9 @@ cmd_flow_director_filter_parsed(void *parsed_result,\n \t\tentry.input.flow.sctp4_flow.verify_tag =\n \t\t\t\trte_cpu_to_be_32(res->verify_tag_value);\n \t\tbreak;\n-\tcase RTE_ETH_FLOW_TYPE_IPV6_OTHER:\n-\tcase RTE_ETH_FLOW_TYPE_UDPV6:\n-\tcase RTE_ETH_FLOW_TYPE_TCPV6:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_UDP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_TCP:\n \t\tIPV6_ADDR_TO_ARRAY(res->ip_dst,\n \t\t\tentry.input.flow.ipv6_flow.dst_ip);\n \t\tIPV6_ADDR_TO_ARRAY(res->ip_src,\n@@ -8270,7 +8274,7 @@ cmd_flow_director_filter_parsed(void *parsed_result,\n \t\tentry.input.flow.udp6_flow.src_port =\n \t\t\t\trte_cpu_to_be_16(res->port_src);\n \t\tbreak;\n-\tcase RTE_ETH_FLOW_TYPE_SCTPV6:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP:\n \t\tIPV6_ADDR_TO_ARRAY(res->ip_dst,\n \t\t\tentry.input.flow.sctp6_flow.ip.dst_ip);\n \t\tIPV6_ADDR_TO_ARRAY(res->ip_src,\n@@ -8321,9 +8325,8 @@ cmdline_parse_token_string_t cmd_flow_director_flow =\n \t\t\t\t flow, \"flow\");\n cmdline_parse_token_string_t cmd_flow_director_flow_type =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n-\t\t\t\t flow_type,\n-\t\t\t\t \"ip4#ip4-frag#tcp4#udp4#sctp4#\"\n-\t\t\t\t \"ip6#ip6-frag#tcp6#udp6#sctp6\");\n+\t\tflow_type, \"ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#\"\n+\t\t\"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp\");\n cmdline_parse_token_string_t cmd_flow_director_src =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n \t\t\t\t src, \"src\");\n@@ -8511,7 +8514,9 @@ cmd_flow_director_flex_mask_parsed(void *parsed_result,\n \tstruct cmd_flow_director_flex_mask_result *res = parsed_result;\n \tstruct rte_eth_fdir_flex_mask flex_mask;\n \tstruct rte_port *port;\n-\tenum rte_eth_flow_type i;\n+\tstruct rte_eth_fdir_info fdir_info;\n+\tuint32_t flow_type_mask;\n+\tuint16_t i;\n \tint ret;\n \n \tif (res->port_id > nb_ports) {\n@@ -8534,10 +8539,23 @@ cmd_flow_director_flex_mask_parsed(void *parsed_result,\n \t\tprintf(\"error: Cannot parse mask input.\\n\");\n \t\treturn;\n \t}\n+\n+\tmemset(&fdir_info, 0, sizeof(fdir_info));\n+\tret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_FDIR,\n+\t\t\t\t\tRTE_ETH_FILTER_INFO, &fdir_info);\n+\tif (ret < 0) {\n+\t\tprintf(\"Cannot get FDir filter info\\n\");\n+\t\treturn;\n+\t}\n+\tflow_type_mask = fdir_info.flow_types_mask[0];\n \tif (!strcmp(res->flow_type, \"all\")) {\n-\t\tfor (i = RTE_ETH_FLOW_TYPE_UDPV4;\n-\t\t     i <= RTE_ETH_FLOW_TYPE_FRAG_IPV6;\n-\t\t     i++) {\n+\t\tif (!flow_type_mask) {\n+\t\t\tprintf(\"No flow type supported\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tfor (i = ETH_FLOW_TYPE_UNKNOWN; i < ETH_FLOW_TYPE_MAX; i++) {\n+\t\t\tif (!(flow_type_mask & (1 << i)))\n+\t\t\t\tcontinue;\n \t\t\tflex_mask.flow_type = i;\n \t\t\tfdir_set_flex_mask(res->port_id, &flex_mask);\n \t\t}\n@@ -8545,6 +8563,11 @@ cmd_flow_director_flex_mask_parsed(void *parsed_result,\n \t\treturn;\n \t}\n \tflex_mask.flow_type = str2flowtype(res->flow_type);\n+\tif (!(flow_type_mask & (1 << flex_mask.flow_type))) {\n+\t\tprintf(\"Flow type %s not supported on port %d\\n\",\n+\t\t\t\tres->flow_type, res->port_id);\n+\t\treturn;\n+\t}\n \tfdir_set_flex_mask(res->port_id, &flex_mask);\n \tcmd_reconfig_device_queue(res->port_id, 1, 1);\n }\n@@ -8561,9 +8584,8 @@ cmdline_parse_token_string_t cmd_flow_director_flexmask_flow =\n \t\t\t\t flow, \"flow\");\n cmdline_parse_token_string_t cmd_flow_director_flexmask_flow_type =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,\n-\t\t\t\t flow_type,\n-\t\t\t\t\"ip4#ip4-frag#tcp4#udp4#sctp4#\"\n-\t\t\t\t\"ip6#ip6-frag#tcp6#udp6#sctp6#all\");\n+\t\tflow_type, \"ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#\"\n+\t\t\"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#all\");\n cmdline_parse_token_string_t cmd_flow_director_flexmask_mask =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,\n \t\t\t\t mask, NULL);\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 87dedf9..4c61a07 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -96,19 +96,7 @@\n \n #include \"testpmd.h\"\n \n-static const char *flowtype_str[RTE_ETH_FLOW_TYPE_MAX] = {\n-\tNULL,\n-\t\"udp4\",\n-\t\"tcp4\",\n-\t\"sctp4\",\n-\t\"ip4\",\n-\t\"ip4-frag\",\n-\t\"udp6\",\n-\t\"tcp6\",\n-\t\"sctp6\",\n-\t\"ip6\",\n-\t\"ip6-frag\",\n-};\n+static char *flowtype_to_str(uint16_t flow_type);\n \n static void\n print_ethaddr(const char *name, struct ether_addr *eth_addr)\n@@ -1843,15 +1831,50 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf)\n \tprintf(\"\\n\");\n }\n \n+static char *\n+flowtype_to_str(uint16_t flow_type)\n+{\n+\tstruct flow_type_info {\n+\t\tchar str[32];\n+\t\tuint16_t ftype;\n+\t};\n+\n+\tuint8_t i;\n+\tstatic struct flow_type_info flowtype_str_table[] = {\n+\t\t{\"ipv4\", ETH_FLOW_TYPE_IPV4},\n+\t\t{\"ipv4-frag\", ETH_FLOW_TYPE_FRAG_IPV4},\n+\t\t{\"ipv4-tcp\", ETH_FLOW_TYPE_NONFRAG_IPV4_TCP},\n+\t\t{\"ipv4-udp\", ETH_FLOW_TYPE_NONFRAG_IPV4_UDP},\n+\t\t{\"ipv4-sctp\", ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP},\n+\t\t{\"ipv4-other\", ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER},\n+\t\t{\"ipv6\", ETH_FLOW_TYPE_IPV6},\n+\t\t{\"ipv6-frag\", ETH_FLOW_TYPE_FRAG_IPV6},\n+\t\t{\"ipv6-tcp\", ETH_FLOW_TYPE_NONFRAG_IPV6_TCP},\n+\t\t{\"ipv6-udp\", ETH_FLOW_TYPE_NONFRAG_IPV6_UDP},\n+\t\t{\"ipv6-sctp\", ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP},\n+\t\t{\"ipv6-other\", ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER},\n+\t\t{\"l2_payload\", ETH_FLOW_TYPE_L2_PAYLOAD},\n+\t};\n+\n+\tfor (i = 0; i < RTE_DIM(flowtype_str_table); i++) {\n+\t\tif (flowtype_str_table[i].ftype == flow_type)\n+\t\t\treturn flowtype_str_table[i].str;\n+\t}\n+\n+\treturn NULL;\n+}\n+\n static inline void\n print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf)\n {\n \tstruct rte_eth_fdir_flex_mask *mask;\n \tint i, j;\n+\tchar *p;\n \n \tfor (i = 0; i < flex_conf->nb_flexmasks; i++) {\n \t\tmask = &flex_conf->flex_mask[i];\n-\t\tprintf(\"\\n    %s:\\t\", flowtype_str[mask->flow_type]);\n+\t\tp = flowtype_to_str(mask->flow_type);\n+\t\tprintf(\"\\n    %s:\\t\", p ? p : \"unknown\");\n \t\tfor (j = 0; j < RTE_ETH_FDIR_MAX_FLEXLEN; j++)\n \t\t\tprintf(\" %02x\", mask->mask[j]);\n \t}\n@@ -1861,13 +1884,17 @@ print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf)\n static inline void\n print_fdir_flow_type(uint32_t flow_types_mask)\n {\n-\tint i = 0;\n+\tint i;\n+\tchar *p;\n \n-\tfor (i = RTE_ETH_FLOW_TYPE_UDPV4;\n-\t     i <= RTE_ETH_FLOW_TYPE_FRAG_IPV6;\n-\t     i++) {\n-\t\tif (flow_types_mask & (1 << i))\n-\t\t\tprintf(\" %s\", flowtype_str[i]);\n+\tfor (i = ETH_FLOW_TYPE_UNKNOWN; i < ETH_FLOW_TYPE_MAX; i++) {\n+\t\tif (!(flow_types_mask & (1 << i)))\n+\t\t\tcontinue;\n+\t\tp = flowtype_to_str(i);\n+\t\tif (p)\n+\t\t\tprintf(\" %s\", p);\n+\t\telse\n+\t\t\tprintf(\" unknown\");\n \t}\n \tprintf(\"\\n\");\n }\n@@ -2028,13 +2055,13 @@ fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)\n \n \tport = &ports[port_id];\n \tflex_conf = &port->dev_conf.fdir_conf.flex_conf;\n-\tfor (i = 0; i < RTE_ETH_FLOW_TYPE_MAX; i++) {\n+\tfor (i = 0; i < ETH_FLOW_TYPE_MAX; i++) {\n \t\tif (cfg->flow_type == flex_conf->flex_mask[i].flow_type) {\n \t\t\tidx = i;\n \t\t\tbreak;\n \t\t}\n \t}\n-\tif (i >= RTE_ETH_FLOW_TYPE_MAX) {\n+\tif (i >= ETH_FLOW_TYPE_MAX) {\n \t\tif (flex_conf->nb_flexmasks < RTE_DIM(flex_conf->flex_mask)) {\n \t\t\tidx = flex_conf->nb_flexmasks;\n \t\t\tflex_conf->nb_flexmasks++;\ndiff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h\nindex 1c15ed0..f2b39fc 100644\n--- a/lib/librte_ether/rte_eth_ctrl.h\n+++ b/lib/librte_ether/rte_eth_ctrl.h\n@@ -46,6 +46,35 @@\n extern \"C\" {\n #endif\n \n+/*\n+ * A packet can be identified by hardware as different flow types. Different\n+ * NIC hardwares may support different flow types.\n+ * Basically, the NIC hardware identifies the flow type as deep protocol as\n+ * possible, and exclusively. For example, if a packet is identified as\n+ * 'ETH_FLOW_TYPE_NONFRAG_IPV4_TCP', it will not be any of other flow types,\n+ * though it is an actual IPV4 packet.\n+ * Note that the flow types are used to define RSS offload types in\n+ * rte_ethdev.h.\n+ */\n+#define ETH_FLOW_TYPE_UNKNOWN            0\n+#define ETH_FLOW_TYPE_IPV4               1\n+#define ETH_FLOW_TYPE_FRAG_IPV4          2\n+#define ETH_FLOW_TYPE_NONFRAG_IPV4_TCP   3\n+#define ETH_FLOW_TYPE_NONFRAG_IPV4_UDP   4\n+#define ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP  5\n+#define ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER 6\n+#define ETH_FLOW_TYPE_IPV6               7\n+#define ETH_FLOW_TYPE_FRAG_IPV6          8\n+#define ETH_FLOW_TYPE_NONFRAG_IPV6_TCP   9\n+#define ETH_FLOW_TYPE_NONFRAG_IPV6_UDP   10\n+#define ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP  11\n+#define ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER 12\n+#define ETH_FLOW_TYPE_L2_PAYLOAD         13\n+#define ETH_FLOW_TYPE_IPV6_EX            14\n+#define ETH_FLOW_TYPE_IPV6_TCP_EX        15\n+#define ETH_FLOW_TYPE_IPV6_UDP_EX        16\n+#define ETH_FLOW_TYPE_MAX                17\n+\n /**\n  * Feature filter types\n  */\n@@ -179,24 +208,6 @@ struct rte_eth_tunnel_filter_conf {\n #define RTE_ETH_FDIR_MAX_FLEXLEN         16 /** < Max length of flexbytes. */\n \n /**\n- * Flow type\n- */\n-enum rte_eth_flow_type {\n-\tRTE_ETH_FLOW_TYPE_NONE = 0,\n-\tRTE_ETH_FLOW_TYPE_UDPV4,\n-\tRTE_ETH_FLOW_TYPE_TCPV4,\n-\tRTE_ETH_FLOW_TYPE_SCTPV4,\n-\tRTE_ETH_FLOW_TYPE_IPV4_OTHER,\n-\tRTE_ETH_FLOW_TYPE_FRAG_IPV4,\n-\tRTE_ETH_FLOW_TYPE_UDPV6,\n-\tRTE_ETH_FLOW_TYPE_TCPV6,\n-\tRTE_ETH_FLOW_TYPE_SCTPV6,\n-\tRTE_ETH_FLOW_TYPE_IPV6_OTHER,\n-\tRTE_ETH_FLOW_TYPE_FRAG_IPV6,\n-\tRTE_ETH_FLOW_TYPE_MAX = 64,\n-};\n-\n-/**\n  * A structure used to define the input for IPV4 flow\n  */\n struct rte_eth_ipv4_flow {\n@@ -291,7 +302,7 @@ struct rte_eth_fdir_flow_ext {\n  * A structure used to define the input for a flow director filter entry\n  */\n struct rte_eth_fdir_input {\n-\tenum rte_eth_flow_type flow_type;      /**< Type of flow */\n+\tuint16_t flow_type;      /**< Type of flow */\n \tunion rte_eth_fdir_flow flow;\n \t/**< Flow fields to match, dependent on flow_type */\n \tstruct rte_eth_fdir_flow_ext flow_ext;\n@@ -371,7 +382,7 @@ struct rte_eth_flex_payload_cfg {\n  * for each flow type\n  */\n struct rte_eth_fdir_flex_mask {\n-\tenum rte_eth_flow_type flow_type;  /**< Flow type */\n+\tuint16_t flow_type;  /**< Flow type */\n \tuint8_t mask[RTE_ETH_FDIR_MAX_FLEXLEN];\n \t/**< Mask for the whole flexible payload */\n };\n@@ -385,7 +396,7 @@ struct rte_eth_fdir_flex_conf {\n \tuint16_t nb_flexmasks; /**< The number of following mask */\n \tstruct rte_eth_flex_payload_cfg flex_set[RTE_ETH_PAYLOAD_MAX];\n \t/**< Flex payload configuration for each payload type */\n-\tstruct rte_eth_fdir_flex_mask flex_mask[RTE_ETH_FLOW_TYPE_MAX];\n+\tstruct rte_eth_fdir_flex_mask flex_mask[ETH_FLOW_TYPE_MAX];\n \t/**< Flex mask configuration for each flow type */\n };\n \n@@ -400,7 +411,7 @@ enum rte_fdir_mode {\n \n #define UINT32_BIT (CHAR_BIT * sizeof(uint32_t))\n #define RTE_FLOW_TYPE_MASK_ARRAY_SIZE \\\n-\t(RTE_ALIGN(RTE_ETH_FLOW_TYPE_MAX, UINT32_BIT)/UINT32_BIT)\n+\t(RTE_ALIGN(ETH_FLOW_TYPE_MAX, UINT32_BIT)/UINT32_BIT)\n \n /**\n  * A structure used to get the information of flow director filter.\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex b47a3d2..de1eff4 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -5261,46 +5261,56 @@ i40e_dev_filter_ctrl(struct rte_eth_dev *dev,\n }\n \n enum i40e_filter_pctype\n-i40e_flowtype_to_pctype(enum rte_eth_flow_type flow_type)\n+i40e_flowtype_to_pctype(uint16_t flow_type)\n {\n \tstatic const enum i40e_filter_pctype pctype_table[] = {\n-\t\t[RTE_ETH_FLOW_TYPE_UDPV4] = I40E_FILTER_PCTYPE_NONF_IPV4_UDP,\n-\t\t[RTE_ETH_FLOW_TYPE_TCPV4] = I40E_FILTER_PCTYPE_NONF_IPV4_TCP,\n-\t\t[RTE_ETH_FLOW_TYPE_SCTPV4] = I40E_FILTER_PCTYPE_NONF_IPV4_SCTP,\n-\t\t[RTE_ETH_FLOW_TYPE_IPV4_OTHER] =\n-\t\t\t\t\tI40E_FILTER_PCTYPE_NONF_IPV4_OTHER,\n-\t\t[RTE_ETH_FLOW_TYPE_FRAG_IPV4] =\n-\t\t\t\t\tI40E_FILTER_PCTYPE_FRAG_IPV4,\n-\t\t[RTE_ETH_FLOW_TYPE_UDPV6] = I40E_FILTER_PCTYPE_NONF_IPV6_UDP,\n-\t\t[RTE_ETH_FLOW_TYPE_TCPV6] = I40E_FILTER_PCTYPE_NONF_IPV6_TCP,\n-\t\t[RTE_ETH_FLOW_TYPE_SCTPV6] = I40E_FILTER_PCTYPE_NONF_IPV6_SCTP,\n-\t\t[RTE_ETH_FLOW_TYPE_IPV6_OTHER] =\n-\t\t\t\t\tI40E_FILTER_PCTYPE_NONF_IPV6_OTHER,\n-\t\t[RTE_ETH_FLOW_TYPE_FRAG_IPV6] =\n-\t\t\t\t\tI40E_FILTER_PCTYPE_FRAG_IPV6,\n+\t\t[ETH_FLOW_TYPE_FRAG_IPV4] = I40E_FILTER_PCTYPE_FRAG_IPV4,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_UDP] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV4_UDP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_TCP] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV4_TCP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV4_SCTP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV4_OTHER,\n+\t\t[ETH_FLOW_TYPE_FRAG_IPV6] = I40E_FILTER_PCTYPE_FRAG_IPV6,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_UDP] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV6_UDP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_TCP] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV6_TCP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV6_SCTP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER] =\n+\t\t\tI40E_FILTER_PCTYPE_NONF_IPV6_OTHER,\n+\t\t[ETH_FLOW_TYPE_L2_PAYLOAD] = I40E_FILTER_PCTYPE_L2_PAYLOAD,\n \t};\n \n \treturn pctype_table[flow_type];\n }\n \n-enum rte_eth_flow_type\n+uint16_t\n i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)\n {\n-\tstatic const enum rte_eth_flow_type flowtype_table[] = {\n-\t\t[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] = RTE_ETH_FLOW_TYPE_UDPV4,\n-\t\t[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] = RTE_ETH_FLOW_TYPE_TCPV4,\n-\t\t[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] = RTE_ETH_FLOW_TYPE_SCTPV4,\n+\tstatic const uint16_t flowtype_table[] = {\n+\t\t[I40E_FILTER_PCTYPE_FRAG_IPV4] = ETH_FLOW_TYPE_FRAG_IPV4,\n+\t\t[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV4_UDP,\n+\t\t[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV4_TCP,\n+\t\t[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV4_SCTP,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =\n-\t\t\t\t\tRTE_ETH_FLOW_TYPE_IPV4_OTHER,\n-\t\t[I40E_FILTER_PCTYPE_FRAG_IPV4] =\n-\t\t\t\t\tRTE_ETH_FLOW_TYPE_FRAG_IPV4,\n-\t\t[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] = RTE_ETH_FLOW_TYPE_UDPV6,\n-\t\t[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] = RTE_ETH_FLOW_TYPE_TCPV6,\n-\t\t[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] = RTE_ETH_FLOW_TYPE_SCTPV6,\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV4_OTHER,\n+\t\t[I40E_FILTER_PCTYPE_FRAG_IPV6] = ETH_FLOW_TYPE_FRAG_IPV6,\n+\t\t[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV6_UDP,\n+\t\t[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV6_TCP,\n+\t\t[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV6_SCTP,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =\n-\t\t\t\t\tRTE_ETH_FLOW_TYPE_IPV6_OTHER,\n-\t\t[I40E_FILTER_PCTYPE_FRAG_IPV6] =\n-\t\t\t\t\tRTE_ETH_FLOW_TYPE_FRAG_IPV6,\n+\t\t\tETH_FLOW_TYPE_NONFRAG_IPV6_OTHER,\n+\t\t[I40E_FILTER_PCTYPE_L2_PAYLOAD] = ETH_FLOW_TYPE_L2_PAYLOAD,\n \t};\n \n \treturn flowtype_table[pctype];\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev.h b/lib/librte_pmd_i40e/i40e_ethdev.h\nindex f913ea9..e2a8db3 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.h\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.h\n@@ -471,10 +471,8 @@ const struct rte_memzone *i40e_memzone_reserve(const char *name,\n \t\t\t\t\tint socket_id);\n int i40e_fdir_configure(struct rte_eth_dev *dev);\n void i40e_fdir_teardown(struct i40e_pf *pf);\n-enum i40e_filter_pctype i40e_flowtype_to_pctype(\n-\t\t\t\tenum rte_eth_flow_type flow_type);\n-enum rte_eth_flow_type i40e_pctype_to_flowtype(\n-\t\t\t\tenum i40e_filter_pctype pctype);\n+enum i40e_filter_pctype i40e_flowtype_to_pctype(uint16_t flow_type);\n+uint16_t i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype);\n int i40e_fdir_ctrl_func(struct rte_eth_dev *dev,\n \t\t\t  enum rte_filter_op filter_op,\n \t\t\t  void *arg);\n@@ -541,27 +539,29 @@ i40e_init_adminq_parameter(struct i40e_hw *hw)\n }\n \n #define I40E_VALID_FLOW_TYPE(flow_type) \\\n-\t((flow_type) == RTE_ETH_FLOW_TYPE_UDPV4 || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_TCPV4 || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_SCTPV4 || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_IPV4_OTHER || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_FRAG_IPV4 || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_UDPV6 || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_TCPV6 || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_SCTPV6 || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_IPV6_OTHER || \\\n-\t(flow_type) == RTE_ETH_FLOW_TYPE_FRAG_IPV6)\n+\t((flow_type) == ETH_FLOW_TYPE_FRAG_IPV4 || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV4_TCP || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV4_UDP || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER || \\\n+\t(flow_type) == ETH_FLOW_TYPE_FRAG_IPV6 || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV6_TCP || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV6_UDP || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP || \\\n+\t(flow_type) == ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER || \\\n+\t(flow_type) == ETH_FLOW_TYPE_L2_PAYLOAD)\n \n #define I40E_VALID_PCTYPE(pctype) \\\n-\t((pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_UDP || \\\n+\t((pctype) == I40E_FILTER_PCTYPE_FRAG_IPV4 || \\\n \t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_TCP || \\\n+\t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_UDP || \\\n \t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_SCTP || \\\n \t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_OTHER || \\\n-\t(pctype) == I40E_FILTER_PCTYPE_FRAG_IPV4 || \\\n+\t(pctype) == I40E_FILTER_PCTYPE_FRAG_IPV6 || \\\n \t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_UDP || \\\n \t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_TCP || \\\n \t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_SCTP || \\\n \t(pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_OTHER || \\\n-\t(pctype) == I40E_FILTER_PCTYPE_FRAG_IPV6)\n+\t(pctype) == I40E_FILTER_PCTYPE_L2_PAYLOAD)\n \n #endif /* _I40E_ETHDEV_H_ */\ndiff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_fdir.c\nindex c9e535b..9bdcabf 100644\n--- a/lib/librte_pmd_i40e/i40e_fdir.c\n+++ b/lib/librte_pmd_i40e/i40e_fdir.c\n@@ -95,16 +95,16 @@\n \t\t\tI40E_PRTQF_FLX_PIT_DEST_OFF_MASK))\n \n #define I40E_FDIR_FLOW_TYPES ( \\\n-\t(1 << RTE_ETH_FLOW_TYPE_UDPV4) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_TCPV4) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_SCTPV4) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_IPV4_OTHER) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_FRAG_IPV4) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_UDPV6) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_TCPV6) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_SCTPV6) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_IPV6_OTHER) | \\\n-\t(1 << RTE_ETH_FLOW_TYPE_FRAG_IPV6))\n+\t(1 << ETH_FLOW_TYPE_FRAG_IPV4) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV4_UDP) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV4_TCP) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER) | \\\n+\t(1 << ETH_FLOW_TYPE_FRAG_IPV6) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV6_UDP) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV6_TCP) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP) | \\\n+\t(1 << ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER))\n \n #define I40E_FLEX_WORD_MASK(off) (0x80 >> (off))\n \n@@ -498,7 +498,7 @@ i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)\n \t}\n \n \t/* check flex mask setting configuration */\n-\tif (conf->nb_flexmasks > RTE_ETH_FLOW_TYPE_FRAG_IPV6) {\n+\tif (conf->nb_flexmasks >= ETH_FLOW_TYPE_MAX) {\n \t\tPMD_DRV_LOG(ERR, \"invalid number of flex masks.\");\n \t\treturn -EINVAL;\n \t}\n@@ -692,24 +692,24 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,\n \tstruct ipv4_hdr *ip;\n \tstruct ipv6_hdr *ip6;\n \tstatic const uint8_t next_proto[] = {\n-\t\t[RTE_ETH_FLOW_TYPE_UDPV4] = IPPROTO_UDP,\n-\t\t[RTE_ETH_FLOW_TYPE_TCPV4] = IPPROTO_TCP,\n-\t\t[RTE_ETH_FLOW_TYPE_SCTPV4] = IPPROTO_SCTP,\n-\t\t[RTE_ETH_FLOW_TYPE_IPV4_OTHER] = IPPROTO_IP,\n-\t\t[RTE_ETH_FLOW_TYPE_FRAG_IPV4] = IPPROTO_IP,\n-\t\t[RTE_ETH_FLOW_TYPE_UDPV6] = IPPROTO_UDP,\n-\t\t[RTE_ETH_FLOW_TYPE_TCPV6] = IPPROTO_TCP,\n-\t\t[RTE_ETH_FLOW_TYPE_SCTPV6] = IPPROTO_SCTP,\n-\t\t[RTE_ETH_FLOW_TYPE_IPV6_OTHER] = IPPROTO_NONE,\n-\t\t[RTE_ETH_FLOW_TYPE_FRAG_IPV6] = IPPROTO_NONE,\n+\t\t[ETH_FLOW_TYPE_FRAG_IPV4] = IPPROTO_IP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_TCP] = IPPROTO_TCP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_UDP] = IPPROTO_UDP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP] = IPPROTO_SCTP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER] = IPPROTO_IP,\n+\t\t[ETH_FLOW_TYPE_FRAG_IPV6] = IPPROTO_NONE,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_TCP] = IPPROTO_TCP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_UDP] = IPPROTO_UDP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP] = IPPROTO_SCTP,\n+\t\t[ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER] = IPPROTO_NONE,\n \t};\n \n \tswitch (fdir_input->flow_type) {\n-\tcase RTE_ETH_FLOW_TYPE_UDPV4:\n-\tcase RTE_ETH_FLOW_TYPE_TCPV4:\n-\tcase RTE_ETH_FLOW_TYPE_SCTPV4:\n-\tcase RTE_ETH_FLOW_TYPE_IPV4_OTHER:\n-\tcase RTE_ETH_FLOW_TYPE_FRAG_IPV4:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_TCP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_UDP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER:\n+\tcase ETH_FLOW_TYPE_FRAG_IPV4:\n \t\tip = (struct ipv4_hdr *)(raw_pkt + sizeof(struct ether_hdr));\n \n \t\tether->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);\n@@ -726,11 +726,11 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,\n \t\tip->dst_addr = fdir_input->flow.ip4_flow.src_ip;\n \t\tip->next_proto_id = next_proto[fdir_input->flow_type];\n \t\tbreak;\n-\tcase RTE_ETH_FLOW_TYPE_UDPV6:\n-\tcase RTE_ETH_FLOW_TYPE_TCPV6:\n-\tcase RTE_ETH_FLOW_TYPE_SCTPV6:\n-\tcase RTE_ETH_FLOW_TYPE_IPV6_OTHER:\n-\tcase RTE_ETH_FLOW_TYPE_FRAG_IPV6:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_TCP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_UDP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER:\n+\tcase ETH_FLOW_TYPE_FRAG_IPV6:\n \t\tip6 = (struct ipv6_hdr *)(raw_pkt + sizeof(struct ether_hdr));\n \n \t\tether->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);\n@@ -784,7 +784,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \n \t/* fill the L4 head */\n \tswitch (fdir_input->flow_type) {\n-\tcase RTE_ETH_FLOW_TYPE_UDPV4:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_UDP:\n \t\tudp = (struct udp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t\tsizeof(struct ipv4_hdr));\n \t\tpayload = (unsigned char *)udp + sizeof(struct udp_hdr);\n@@ -798,7 +798,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\tudp->dgram_len = rte_cpu_to_be_16(I40E_FDIR_UDP_DEFAULT_LEN);\n \t\tbreak;\n \n-\tcase RTE_ETH_FLOW_TYPE_TCPV4:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_TCP:\n \t\ttcp = (struct tcp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t\t\t sizeof(struct ipv4_hdr));\n \t\tpayload = (unsigned char *)tcp + sizeof(struct tcp_hdr);\n@@ -812,21 +812,21 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\ttcp->data_off = I40E_FDIR_TCP_DEFAULT_DATAOFF;\n \t\tbreak;\n \n-\tcase RTE_ETH_FLOW_TYPE_SCTPV4:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP:\n \t\tsctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t\t\t   sizeof(struct ipv4_hdr));\n \t\tpayload = (unsigned char *)sctp + sizeof(struct sctp_hdr);\n \t\tsctp->tag = fdir_input->flow.sctp4_flow.verify_tag;\n \t\tbreak;\n \n-\tcase RTE_ETH_FLOW_TYPE_IPV4_OTHER:\n-\tcase RTE_ETH_FLOW_TYPE_FRAG_IPV4:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER:\n+\tcase ETH_FLOW_TYPE_FRAG_IPV4:\n \t\tpayload = raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t  sizeof(struct ipv4_hdr);\n \t\tset_idx = I40E_FLXPLD_L3_IDX;\n \t\tbreak;\n \n-\tcase RTE_ETH_FLOW_TYPE_UDPV6:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_UDP:\n \t\tudp = (struct udp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t\t\t sizeof(struct ipv6_hdr));\n \t\tpayload = (unsigned char *)udp + sizeof(struct udp_hdr);\n@@ -840,7 +840,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\tudp->dgram_len = rte_cpu_to_be_16(I40E_FDIR_IPv6_PAYLOAD_LEN);\n \t\tbreak;\n \n-\tcase RTE_ETH_FLOW_TYPE_TCPV6:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_TCP:\n \t\ttcp = (struct tcp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t\t\t sizeof(struct ipv6_hdr));\n \t\tpayload = (unsigned char *)tcp + sizeof(struct tcp_hdr);\n@@ -854,15 +854,15 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\ttcp->dst_port = fdir_input->flow.udp6_flow.src_port;\n \t\tbreak;\n \n-\tcase RTE_ETH_FLOW_TYPE_SCTPV6:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP:\n \t\tsctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t\t\t   sizeof(struct ipv6_hdr));\n \t\tpayload = (unsigned char *)sctp + sizeof(struct sctp_hdr);\n \t\tsctp->tag = fdir_input->flow.sctp6_flow.verify_tag;\n \t\tbreak;\n \n-\tcase RTE_ETH_FLOW_TYPE_IPV6_OTHER:\n-\tcase RTE_ETH_FLOW_TYPE_FRAG_IPV6:\n+\tcase ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER:\n+\tcase ETH_FLOW_TYPE_FRAG_IPV6:\n \t\tpayload = raw_pkt + sizeof(struct ether_hdr) +\n \t\t\t  sizeof(struct ipv6_hdr);\n \t\tset_idx = I40E_FLXPLD_L3_IDX;\n@@ -1214,7 +1214,7 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,\n {\n \tstruct i40e_fdir_flex_mask *mask;\n \tstruct rte_eth_fdir_flex_mask *ptr = flex_mask;\n-\tenum rte_eth_flow_type flow_type;\n+\tuint16_t flow_type;\n \tuint8_t i, j;\n \tuint16_t off_bytes, mask_tmp;\n \n",
    "prefixes": [
        "dpdk-dev",
        "5/7"
    ]
}