* the second member is input set mask,
* the third member is ice_rss_hash_cfg template.
*/
-
-/* Supported pattern for os default package. */
-static struct ice_pattern_match_item ice_hash_pattern_list_os[] = {
- /* IPV4 */
- {pattern_eth_ipv4, ICE_RSS_TYPE_OUTER_IPV4, &ipv4_tmplt},
- {pattern_eth_ipv4_udp, ICE_RSS_TYPE_OUTER_IPV4_UDP, &ipv4_udp_tmplt},
- {pattern_eth_ipv4_tcp, ICE_RSS_TYPE_OUTER_IPV4_TCP, &ipv4_tcp_tmplt},
- {pattern_eth_ipv4_sctp, ICE_RSS_TYPE_OUTER_IPV4_SCTP, &ipv4_sctp_tmplt},
- /* IPV6 */
- {pattern_eth_ipv6, ICE_RSS_TYPE_OUTER_IPV6, &ipv6_tmplt},
- {pattern_eth_ipv6_udp, ICE_RSS_TYPE_OUTER_IPV6_UDP, &ipv6_udp_tmplt},
- {pattern_eth_ipv6_tcp, ICE_RSS_TYPE_OUTER_IPV6_TCP, &ipv6_tcp_tmplt},
- {pattern_eth_ipv6_sctp, ICE_RSS_TYPE_OUTER_IPV6_SCTP, &ipv6_sctp_tmplt},
- /* EMPTY */
- {pattern_empty, ICE_RSS_TYPE_EMPTY, &empty_tmplt},
-};
-
-/* Supported pattern for comms package. */
-static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
+static struct ice_pattern_match_item ice_hash_pattern_list[] = {
/* IPV4 */
{pattern_eth_ipv4, ICE_RSS_TYPE_OUTER_IPV4, &ipv4_tmplt},
{pattern_eth_ipv4_udp, ICE_RSS_TYPE_OUTER_IPV4_UDP, &ipv4_udp_tmplt},
};
/* Register parser for os package. */
-static struct ice_flow_parser ice_hash_parser_os = {
- .engine = &ice_hash_engine,
- .array = ice_hash_pattern_list_os,
- .array_len = RTE_DIM(ice_hash_pattern_list_os),
- .parse_pattern_action = ice_hash_parse_pattern_action,
- .stage = ICE_FLOW_STAGE_RSS,
-};
-
-/* Register parser for comms package. */
-static struct ice_flow_parser ice_hash_parser_comms = {
+static struct ice_flow_parser ice_hash_parser = {
.engine = &ice_hash_engine,
- .array = ice_hash_pattern_list_comms,
- .array_len = RTE_DIM(ice_hash_pattern_list_comms),
+ .array = ice_hash_pattern_list,
+ .array_len = RTE_DIM(ice_hash_pattern_list),
.parse_pattern_action = ice_hash_parse_pattern_action,
.stage = ICE_FLOW_STAGE_RSS,
};
if (ad->hw.dcf_enabled)
return 0;
- if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
- parser = &ice_hash_parser_os;
- else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
- parser = &ice_hash_parser_comms;
- else
- return -EINVAL;
+ parser = &ice_hash_parser;
return ice_register_parser(parser, ad);
}
}
/* Check rss supported pattern and find matched pattern. */
- pattern_match_item = ice_search_pattern_match_item(pattern,
- array, array_len, error);
+ pattern_match_item = ice_search_pattern_match_item(ad, pattern, array,
+ array_len, error);
if (!pattern_match_item) {
ret = -rte_errno;
goto error;
if (ad->hw.dcf_enabled)
return;
- if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
- ice_unregister_parser(&ice_hash_parser_os, ad);
- else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
- ice_unregister_parser(&ice_hash_parser_comms, ad);
+ ice_unregister_parser(&ice_hash_parser, ad);
}
static void