From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5419C5B07 for ; Tue, 27 Jan 2015 06:20:42 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 26 Jan 2015 21:20:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,472,1418112000"; d="scan'208";a="657030117" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by fmsmga001.fm.intel.com with ESMTP; 26 Jan 2015 21:20:38 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 27 Jan 2015 13:20:37 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.231]) by shsmsx102.ccr.corp.intel.com ([169.254.2.238]) with mapi id 14.03.0195.001; Tue, 27 Jan 2015 13:20:36 +0800 From: "Zhang, Helin" To: Vithal S Mohare Thread-Topic: [dpdk-dev] [PATCH 5/7] ethdev: unification of flow types Thread-Index: AQHQM7UiJS1dmocdUUyZEyyPCRubSJzTbFxAgAAN1SA= Date: Tue, 27 Jan 2015 05:20:35 +0000 Message-ID: References: <1421650577-25969-1-git-send-email-helin.zhang@intel.com> <1421650577-25969-6-git-send-email-helin.zhang@intel.com> <98DB008FA2AC6644B40AD8C766FAB271014BDED15D@BOREAL.arubanetworks.com> In-Reply-To: <98DB008FA2AC6644B40AD8C766FAB271014BDED15D@BOREAL.arubanetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 05:20:43 -0000 Hi Vithal Exactly! Some types of NIC (e.g. i40e) support it. Regards, Helin > -----Original Message----- > From: Vithal S Mohare [mailto:vmohare@arubanetworks.com] > Sent: Tuesday, January 27, 2015 12:31 PM > To: Zhang, Helin > Subject: RE: [dpdk-dev] [PATCH 5/7] ethdev: unification of flow types >=20 > Hi Helin, >=20 > I see a new type *_L2_PAYLOAD added for RSS types. Is this for spraying = of > pure L2 packets (non-ip)? >=20 > Thanks, > -Vithal >=20 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Helin Zhang > Sent: Monday, January 19, 2015 12:26 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 5/7] ethdev: unification of flow types >=20 > Flow types was defined actually for i40e hardware specifically, and wasn'= t able > to be used for defining RSS offload types of all PMDs. It removed the enu= m flow > types, and uses macros instead with new names. The new macros can be used > for defining RSS offload types later. Also modifications are made in i40e= and > testpmd accordingly. >=20 > Signed-off-by: Helin Zhang > --- > app/test-pmd/cmdline.c | 88 > ++++++++++++++++++++++++--------------- > app/test-pmd/config.c | 71 +++++++++++++++++++++---------- > lib/librte_ether/rte_eth_ctrl.h | 55 ++++++++++++++---------- > lib/librte_pmd_i40e/i40e_ethdev.c | 68 +++++++++++++++++------------- > lib/librte_pmd_i40e/i40e_ethdev.h | 34 +++++++-------- > lib/librte_pmd_i40e/i40e_fdir.c | 84 ++++++++++++++++++---------------= ---- > 6 files changed, 235 insertions(+), 165 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > 4618b92..80b9c32 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -707,7 +707,7 @@ static void cmd_help_long_parsed(void > *parsed_result, > " get info of a flex filter.\n\n" >=20 > "flow_director_filter (port_id) (add|del)" > - " flow (ip4|ip4-frag|ip6|ip6-frag)" > + " flow (ipv4-other|ipv4-frag|ipv6-other|ipv6-frag)" > " src (src_ip_address) dst (dst_ip_address)" > " flexbytes (flexbytes_value)" > " (drop|fwd) queue (queue_id) fd_id (fd_id_value)\n" > @@ -733,7 +733,8 @@ static void cmd_help_long_parsed(void > *parsed_result, > " Flush all flow director entries of a device.\n\n" >=20 > "flow_director_flex_mask (port_id)" > - " flow > (ip4|ip4-frag|tcp4|udp4|sctp4|ip6|ip6-frag|tcp6|udp6|sctp6|all)" > + " flow (ipv4-other|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|" > + "ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|all)" > " (mask)\n" > " Configure mask of flex payload.\n\n" >=20 > @@ -8158,31 +8159,34 @@ parse_flexbytes(const char *q_arg, uint8_t > *flexbytes, uint16_t max_num) > return ret; > } >=20 > -static enum rte_eth_flow_type > +static uint16_t > str2flowtype(char *string) > { > uint8_t i =3D 0; > static const struct { > char str[32]; > - enum rte_eth_flow_type type; > + uint16_t type; > } flowtype_str[] =3D { > - {"ip4", RTE_ETH_FLOW_TYPE_IPV4_OTHER}, > - {"ip4-frag", RTE_ETH_FLOW_TYPE_FRAG_IPV4}, > - {"udp4", RTE_ETH_FLOW_TYPE_UDPV4}, > - {"tcp4", RTE_ETH_FLOW_TYPE_TCPV4}, > - {"sctp4", RTE_ETH_FLOW_TYPE_SCTPV4}, > - {"ip6", RTE_ETH_FLOW_TYPE_IPV6_OTHER}, > - {"ip6-frag", RTE_ETH_FLOW_TYPE_FRAG_IPV6}, > - {"udp6", RTE_ETH_FLOW_TYPE_UDPV6}, > - {"tcp6", RTE_ETH_FLOW_TYPE_TCPV6}, > - {"sctp6", RTE_ETH_FLOW_TYPE_TCPV6}, > + {"ipv4", ETH_FLOW_TYPE_IPV4}, > + {"ipv4-frag", ETH_FLOW_TYPE_FRAG_IPV4}, > + {"ipv4-tcp", ETH_FLOW_TYPE_NONFRAG_IPV4_TCP}, > + {"ipv4-udp", ETH_FLOW_TYPE_NONFRAG_IPV4_UDP}, > + {"ipv4-sctp", ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP}, > + {"ipv4-other", ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER}, > + {"ipv6", ETH_FLOW_TYPE_IPV6}, > + {"ipv6-frag", ETH_FLOW_TYPE_FRAG_IPV6}, > + {"ipv6-tcp", ETH_FLOW_TYPE_NONFRAG_IPV6_TCP}, > + {"ipv6-udp", ETH_FLOW_TYPE_NONFRAG_IPV6_UDP}, > + {"ipv6-sctp", ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP}, > + {"ipv6-other", ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER}, > + {"l2_payload", ETH_FLOW_TYPE_L2_PAYLOAD}, > }; >=20 > for (i =3D 0; i < RTE_DIM(flowtype_str); i++) { > if (!strcmp(flowtype_str[i].str, string)) > return flowtype_str[i].type; > } > - return RTE_ETH_FLOW_TYPE_NONE; > + return ETH_FLOW_TYPE_UNKNOWN; > } >=20 > #define IPV4_ADDR_TO_UINT(ip_addr, ip) \ @@ -8235,9 +8239,9 @@ > cmd_flow_director_filter_parsed(void *parsed_result, >=20 > entry.input.flow_type =3D str2flowtype(res->flow_type); > switch (entry.input.flow_type) { > - case RTE_ETH_FLOW_TYPE_IPV4_OTHER: > - case RTE_ETH_FLOW_TYPE_UDPV4: > - case RTE_ETH_FLOW_TYPE_TCPV4: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_UDP: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_TCP: > IPV4_ADDR_TO_UINT(res->ip_dst, > entry.input.flow.ip4_flow.dst_ip); > IPV4_ADDR_TO_UINT(res->ip_src, > @@ -8248,7 +8252,7 @@ cmd_flow_director_filter_parsed(void > *parsed_result, > entry.input.flow.udp4_flow.src_port =3D > rte_cpu_to_be_16(res->port_src); > break; > - case RTE_ETH_FLOW_TYPE_SCTPV4: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP: > IPV4_ADDR_TO_UINT(res->ip_dst, > entry.input.flow.sctp4_flow.ip.dst_ip); > IPV4_ADDR_TO_UINT(res->ip_src, > @@ -8257,9 +8261,9 @@ cmd_flow_director_filter_parsed(void > *parsed_result, > entry.input.flow.sctp4_flow.verify_tag =3D > rte_cpu_to_be_32(res->verify_tag_value); > break; > - case RTE_ETH_FLOW_TYPE_IPV6_OTHER: > - case RTE_ETH_FLOW_TYPE_UDPV6: > - case RTE_ETH_FLOW_TYPE_TCPV6: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_UDP: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_TCP: > IPV6_ADDR_TO_ARRAY(res->ip_dst, > entry.input.flow.ipv6_flow.dst_ip); > IPV6_ADDR_TO_ARRAY(res->ip_src, > @@ -8270,7 +8274,7 @@ cmd_flow_director_filter_parsed(void > *parsed_result, > entry.input.flow.udp6_flow.src_port =3D > rte_cpu_to_be_16(res->port_src); > break; > - case RTE_ETH_FLOW_TYPE_SCTPV6: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP: > IPV6_ADDR_TO_ARRAY(res->ip_dst, > entry.input.flow.sctp6_flow.ip.dst_ip); > IPV6_ADDR_TO_ARRAY(res->ip_src, > @@ -8321,9 +8325,8 @@ cmdline_parse_token_string_t > cmd_flow_director_flow =3D > flow, "flow"); > cmdline_parse_token_string_t cmd_flow_director_flow_type =3D > TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result, > - flow_type, > - "ip4#ip4-frag#tcp4#udp4#sctp4#" > - "ip6#ip6-frag#tcp6#udp6#sctp6"); > + flow_type, "ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#" > + "ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp"); > cmdline_parse_token_string_t cmd_flow_director_src =3D > TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result, > src, "src"); > @@ -8511,7 +8514,9 @@ cmd_flow_director_flex_mask_parsed(void > *parsed_result, > struct cmd_flow_director_flex_mask_result *res =3D parsed_result; > struct rte_eth_fdir_flex_mask flex_mask; > struct rte_port *port; > - enum rte_eth_flow_type i; > + struct rte_eth_fdir_info fdir_info; > + uint32_t flow_type_mask; > + uint16_t i; > int ret; >=20 > if (res->port_id > nb_ports) { > @@ -8534,10 +8539,23 @@ cmd_flow_director_flex_mask_parsed(void > *parsed_result, > printf("error: Cannot parse mask input.\n"); > return; > } > + > + memset(&fdir_info, 0, sizeof(fdir_info)); > + ret =3D rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_FDIR, > + RTE_ETH_FILTER_INFO, &fdir_info); > + if (ret < 0) { > + printf("Cannot get FDir filter info\n"); > + return; > + } > + flow_type_mask =3D fdir_info.flow_types_mask[0]; > if (!strcmp(res->flow_type, "all")) { > - for (i =3D RTE_ETH_FLOW_TYPE_UDPV4; > - i <=3D RTE_ETH_FLOW_TYPE_FRAG_IPV6; > - i++) { > + if (!flow_type_mask) { > + printf("No flow type supported\n"); > + return; > + } > + for (i =3D ETH_FLOW_TYPE_UNKNOWN; i < ETH_FLOW_TYPE_MAX; i++) > { > + if (!(flow_type_mask & (1 << i))) > + continue; > flex_mask.flow_type =3D i; > fdir_set_flex_mask(res->port_id, &flex_mask); > } > @@ -8545,6 +8563,11 @@ cmd_flow_director_flex_mask_parsed(void > *parsed_result, > return; > } > flex_mask.flow_type =3D str2flowtype(res->flow_type); > + if (!(flow_type_mask & (1 << flex_mask.flow_type))) { > + printf("Flow type %s not supported on port %d\n", > + res->flow_type, res->port_id); > + return; > + } > fdir_set_flex_mask(res->port_id, &flex_mask); > cmd_reconfig_device_queue(res->port_id, 1, 1); } @@ -8561,9 +8584,8 > @@ cmdline_parse_token_string_t cmd_flow_director_flexmask_flow =3D > flow, "flow"); > cmdline_parse_token_string_t cmd_flow_director_flexmask_flow_type =3D > TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result, > - flow_type, > - "ip4#ip4-frag#tcp4#udp4#sctp4#" > - "ip6#ip6-frag#tcp6#udp6#sctp6#all"); > + flow_type, "ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#" > + "ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#all"); > cmdline_parse_token_string_t cmd_flow_director_flexmask_mask =3D > TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result, > mask, NULL); > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index > 87dedf9..4c61a07 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -96,19 +96,7 @@ >=20 > #include "testpmd.h" >=20 > -static const char *flowtype_str[RTE_ETH_FLOW_TYPE_MAX] =3D { > - NULL, > - "udp4", > - "tcp4", > - "sctp4", > - "ip4", > - "ip4-frag", > - "udp6", > - "tcp6", > - "sctp6", > - "ip6", > - "ip6-frag", > -}; > +static char *flowtype_to_str(uint16_t flow_type); >=20 > static void > print_ethaddr(const char *name, struct ether_addr *eth_addr) @@ -1843,15 > +1831,50 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_c= onf) > printf("\n"); > } >=20 > +static char * > +flowtype_to_str(uint16_t flow_type) > +{ > + struct flow_type_info { > + char str[32]; > + uint16_t ftype; > + }; > + > + uint8_t i; > + static struct flow_type_info flowtype_str_table[] =3D { > + {"ipv4", ETH_FLOW_TYPE_IPV4}, > + {"ipv4-frag", ETH_FLOW_TYPE_FRAG_IPV4}, > + {"ipv4-tcp", ETH_FLOW_TYPE_NONFRAG_IPV4_TCP}, > + {"ipv4-udp", ETH_FLOW_TYPE_NONFRAG_IPV4_UDP}, > + {"ipv4-sctp", ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP}, > + {"ipv4-other", ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER}, > + {"ipv6", ETH_FLOW_TYPE_IPV6}, > + {"ipv6-frag", ETH_FLOW_TYPE_FRAG_IPV6}, > + {"ipv6-tcp", ETH_FLOW_TYPE_NONFRAG_IPV6_TCP}, > + {"ipv6-udp", ETH_FLOW_TYPE_NONFRAG_IPV6_UDP}, > + {"ipv6-sctp", ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP}, > + {"ipv6-other", ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER}, > + {"l2_payload", ETH_FLOW_TYPE_L2_PAYLOAD}, > + }; > + > + for (i =3D 0; i < RTE_DIM(flowtype_str_table); i++) { > + if (flowtype_str_table[i].ftype =3D=3D flow_type) > + return flowtype_str_table[i].str; > + } > + > + return NULL; > +} > + > static inline void > print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf) { > struct rte_eth_fdir_flex_mask *mask; > int i, j; > + char *p; >=20 > for (i =3D 0; i < flex_conf->nb_flexmasks; i++) { > mask =3D &flex_conf->flex_mask[i]; > - printf("\n %s:\t", flowtype_str[mask->flow_type]); > + p =3D flowtype_to_str(mask->flow_type); > + printf("\n %s:\t", p ? p : "unknown"); > for (j =3D 0; j < RTE_ETH_FDIR_MAX_FLEXLEN; j++) > printf(" %02x", mask->mask[j]); > } > @@ -1861,13 +1884,17 @@ print_fdir_flex_mask(struct > rte_eth_fdir_flex_conf *flex_conf) static inline void > print_fdir_flow_type(uint32_t flow_types_mask) { > - int i =3D 0; > + int i; > + char *p; >=20 > - for (i =3D RTE_ETH_FLOW_TYPE_UDPV4; > - i <=3D RTE_ETH_FLOW_TYPE_FRAG_IPV6; > - i++) { > - if (flow_types_mask & (1 << i)) > - printf(" %s", flowtype_str[i]); > + for (i =3D ETH_FLOW_TYPE_UNKNOWN; i < ETH_FLOW_TYPE_MAX; i++) { > + if (!(flow_types_mask & (1 << i))) > + continue; > + p =3D flowtype_to_str(i); > + if (p) > + printf(" %s", p); > + else > + printf(" unknown"); > } > printf("\n"); > } > @@ -2028,13 +2055,13 @@ fdir_set_flex_mask(portid_t port_id, struct > rte_eth_fdir_flex_mask *cfg) >=20 > port =3D &ports[port_id]; > flex_conf =3D &port->dev_conf.fdir_conf.flex_conf; > - for (i =3D 0; i < RTE_ETH_FLOW_TYPE_MAX; i++) { > + for (i =3D 0; i < ETH_FLOW_TYPE_MAX; i++) { > if (cfg->flow_type =3D=3D flex_conf->flex_mask[i].flow_type) { > idx =3D i; > break; > } > } > - if (i >=3D RTE_ETH_FLOW_TYPE_MAX) { > + if (i >=3D ETH_FLOW_TYPE_MAX) { > if (flex_conf->nb_flexmasks < RTE_DIM(flex_conf->flex_mask)) { > idx =3D flex_conf->nb_flexmasks; > flex_conf->nb_flexmasks++; > diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_c= trl.h index > 1c15ed0..f2b39fc 100644 > --- a/lib/librte_ether/rte_eth_ctrl.h > +++ b/lib/librte_ether/rte_eth_ctrl.h > @@ -46,6 +46,35 @@ > extern "C" { > #endif >=20 > +/* > + * A packet can be identified by hardware as different flow types. > +Different > + * NIC hardwares may support different flow types. > + * Basically, the NIC hardware identifies the flow type as deep > +protocol as > + * possible, and exclusively. For example, if a packet is identified as > + * 'ETH_FLOW_TYPE_NONFRAG_IPV4_TCP', it will not be any of other flow > +types, > + * though it is an actual IPV4 packet. > + * Note that the flow types are used to define RSS offload types in > + * rte_ethdev.h. > + */ > +#define ETH_FLOW_TYPE_UNKNOWN 0 > +#define ETH_FLOW_TYPE_IPV4 1 > +#define ETH_FLOW_TYPE_FRAG_IPV4 2 > +#define ETH_FLOW_TYPE_NONFRAG_IPV4_TCP 3 > +#define ETH_FLOW_TYPE_NONFRAG_IPV4_UDP 4 > +#define ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP 5 #define > +ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER 6 > +#define ETH_FLOW_TYPE_IPV6 7 > +#define ETH_FLOW_TYPE_FRAG_IPV6 8 > +#define ETH_FLOW_TYPE_NONFRAG_IPV6_TCP 9 > +#define ETH_FLOW_TYPE_NONFRAG_IPV6_UDP 10 > +#define ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP 11 #define > +ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER 12 > +#define ETH_FLOW_TYPE_L2_PAYLOAD 13 > +#define ETH_FLOW_TYPE_IPV6_EX 14 > +#define ETH_FLOW_TYPE_IPV6_TCP_EX 15 > +#define ETH_FLOW_TYPE_IPV6_UDP_EX 16 > +#define ETH_FLOW_TYPE_MAX 17 > + > /** > * Feature filter types > */ > @@ -179,24 +208,6 @@ struct rte_eth_tunnel_filter_conf { > #define RTE_ETH_FDIR_MAX_FLEXLEN 16 /** < Max length of > flexbytes. */ >=20 > /** > - * Flow type > - */ > -enum rte_eth_flow_type { > - RTE_ETH_FLOW_TYPE_NONE =3D 0, > - RTE_ETH_FLOW_TYPE_UDPV4, > - RTE_ETH_FLOW_TYPE_TCPV4, > - RTE_ETH_FLOW_TYPE_SCTPV4, > - RTE_ETH_FLOW_TYPE_IPV4_OTHER, > - RTE_ETH_FLOW_TYPE_FRAG_IPV4, > - RTE_ETH_FLOW_TYPE_UDPV6, > - RTE_ETH_FLOW_TYPE_TCPV6, > - RTE_ETH_FLOW_TYPE_SCTPV6, > - RTE_ETH_FLOW_TYPE_IPV6_OTHER, > - RTE_ETH_FLOW_TYPE_FRAG_IPV6, > - RTE_ETH_FLOW_TYPE_MAX =3D 64, > -}; > - > -/** > * A structure used to define the input for IPV4 flow > */ > struct rte_eth_ipv4_flow { > @@ -291,7 +302,7 @@ struct rte_eth_fdir_flow_ext { > * A structure used to define the input for a flow director filter entry > */ > struct rte_eth_fdir_input { > - enum rte_eth_flow_type flow_type; /**< Type of flow */ > + uint16_t flow_type; /**< Type of flow */ > union rte_eth_fdir_flow flow; > /**< Flow fields to match, dependent on flow_type */ > struct rte_eth_fdir_flow_ext flow_ext; @@ -371,7 +382,7 @@ struct > rte_eth_flex_payload_cfg { > * for each flow type > */ > struct rte_eth_fdir_flex_mask { > - enum rte_eth_flow_type flow_type; /**< Flow type */ > + uint16_t flow_type; /**< Flow type */ > uint8_t mask[RTE_ETH_FDIR_MAX_FLEXLEN]; > /**< Mask for the whole flexible payload */ }; @@ -385,7 +396,7 @@ > struct rte_eth_fdir_flex_conf { > uint16_t nb_flexmasks; /**< The number of following mask */ > struct rte_eth_flex_payload_cfg flex_set[RTE_ETH_PAYLOAD_MAX]; > /**< Flex payload configuration for each payload type */ > - struct rte_eth_fdir_flex_mask flex_mask[RTE_ETH_FLOW_TYPE_MAX]; > + struct rte_eth_fdir_flex_mask flex_mask[ETH_FLOW_TYPE_MAX]; > /**< Flex mask configuration for each flow type */ }; >=20 > @@ -400,7 +411,7 @@ enum rte_fdir_mode { >=20 > #define UINT32_BIT (CHAR_BIT * sizeof(uint32_t)) #define > RTE_FLOW_TYPE_MASK_ARRAY_SIZE \ > - (RTE_ALIGN(RTE_ETH_FLOW_TYPE_MAX, UINT32_BIT)/UINT32_BIT) > + (RTE_ALIGN(ETH_FLOW_TYPE_MAX, UINT32_BIT)/UINT32_BIT) >=20 > /** > * A structure used to get the information of flow director filter. > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c > b/lib/librte_pmd_i40e/i40e_ethdev.c > index b47a3d2..de1eff4 100644 > --- a/lib/librte_pmd_i40e/i40e_ethdev.c > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c > @@ -5261,46 +5261,56 @@ i40e_dev_filter_ctrl(struct rte_eth_dev *dev, } >=20 > enum i40e_filter_pctype > -i40e_flowtype_to_pctype(enum rte_eth_flow_type flow_type) > +i40e_flowtype_to_pctype(uint16_t flow_type) > { > static const enum i40e_filter_pctype pctype_table[] =3D { > - [RTE_ETH_FLOW_TYPE_UDPV4] =3D > I40E_FILTER_PCTYPE_NONF_IPV4_UDP, > - [RTE_ETH_FLOW_TYPE_TCPV4] =3D > I40E_FILTER_PCTYPE_NONF_IPV4_TCP, > - [RTE_ETH_FLOW_TYPE_SCTPV4] =3D > I40E_FILTER_PCTYPE_NONF_IPV4_SCTP, > - [RTE_ETH_FLOW_TYPE_IPV4_OTHER] =3D > - I40E_FILTER_PCTYPE_NONF_IPV4_OTHER, > - [RTE_ETH_FLOW_TYPE_FRAG_IPV4] =3D > - I40E_FILTER_PCTYPE_FRAG_IPV4, > - [RTE_ETH_FLOW_TYPE_UDPV6] =3D > I40E_FILTER_PCTYPE_NONF_IPV6_UDP, > - [RTE_ETH_FLOW_TYPE_TCPV6] =3D > I40E_FILTER_PCTYPE_NONF_IPV6_TCP, > - [RTE_ETH_FLOW_TYPE_SCTPV6] =3D > I40E_FILTER_PCTYPE_NONF_IPV6_SCTP, > - [RTE_ETH_FLOW_TYPE_IPV6_OTHER] =3D > - I40E_FILTER_PCTYPE_NONF_IPV6_OTHER, > - [RTE_ETH_FLOW_TYPE_FRAG_IPV6] =3D > - I40E_FILTER_PCTYPE_FRAG_IPV6, > + [ETH_FLOW_TYPE_FRAG_IPV4] =3D I40E_FILTER_PCTYPE_FRAG_IPV4, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_UDP] =3D > + I40E_FILTER_PCTYPE_NONF_IPV4_UDP, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_TCP] =3D > + I40E_FILTER_PCTYPE_NONF_IPV4_TCP, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP] =3D > + I40E_FILTER_PCTYPE_NONF_IPV4_SCTP, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER] =3D > + I40E_FILTER_PCTYPE_NONF_IPV4_OTHER, > + [ETH_FLOW_TYPE_FRAG_IPV6] =3D I40E_FILTER_PCTYPE_FRAG_IPV6, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_UDP] =3D > + I40E_FILTER_PCTYPE_NONF_IPV6_UDP, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_TCP] =3D > + I40E_FILTER_PCTYPE_NONF_IPV6_TCP, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP] =3D > + I40E_FILTER_PCTYPE_NONF_IPV6_SCTP, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER] =3D > + I40E_FILTER_PCTYPE_NONF_IPV6_OTHER, > + [ETH_FLOW_TYPE_L2_PAYLOAD] =3D > I40E_FILTER_PCTYPE_L2_PAYLOAD, > }; >=20 > return pctype_table[flow_type]; > } >=20 > -enum rte_eth_flow_type > +uint16_t > i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype) { > - static const enum rte_eth_flow_type flowtype_table[] =3D { > - [I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =3D > RTE_ETH_FLOW_TYPE_UDPV4, > - [I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =3D > RTE_ETH_FLOW_TYPE_TCPV4, > - [I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =3D > RTE_ETH_FLOW_TYPE_SCTPV4, > + static const uint16_t flowtype_table[] =3D { > + [I40E_FILTER_PCTYPE_FRAG_IPV4] =3D ETH_FLOW_TYPE_FRAG_IPV4, > + [I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =3D > + ETH_FLOW_TYPE_NONFRAG_IPV4_UDP, > + [I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =3D > + ETH_FLOW_TYPE_NONFRAG_IPV4_TCP, > + [I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =3D > + ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP, > [I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =3D > - RTE_ETH_FLOW_TYPE_IPV4_OTHER, > - [I40E_FILTER_PCTYPE_FRAG_IPV4] =3D > - RTE_ETH_FLOW_TYPE_FRAG_IPV4, > - [I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =3D > RTE_ETH_FLOW_TYPE_UDPV6, > - [I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =3D > RTE_ETH_FLOW_TYPE_TCPV6, > - [I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =3D > RTE_ETH_FLOW_TYPE_SCTPV6, > + ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER, > + [I40E_FILTER_PCTYPE_FRAG_IPV6] =3D ETH_FLOW_TYPE_FRAG_IPV6, > + [I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =3D > + ETH_FLOW_TYPE_NONFRAG_IPV6_UDP, > + [I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =3D > + ETH_FLOW_TYPE_NONFRAG_IPV6_TCP, > + [I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =3D > + ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP, > [I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =3D > - RTE_ETH_FLOW_TYPE_IPV6_OTHER, > - [I40E_FILTER_PCTYPE_FRAG_IPV6] =3D > - RTE_ETH_FLOW_TYPE_FRAG_IPV6, > + ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER, > + [I40E_FILTER_PCTYPE_L2_PAYLOAD] =3D > ETH_FLOW_TYPE_L2_PAYLOAD, > }; >=20 > return flowtype_table[pctype]; > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.h > b/lib/librte_pmd_i40e/i40e_ethdev.h > index f913ea9..e2a8db3 100644 > --- a/lib/librte_pmd_i40e/i40e_ethdev.h > +++ b/lib/librte_pmd_i40e/i40e_ethdev.h > @@ -471,10 +471,8 @@ const struct rte_memzone > *i40e_memzone_reserve(const char *name, > int socket_id); > int i40e_fdir_configure(struct rte_eth_dev *dev); void > i40e_fdir_teardown(struct i40e_pf *pf); -enum i40e_filter_pctype > i40e_flowtype_to_pctype( > - enum rte_eth_flow_type flow_type); > -enum rte_eth_flow_type i40e_pctype_to_flowtype( > - enum i40e_filter_pctype pctype); > +enum i40e_filter_pctype i40e_flowtype_to_pctype(uint16_t flow_type); > +uint16_t i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype); > int i40e_fdir_ctrl_func(struct rte_eth_dev *dev, > enum rte_filter_op filter_op, > void *arg); > @@ -541,27 +539,29 @@ i40e_init_adminq_parameter(struct i40e_hw > *hw) } >=20 > #define I40E_VALID_FLOW_TYPE(flow_type) \ > - ((flow_type) =3D=3D RTE_ETH_FLOW_TYPE_UDPV4 || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_TCPV4 || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_SCTPV4 || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_IPV4_OTHER || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_FRAG_IPV4 || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_UDPV6 || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_TCPV6 || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_SCTPV6 || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_IPV6_OTHER || \ > - (flow_type) =3D=3D RTE_ETH_FLOW_TYPE_FRAG_IPV6) > + ((flow_type) =3D=3D ETH_FLOW_TYPE_FRAG_IPV4 || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV4_TCP || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV4_UDP || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_FRAG_IPV6 || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV6_TCP || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV6_UDP || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER || \ > + (flow_type) =3D=3D ETH_FLOW_TYPE_L2_PAYLOAD) >=20 > #define I40E_VALID_PCTYPE(pctype) \ > - ((pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV4_UDP || \ > + ((pctype) =3D=3D I40E_FILTER_PCTYPE_FRAG_IPV4 || \ > (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV4_TCP || \ > + (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV4_UDP || \ > (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV4_SCTP || \ > (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV4_OTHER || \ > - (pctype) =3D=3D I40E_FILTER_PCTYPE_FRAG_IPV4 || \ > + (pctype) =3D=3D I40E_FILTER_PCTYPE_FRAG_IPV6 || \ > (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV6_UDP || \ > (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV6_TCP || \ > (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV6_SCTP || \ > (pctype) =3D=3D I40E_FILTER_PCTYPE_NONF_IPV6_OTHER || \ > - (pctype) =3D=3D I40E_FILTER_PCTYPE_FRAG_IPV6) > + (pctype) =3D=3D I40E_FILTER_PCTYPE_L2_PAYLOAD) >=20 > #endif /* _I40E_ETHDEV_H_ */ > diff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_f= dir.c > index c9e535b..9bdcabf 100644 > --- a/lib/librte_pmd_i40e/i40e_fdir.c > +++ b/lib/librte_pmd_i40e/i40e_fdir.c > @@ -95,16 +95,16 @@ > I40E_PRTQF_FLX_PIT_DEST_OFF_MASK)) >=20 > #define I40E_FDIR_FLOW_TYPES ( \ > - (1 << RTE_ETH_FLOW_TYPE_UDPV4) | \ > - (1 << RTE_ETH_FLOW_TYPE_TCPV4) | \ > - (1 << RTE_ETH_FLOW_TYPE_SCTPV4) | \ > - (1 << RTE_ETH_FLOW_TYPE_IPV4_OTHER) | \ > - (1 << RTE_ETH_FLOW_TYPE_FRAG_IPV4) | \ > - (1 << RTE_ETH_FLOW_TYPE_UDPV6) | \ > - (1 << RTE_ETH_FLOW_TYPE_TCPV6) | \ > - (1 << RTE_ETH_FLOW_TYPE_SCTPV6) | \ > - (1 << RTE_ETH_FLOW_TYPE_IPV6_OTHER) | \ > - (1 << RTE_ETH_FLOW_TYPE_FRAG_IPV6)) > + (1 << ETH_FLOW_TYPE_FRAG_IPV4) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV4_UDP) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV4_TCP) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER) | \ > + (1 << ETH_FLOW_TYPE_FRAG_IPV6) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV6_UDP) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV6_TCP) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP) | \ > + (1 << ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER)) >=20 > #define I40E_FLEX_WORD_MASK(off) (0x80 >> (off)) >=20 > @@ -498,7 +498,7 @@ i40e_check_fdir_flex_conf(const struct > rte_eth_fdir_flex_conf *conf) > } >=20 > /* check flex mask setting configuration */ > - if (conf->nb_flexmasks > RTE_ETH_FLOW_TYPE_FRAG_IPV6) { > + if (conf->nb_flexmasks >=3D ETH_FLOW_TYPE_MAX) { > PMD_DRV_LOG(ERR, "invalid number of flex masks."); > return -EINVAL; > } > @@ -692,24 +692,24 @@ i40e_fdir_fill_eth_ip_head(const struct > rte_eth_fdir_input *fdir_input, > struct ipv4_hdr *ip; > struct ipv6_hdr *ip6; > static const uint8_t next_proto[] =3D { > - [RTE_ETH_FLOW_TYPE_UDPV4] =3D IPPROTO_UDP, > - [RTE_ETH_FLOW_TYPE_TCPV4] =3D IPPROTO_TCP, > - [RTE_ETH_FLOW_TYPE_SCTPV4] =3D IPPROTO_SCTP, > - [RTE_ETH_FLOW_TYPE_IPV4_OTHER] =3D IPPROTO_IP, > - [RTE_ETH_FLOW_TYPE_FRAG_IPV4] =3D IPPROTO_IP, > - [RTE_ETH_FLOW_TYPE_UDPV6] =3D IPPROTO_UDP, > - [RTE_ETH_FLOW_TYPE_TCPV6] =3D IPPROTO_TCP, > - [RTE_ETH_FLOW_TYPE_SCTPV6] =3D IPPROTO_SCTP, > - [RTE_ETH_FLOW_TYPE_IPV6_OTHER] =3D IPPROTO_NONE, > - [RTE_ETH_FLOW_TYPE_FRAG_IPV6] =3D IPPROTO_NONE, > + [ETH_FLOW_TYPE_FRAG_IPV4] =3D IPPROTO_IP, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_TCP] =3D IPPROTO_TCP, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_UDP] =3D IPPROTO_UDP, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP] =3D IPPROTO_SCTP, > + [ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER] =3D IPPROTO_IP, > + [ETH_FLOW_TYPE_FRAG_IPV6] =3D IPPROTO_NONE, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_TCP] =3D IPPROTO_TCP, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_UDP] =3D IPPROTO_UDP, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP] =3D IPPROTO_SCTP, > + [ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER] =3D IPPROTO_NONE, > }; >=20 > switch (fdir_input->flow_type) { > - case RTE_ETH_FLOW_TYPE_UDPV4: > - case RTE_ETH_FLOW_TYPE_TCPV4: > - case RTE_ETH_FLOW_TYPE_SCTPV4: > - case RTE_ETH_FLOW_TYPE_IPV4_OTHER: > - case RTE_ETH_FLOW_TYPE_FRAG_IPV4: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_TCP: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_UDP: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER: > + case ETH_FLOW_TYPE_FRAG_IPV4: > ip =3D (struct ipv4_hdr *)(raw_pkt + sizeof(struct ether_hdr)); >=20 > ether->ether_type =3D rte_cpu_to_be_16(ETHER_TYPE_IPv4); > @@ -726,11 +726,11 @@ i40e_fdir_fill_eth_ip_head(const struct > rte_eth_fdir_input *fdir_input, > ip->dst_addr =3D fdir_input->flow.ip4_flow.src_ip; > ip->next_proto_id =3D next_proto[fdir_input->flow_type]; > break; > - case RTE_ETH_FLOW_TYPE_UDPV6: > - case RTE_ETH_FLOW_TYPE_TCPV6: > - case RTE_ETH_FLOW_TYPE_SCTPV6: > - case RTE_ETH_FLOW_TYPE_IPV6_OTHER: > - case RTE_ETH_FLOW_TYPE_FRAG_IPV6: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_TCP: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_UDP: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER: > + case ETH_FLOW_TYPE_FRAG_IPV6: > ip6 =3D (struct ipv6_hdr *)(raw_pkt + sizeof(struct ether_hdr)); >=20 > ether->ether_type =3D rte_cpu_to_be_16(ETHER_TYPE_IPv6); > @@ -784,7 +784,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, >=20 > /* fill the L4 head */ > switch (fdir_input->flow_type) { > - case RTE_ETH_FLOW_TYPE_UDPV4: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_UDP: > udp =3D (struct udp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv4_hdr)); > payload =3D (unsigned char *)udp + sizeof(struct udp_hdr); @@ -798,7 > +798,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, > udp->dgram_len =3D > rte_cpu_to_be_16(I40E_FDIR_UDP_DEFAULT_LEN); > break; >=20 > - case RTE_ETH_FLOW_TYPE_TCPV4: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_TCP: > tcp =3D (struct tcp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv4_hdr)); > payload =3D (unsigned char *)tcp + sizeof(struct tcp_hdr); @@ -812,21 > +812,21 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, > tcp->data_off =3D I40E_FDIR_TCP_DEFAULT_DATAOFF; > break; >=20 > - case RTE_ETH_FLOW_TYPE_SCTPV4: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP: > sctp =3D (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv4_hdr)); > payload =3D (unsigned char *)sctp + sizeof(struct sctp_hdr); > sctp->tag =3D fdir_input->flow.sctp4_flow.verify_tag; > break; >=20 > - case RTE_ETH_FLOW_TYPE_IPV4_OTHER: > - case RTE_ETH_FLOW_TYPE_FRAG_IPV4: > + case ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER: > + case ETH_FLOW_TYPE_FRAG_IPV4: > payload =3D raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv4_hdr); > set_idx =3D I40E_FLXPLD_L3_IDX; > break; >=20 > - case RTE_ETH_FLOW_TYPE_UDPV6: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_UDP: > udp =3D (struct udp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv6_hdr)); > payload =3D (unsigned char *)udp + sizeof(struct udp_hdr); @@ -840,7 > +840,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, > udp->dgram_len =3D > rte_cpu_to_be_16(I40E_FDIR_IPv6_PAYLOAD_LEN); > break; >=20 > - case RTE_ETH_FLOW_TYPE_TCPV6: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_TCP: > tcp =3D (struct tcp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv6_hdr)); > payload =3D (unsigned char *)tcp + sizeof(struct tcp_hdr); @@ -854,15 > +854,15 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, > tcp->dst_port =3D fdir_input->flow.udp6_flow.src_port; > break; >=20 > - case RTE_ETH_FLOW_TYPE_SCTPV6: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP: > sctp =3D (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv6_hdr)); > payload =3D (unsigned char *)sctp + sizeof(struct sctp_hdr); > sctp->tag =3D fdir_input->flow.sctp6_flow.verify_tag; > break; >=20 > - case RTE_ETH_FLOW_TYPE_IPV6_OTHER: > - case RTE_ETH_FLOW_TYPE_FRAG_IPV6: > + case ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER: > + case ETH_FLOW_TYPE_FRAG_IPV6: > payload =3D raw_pkt + sizeof(struct ether_hdr) + > sizeof(struct ipv6_hdr); > set_idx =3D I40E_FLXPLD_L3_IDX; > @@ -1214,7 +1214,7 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf, { > struct i40e_fdir_flex_mask *mask; > struct rte_eth_fdir_flex_mask *ptr =3D flex_mask; > - enum rte_eth_flow_type flow_type; > + uint16_t flow_type; > uint8_t i, j; > uint16_t off_bytes, mask_tmp; >=20 > -- > 1.9.3