net/iavf: fix RSS protocol field selector
When VFs configure the rss rule by virtchnl, it need to set bit mask
into the field selector for the protocol, then PF got the configure
massage and parse the field selector to the corresponding protocol
field.
Fixes: 7be10c3004
("net/iavf: add RSS configuration for VF")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhiwei He <zhiwei.he@intel.com>
This commit is contained in:
parent
59d3870c7f
commit
c9da9d4183
@ -35,6 +35,12 @@ enum iavf_pattern_hint_type {
|
||||
IAVF_PATTERN_HINT_IPV6_SCTP,
|
||||
};
|
||||
|
||||
enum iavf_gtpu_hint {
|
||||
IAVF_GTPU_HINT_DOWNLINK,
|
||||
IAVF_GTPU_HINT_UPLINK,
|
||||
IAVF_GTPU_HINT_NONE,
|
||||
};
|
||||
|
||||
struct iavf_pattern_match_type {
|
||||
enum iavf_pattern_hint_type phint_type;
|
||||
};
|
||||
@ -43,6 +49,7 @@ struct iavf_hash_match_type {
|
||||
enum iavf_pattern_hint_type phint_type;
|
||||
uint64_t hash_type;
|
||||
struct virtchnl_proto_hdrs *proto_hdrs;
|
||||
enum iavf_gtpu_hint gtpu_hint;
|
||||
};
|
||||
|
||||
struct iavf_rss_meta {
|
||||
@ -147,9 +154,6 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {
|
||||
{iavf_pattern_empty, IAVF_INSET_NONE, &phint_empty},
|
||||
};
|
||||
|
||||
#define GTP_EH_PDU_LINK_UP 1
|
||||
#define GTP_EH_PDU_LINK_DWN 0
|
||||
|
||||
#define TUNNEL_LEVEL_OUTER 0
|
||||
#define TUNNEL_LEVEL_FIRST_INNER 1
|
||||
|
||||
@ -160,103 +164,112 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {
|
||||
#define BUFF_NOUSED 0
|
||||
#define FIELD_FOR_PROTO_ONLY 0
|
||||
|
||||
#define FIELD_SELECTOR(proto_hdr_field) \
|
||||
(1UL << ((proto_hdr_field) & PROTO_HDR_FIELD_MASK))
|
||||
|
||||
#define proto_hint_eth_src { \
|
||||
VIRTCHNL_PROTO_HDR_ETH, VIRTCHNL_PROTO_HDR_ETH_SRC, {BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC), \
|
||||
{BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_eth_dst { \
|
||||
VIRTCHNL_PROTO_HDR_ETH, VIRTCHNL_PROTO_HDR_ETH_DST, {BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST), \
|
||||
{BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_eth_only { \
|
||||
VIRTCHNL_PROTO_HDR_ETH, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_eth { \
|
||||
VIRTCHNL_PROTO_HDR_ETH, \
|
||||
VIRTCHNL_PROTO_HDR_ETH_SRC | VIRTCHNL_PROTO_HDR_ETH_DST, \
|
||||
{BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC) | \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_svlan { \
|
||||
VIRTCHNL_PROTO_HDR_S_VLAN, VIRTCHNL_PROTO_HDR_S_VLAN_ID, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_S_VLAN, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_S_VLAN_ID), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_cvlan { \
|
||||
VIRTCHNL_PROTO_HDR_C_VLAN, VIRTCHNL_PROTO_HDR_C_VLAN_ID, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_C_VLAN, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_C_VLAN_ID), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv4_src { \
|
||||
VIRTCHNL_PROTO_HDR_IPV4, VIRTCHNL_PROTO_HDR_IPV4_SRC, {BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC), \
|
||||
{BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv4_dst { \
|
||||
VIRTCHNL_PROTO_HDR_IPV4, VIRTCHNL_PROTO_HDR_IPV4_DST, {BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), \
|
||||
{BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv4_only { \
|
||||
VIRTCHNL_PROTO_HDR_IPV4, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv4 { \
|
||||
VIRTCHNL_PROTO_HDR_IPV4, \
|
||||
VIRTCHNL_PROTO_HDR_IPV4_SRC | VIRTCHNL_PROTO_HDR_IPV4_DST, \
|
||||
{BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_udp_src_port { \
|
||||
VIRTCHNL_PROTO_HDR_UDP, VIRTCHNL_PROTO_HDR_UDP_SRC_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_UDP, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_udp_dst_port { \
|
||||
VIRTCHNL_PROTO_HDR_UDP, VIRTCHNL_PROTO_HDR_UDP_DST_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_UDP, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_DST_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_udp_only { \
|
||||
VIRTCHNL_PROTO_HDR_UDP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_udp { \
|
||||
VIRTCHNL_PROTO_HDR_UDP, \
|
||||
VIRTCHNL_PROTO_HDR_UDP_SRC_PORT | VIRTCHNL_PROTO_HDR_UDP_DST_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT) | \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_DST_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_tcp_src_port { \
|
||||
VIRTCHNL_PROTO_HDR_TCP, VIRTCHNL_PROTO_HDR_TCP_SRC_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_TCP, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_SRC_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_tcp_dst_port { \
|
||||
VIRTCHNL_PROTO_HDR_TCP, VIRTCHNL_PROTO_HDR_TCP_DST_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_TCP, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_DST_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_tcp_only { \
|
||||
VIRTCHNL_PROTO_HDR_TCP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_tcp { \
|
||||
VIRTCHNL_PROTO_HDR_TCP, \
|
||||
VIRTCHNL_PROTO_HDR_TCP_SRC_PORT | VIRTCHNL_PROTO_HDR_TCP_DST_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_SRC_PORT) | \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_DST_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_sctp_src_port { \
|
||||
VIRTCHNL_PROTO_HDR_SCTP, VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_SCTP, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_sctp_dst_port { \
|
||||
VIRTCHNL_PROTO_HDR_SCTP, VIRTCHNL_PROTO_HDR_SCTP_DST_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_SCTP, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_DST_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_sctp_only { \
|
||||
VIRTCHNL_PROTO_HDR_SCTP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_sctp { \
|
||||
VIRTCHNL_PROTO_HDR_SCTP, \
|
||||
VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT | VIRTCHNL_PROTO_HDR_SCTP_DST_PORT, \
|
||||
{BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT) | \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_DST_PORT), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv6_src { \
|
||||
VIRTCHNL_PROTO_HDR_IPV6, VIRTCHNL_PROTO_HDR_IPV6_SRC, {BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_IPV6, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC), \
|
||||
{BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv6_dst { \
|
||||
VIRTCHNL_PROTO_HDR_IPV6, VIRTCHNL_PROTO_HDR_IPV6_DST, {BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_IPV6, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), \
|
||||
{BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv6_only { \
|
||||
VIRTCHNL_PROTO_HDR_IPV6, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ipv6 { \
|
||||
VIRTCHNL_PROTO_HDR_IPV6, \
|
||||
VIRTCHNL_PROTO_HDR_IPV6_SRC | VIRTCHNL_PROTO_HDR_IPV6_DST, \
|
||||
{BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_gtpu_up_only { \
|
||||
VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP, \
|
||||
@ -268,18 +281,19 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {
|
||||
|
||||
#define proto_hint_esp { \
|
||||
VIRTCHNL_PROTO_HDR_ESP, \
|
||||
VIRTCHNL_PROTO_HDR_ESP_SPI, {BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ESP_SPI), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_ah { \
|
||||
VIRTCHNL_PROTO_HDR_AH, \
|
||||
VIRTCHNL_PROTO_HDR_AH_SPI, {BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_AH_SPI), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_l2tpv3 { \
|
||||
VIRTCHNL_PROTO_HDR_L2TPV3, \
|
||||
VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID, {BUFF_NOUSED } }
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID), {BUFF_NOUSED } }
|
||||
|
||||
#define proto_hint_pfcp { \
|
||||
VIRTCHNL_PROTO_HDR_PFCP, VIRTCHNL_PROTO_HDR_PFCP_SEID, {BUFF_NOUSED } }
|
||||
VIRTCHNL_PROTO_HDR_PFCP, \
|
||||
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_PFCP_SEID), {BUFF_NOUSED } }
|
||||
|
||||
struct virtchnl_proto_hdrs hdrs_hint_eth_src = {
|
||||
TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_eth_src }
|
||||
@ -314,6 +328,16 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_up = {
|
||||
proto_hint_ipv4_src }
|
||||
};
|
||||
|
||||
struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_dwn = {
|
||||
TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only,
|
||||
proto_hint_ipv4_src }
|
||||
};
|
||||
|
||||
struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_up = {
|
||||
TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only,
|
||||
proto_hint_ipv4_dst }
|
||||
};
|
||||
|
||||
struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_dwn = {
|
||||
TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only,
|
||||
proto_hint_ipv4_dst }
|
||||
@ -589,272 +613,333 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp = {
|
||||
* The first member is pattern hint type,
|
||||
* the second member is hash type,
|
||||
* the third member is virtchnl protocol hdrs.
|
||||
* the forth member is downlink/uplink type.
|
||||
*/
|
||||
struct iavf_hash_match_type iavf_hash_type_list[] = {
|
||||
/* IPV4 */
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY,
|
||||
&hdrs_hint_eth_src},
|
||||
&hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_DST_ONLY,
|
||||
&hdrs_hint_eth_dst},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH, &hdrs_hint_eth},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_S_VLAN, &hdrs_hint_svlan},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst},
|
||||
&hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH, &hdrs_hint_eth,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_S_VLAN, &hdrs_hint_svlan,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src},
|
||||
&hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_ESP, &hdrs_hint_ipv4_esp},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_AH, &hdrs_hint_ipv4_ah},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2TPV3, &hdrs_hint_ipv4_l2tpv3},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4, &hdrs_hint_ipv4},
|
||||
&hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_ESP, &hdrs_hint_ipv4_esp,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_AH, &hdrs_hint_ipv4_ah,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2TPV3, &hdrs_hint_ipv4_l2tpv3,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4, &hdrs_hint_ipv4,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
/* IPV4 UDP */
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src_udp_src_port},
|
||||
&hdrs_hint_ipv4_src_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_src_udp_dst_port},
|
||||
&hdrs_hint_ipv4_src_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_src_gtpu_up},
|
||||
&hdrs_hint_ipv4_src_gtpu_up, IAVF_GTPU_HINT_UPLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_src_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src},
|
||||
&hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_dst_udp_src_port},
|
||||
&hdrs_hint_ipv4_dst_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst_udp_dst_port},
|
||||
&hdrs_hint_ipv4_dst_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_dst_gtpu_dwn},
|
||||
&hdrs_hint_ipv4_dst_gtpu_up, IAVF_GTPU_HINT_UPLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_dst_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst},
|
||||
&hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src_udp_src_port},
|
||||
&hdrs_hint_ipv4_src_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_src_udp_dst_port},
|
||||
&hdrs_hint_ipv4_src_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_src_gtpu_up},
|
||||
&hdrs_hint_ipv4_src_gtpu_up, IAVF_GTPU_HINT_UPLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src},
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_src_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_dst_udp_src_port},
|
||||
&hdrs_hint_ipv4_dst_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst_udp_dst_port},
|
||||
&hdrs_hint_ipv4_dst_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_dst_gtpu_dwn},
|
||||
&hdrs_hint_ipv4_dst_gtpu_up, IAVF_GTPU_HINT_UPLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst},
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU,
|
||||
&hdrs_hint_ipv4_dst_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP |
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_udp_src_port},
|
||||
&hdrs_hint_ipv4_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_udp_dst_port},
|
||||
&hdrs_hint_ipv4_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_PFCP,
|
||||
&hdrs_hint_ipv4_pfcp},
|
||||
&hdrs_hint_ipv4_pfcp, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP,
|
||||
&hdrs_hint_ipv4_udp},
|
||||
&hdrs_hint_ipv4_udp, IAVF_GTPU_HINT_NONE},
|
||||
/* IPV4 TCP */
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src_tcp_src_port},
|
||||
&hdrs_hint_ipv4_src_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_src_tcp_dst_port},
|
||||
&hdrs_hint_ipv4_src_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src},
|
||||
&hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_dst_tcp_src_port},
|
||||
&hdrs_hint_ipv4_dst_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst_tcp_dst_port},
|
||||
&hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst},
|
||||
&hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src_tcp_src_port},
|
||||
&hdrs_hint_ipv4_src_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_src_tcp_dst_port},
|
||||
&hdrs_hint_ipv4_src_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP |
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src},
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_dst_tcp_src_port},
|
||||
&hdrs_hint_ipv4_dst_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst_tcp_dst_port},
|
||||
&hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP |
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst},
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_tcp_src_port},
|
||||
&hdrs_hint_ipv4_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_tcp_dst_port},
|
||||
&hdrs_hint_ipv4_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP,
|
||||
&hdrs_hint_ipv4_tcp},
|
||||
&hdrs_hint_ipv4_tcp, IAVF_GTPU_HINT_NONE},
|
||||
/* IPV4 SCTP */
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src_sctp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_src_sctp_dst_port},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_src_sctp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_src_sctp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_dst_sctp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst_sctp_dst_port},
|
||||
&hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_dst_sctp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_dst_sctp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst},
|
||||
&hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_src_sctp_src_port},
|
||||
&hdrs_hint_ipv4_src_sctp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_src_sctp_dst_port},
|
||||
&hdrs_hint_ipv4_src_sctp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP |
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src},
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_dst_sctp_src_port},
|
||||
&hdrs_hint_ipv4_dst_sctp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_dst_sctp_dst_port},
|
||||
&hdrs_hint_ipv4_dst_sctp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP |
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst},
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv4_sctp_src_port},
|
||||
&hdrs_hint_ipv4_sctp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv4_sctp_dst_port},
|
||||
&hdrs_hint_ipv4_sctp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP,
|
||||
&hdrs_hint_ipv4_sctp},
|
||||
&hdrs_hint_ipv4_sctp, IAVF_GTPU_HINT_NONE},
|
||||
/* IPV6 */
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_SRC_ONLY,
|
||||
&hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_DST_ONLY,
|
||||
&hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_SRC_ONLY,
|
||||
&hdrs_hint_eth_src},
|
||||
&hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_DST_ONLY,
|
||||
&hdrs_hint_eth_dst},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_ETH, &hdrs_hint_eth},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_S_VLAN, &hdrs_hint_svlan},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst},
|
||||
&hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_ETH,
|
||||
&hdrs_hint_eth, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_S_VLAN,
|
||||
&hdrs_hint_svlan, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN,
|
||||
&hdrs_hint_cvlan, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src},
|
||||
&hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_ESP, &hdrs_hint_ipv6_esp},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_AH, &hdrs_hint_ipv6_ah},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2TPV3, &hdrs_hint_ipv6_l2tpv3},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6, &hdrs_hint_ipv6},
|
||||
&hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_ESP,
|
||||
&hdrs_hint_ipv6_esp, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_AH,
|
||||
&hdrs_hint_ipv6_ah, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2TPV3,
|
||||
&hdrs_hint_ipv6_l2tpv3, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6,
|
||||
&hdrs_hint_ipv6, IAVF_GTPU_HINT_NONE},
|
||||
/* IPV6 UDP */
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src_udp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_src_udp_dst_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_udp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_udp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_dst_udp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst_udp_dst_port},
|
||||
&hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_udp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_udp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst},
|
||||
&hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src_udp_src_port},
|
||||
&hdrs_hint_ipv6_src_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_src_udp_dst_port},
|
||||
&hdrs_hint_ipv6_src_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP |
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src},
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_dst_udp_src_port},
|
||||
&hdrs_hint_ipv6_dst_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst_udp_dst_port},
|
||||
&hdrs_hint_ipv6_dst_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP |
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst},
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_udp_src_port},
|
||||
&hdrs_hint_ipv6_udp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_udp_dst_port},
|
||||
&hdrs_hint_ipv6_udp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_PFCP,
|
||||
&hdrs_hint_ipv6_pfcp},
|
||||
&hdrs_hint_ipv6_pfcp, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP,
|
||||
&hdrs_hint_ipv6_udp},
|
||||
&hdrs_hint_ipv6_udp, IAVF_GTPU_HINT_NONE},
|
||||
/* IPV6 TCP */
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src_tcp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_src_tcp_dst_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_tcp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_tcp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_dst_tcp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst_tcp_dst_port},
|
||||
&hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_tcp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_tcp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst},
|
||||
&hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src_tcp_src_port},
|
||||
&hdrs_hint_ipv6_src_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_src_tcp_dst_port},
|
||||
&hdrs_hint_ipv6_src_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP |
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src},
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_dst_tcp_src_port},
|
||||
&hdrs_hint_ipv6_dst_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst_tcp_dst_port},
|
||||
&hdrs_hint_ipv6_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP |
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst},
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_tcp_src_port},
|
||||
&hdrs_hint_ipv6_tcp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_tcp_dst_port},
|
||||
&hdrs_hint_ipv6_tcp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP,
|
||||
&hdrs_hint_ipv6_tcp},
|
||||
&hdrs_hint_ipv6_tcp, IAVF_GTPU_HINT_NONE},
|
||||
/* IPV6 SCTP */
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src_sctp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_src_sctp_dst_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_sctp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_sctp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_dst_sctp_src_port},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst_sctp_dst_port},
|
||||
&hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_sctp_src_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY |
|
||||
ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_sctp_dst_port,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst},
|
||||
&hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_src_sctp_src_port},
|
||||
&hdrs_hint_ipv6_src_sctp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP |
|
||||
ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_src_sctp_dst_port},
|
||||
&hdrs_hint_ipv6_src_sctp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP |
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src},
|
||||
ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_dst_sctp_src_port},
|
||||
&hdrs_hint_ipv6_dst_sctp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP |
|
||||
ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_dst_sctp_dst_port},
|
||||
&hdrs_hint_ipv6_dst_sctp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP |
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst},
|
||||
ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst,
|
||||
IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_SRC_ONLY,
|
||||
&hdrs_hint_ipv6_sctp_src_port},
|
||||
&hdrs_hint_ipv6_sctp_src_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_DST_ONLY,
|
||||
&hdrs_hint_ipv6_sctp_dst_port},
|
||||
&hdrs_hint_ipv6_sctp_dst_port, IAVF_GTPU_HINT_NONE},
|
||||
{IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP,
|
||||
&hdrs_hint_ipv6_sctp},
|
||||
&hdrs_hint_ipv6_sctp, IAVF_GTPU_HINT_NONE},
|
||||
};
|
||||
|
||||
struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] = {
|
||||
@ -969,8 +1054,9 @@ iavf_hash_check_inset(const struct rte_flow_item pattern[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
iavf_hash_refine_type(uint64_t rss_type, const struct rte_flow_item pattern[])
|
||||
static void
|
||||
iavf_hash_refine_type(uint64_t *rss_type, const struct rte_flow_item pattern[],
|
||||
enum iavf_gtpu_hint *gtpu_hint)
|
||||
{
|
||||
const struct rte_flow_item *item;
|
||||
|
||||
@ -978,14 +1064,13 @@ iavf_hash_refine_type(uint64_t rss_type, const struct rte_flow_item pattern[])
|
||||
if (item->type == RTE_FLOW_ITEM_TYPE_GTP_PSC) {
|
||||
const struct rte_flow_item_gtp_psc *psc = item->spec;
|
||||
|
||||
if (psc && (psc->pdu_type == GTP_EH_PDU_LINK_UP ||
|
||||
psc->pdu_type == GTP_EH_PDU_LINK_DWN)) {
|
||||
rss_type |= ETH_RSS_GTPU;
|
||||
if (psc && (psc->pdu_type == IAVF_GTPU_HINT_UPLINK ||
|
||||
psc->pdu_type == IAVF_GTPU_HINT_DOWNLINK)) {
|
||||
*rss_type |= ETH_RSS_GTPU;
|
||||
*gtpu_hint = psc->pdu_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rss_type;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -994,9 +1079,12 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,
|
||||
const struct rte_flow_action actions[],
|
||||
void **meta, struct rte_flow_error *error)
|
||||
{
|
||||
struct iavf_pattern_match_type *mt = (struct iavf_pattern_match_type *)
|
||||
(pattern_match_item->meta);
|
||||
struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
|
||||
uint32_t type_list_len = RTE_DIM(iavf_hash_type_list);
|
||||
struct iavf_hash_match_type *type_match_item;
|
||||
enum iavf_gtpu_hint gtpu_hint = IAVF_GTPU_HINT_NONE;
|
||||
enum rte_flow_action_type action_type;
|
||||
const struct rte_flow_action_rss *rss;
|
||||
const struct rte_flow_action *action;
|
||||
@ -1004,9 +1092,6 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,
|
||||
uint64_t rss_type;
|
||||
uint16_t i;
|
||||
|
||||
struct iavf_pattern_match_type *tt = (struct iavf_pattern_match_type *)
|
||||
(pattern_match_item->meta);
|
||||
|
||||
/* Supported action is RSS. */
|
||||
for (action = actions; action->type !=
|
||||
RTE_FLOW_ACTION_TYPE_END; action++) {
|
||||
@ -1026,7 +1111,7 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,
|
||||
* Refine the hash type base on some specific item of
|
||||
* the pattern, such as identify the gtpu hash.
|
||||
*/
|
||||
rss_type = iavf_hash_refine_type(rss_type, pattern);
|
||||
iavf_hash_refine_type(&rss_type, pattern, >pu_hint);
|
||||
|
||||
/* Check if pattern is empty. */
|
||||
if (pattern_match_item->pattern_list !=
|
||||
@ -1079,7 +1164,8 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,
|
||||
struct iavf_hash_match_type *ht_map =
|
||||
&iavf_hash_type_list[i];
|
||||
if (rss_type == ht_map->hash_type &&
|
||||
tt->phint_type == ht_map->phint_type) {
|
||||
mt->phint_type == ht_map->phint_type &&
|
||||
gtpu_hint == ht_map->gtpu_hint) {
|
||||
type_match_item->hash_type =
|
||||
ht_map->hash_type;
|
||||
type_match_item->proto_hdrs =
|
||||
|
Loading…
Reference in New Issue
Block a user