FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), {BUFF_NOUSED} }
+#define proto_hdr_ipv4_with_prot { \
+ VIRTCHNL_PROTO_HDR_IPV4, \
+ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \
+ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) | \
+ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), {BUFF_NOUSED} }
+
#define proto_hdr_ipv6 { \
VIRTCHNL_PROTO_HDR_IPV6, \
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), {BUFF_NOUSED} }
+#define proto_hdr_ipv6_with_prot { \
+ VIRTCHNL_PROTO_HDR_IPV6, \
+ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \
+ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST) | \
+ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), {BUFF_NOUSED} }
+
#define proto_hdr_udp { \
VIRTCHNL_PROTO_HDR_UDP, \
FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT) | \
struct virtchnl_proto_hdrs outer_ipv4_udp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4,
+ {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv4_with_prot,
proto_hdr_udp}
};
struct virtchnl_proto_hdrs outer_ipv4_tcp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4,
+ {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv4_with_prot,
proto_hdr_tcp}
};
struct virtchnl_proto_hdrs outer_ipv6_udp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6,
+ {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv6_with_prot,
proto_hdr_udp}
};
struct virtchnl_proto_hdrs outer_ipv6_tcp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6,
+ {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv6_with_prot,
proto_hdr_tcp}
};
};
struct virtchnl_proto_hdrs inner_ipv4_udp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4, proto_hdr_udp}
+ TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4_with_prot, proto_hdr_udp}
};
struct virtchnl_proto_hdrs inner_ipv4_tcp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4, proto_hdr_tcp}
+ TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4_with_prot, proto_hdr_tcp}
};
struct virtchnl_proto_hdrs inner_ipv4_sctp_tmplt = {
};
struct virtchnl_proto_hdrs inner_ipv6_udp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6, proto_hdr_udp}
+ TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6_with_prot, proto_hdr_udp}
};
struct virtchnl_proto_hdrs inner_ipv6_tcp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6, proto_hdr_tcp}
+ TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6_with_prot, proto_hdr_tcp}
};
struct virtchnl_proto_hdrs inner_ipv6_sctp_tmplt = {
ETH_RSS_NONFRAG_IPV4_UDP |
ETH_RSS_NONFRAG_IPV4_TCP |
ETH_RSS_NONFRAG_IPV4_SCTP)) {
- if (rss_type & ETH_RSS_L3_SRC_ONLY)
+ if (rss_type & ETH_RSS_L3_SRC_ONLY) {
REFINE_PROTO_FLD(DEL, IPV4_DST);
- else if (rss_type & ETH_RSS_L3_DST_ONLY)
+ } else if (rss_type & ETH_RSS_L3_DST_ONLY) {
REFINE_PROTO_FLD(DEL, IPV4_SRC);
- else if (rss_type &
+ } else if (rss_type &
(ETH_RSS_L4_SRC_ONLY |
- ETH_RSS_L4_DST_ONLY))
- hdr->field_selector = 0;
+ ETH_RSS_L4_DST_ONLY)) {
+ REFINE_PROTO_FLD(DEL, IPV4_DST);
+ REFINE_PROTO_FLD(DEL, IPV4_SRC);
+ }
} else {
hdr->field_selector = 0;
}
ETH_RSS_NONFRAG_IPV6_UDP |
ETH_RSS_NONFRAG_IPV6_TCP |
ETH_RSS_NONFRAG_IPV6_SCTP)) {
- if (rss_type & ETH_RSS_L3_SRC_ONLY)
+ if (rss_type & ETH_RSS_L3_SRC_ONLY) {
REFINE_PROTO_FLD(DEL, IPV6_DST);
- else if (rss_type & ETH_RSS_L3_DST_ONLY)
+ } else if (rss_type & ETH_RSS_L3_DST_ONLY) {
REFINE_PROTO_FLD(DEL, IPV6_SRC);
- else if (rss_type &
+ } else if (rss_type &
(ETH_RSS_L4_SRC_ONLY |
- ETH_RSS_L4_DST_ONLY))
- hdr->field_selector = 0;
+ ETH_RSS_L4_DST_ONLY)) {
+ REFINE_PROTO_FLD(DEL, IPV6_DST);
+ REFINE_PROTO_FLD(DEL, IPV6_SRC);
+ }
} else {
hdr->field_selector = 0;
}