#define IAVF_PHINT_GTPU_EH_UP BIT_ULL(3)
#define IAVF_PHINT_OUTER_IPV4 BIT_ULL(4)
#define IAVF_PHINT_OUTER_IPV6 BIT_ULL(5)
+#define IAVF_PHINT_GRE BIT_ULL(6)
#define IAVF_PHINT_GTPU_MSK (IAVF_PHINT_GTPU | \
IAVF_PHINT_GTPU_EH | \
{iavf_pattern_eth_ipv4_gtpc, ETH_RSS_IPV4, &ipv4_udp_gtpc_tmplt},
{iavf_pattern_eth_ecpri, ETH_RSS_ECPRI, ð_ecpri_tmplt},
{iavf_pattern_eth_ipv4_ecpri, ETH_RSS_ECPRI, &ipv4_ecpri_tmplt},
+ {iavf_pattern_eth_ipv4_gre_ipv4, IAVF_RSS_TYPE_INNER_IPV4, &inner_ipv4_tmplt},
+ {iavf_pattern_eth_ipv6_gre_ipv4, IAVF_RSS_TYPE_INNER_IPV4, &inner_ipv4_tmplt},
+ {iavf_pattern_eth_ipv4_gre_ipv4_tcp, IAVF_RSS_TYPE_INNER_IPV4_TCP, &inner_ipv4_tcp_tmplt},
+ {iavf_pattern_eth_ipv6_gre_ipv4_tcp, IAVF_RSS_TYPE_INNER_IPV4_TCP, &inner_ipv4_tcp_tmplt},
+ {iavf_pattern_eth_ipv4_gre_ipv4_udp, IAVF_RSS_TYPE_INNER_IPV4_UDP, &inner_ipv4_udp_tmplt},
+ {iavf_pattern_eth_ipv6_gre_ipv4_udp, IAVF_RSS_TYPE_INNER_IPV4_UDP, &inner_ipv4_udp_tmplt},
/* IPv6 */
{iavf_pattern_eth_ipv6, IAVF_RSS_TYPE_OUTER_IPV6, &outer_ipv6_tmplt},
{iavf_pattern_eth_ipv6_frag_ext, IAVF_RSS_TYPE_OUTER_IPV6_FRAG, &outer_ipv6_frag_tmplt},
{iavf_pattern_eth_ipv6_l2tpv3, IAVF_RSS_TYPE_IPV6_L2TPV3, &ipv6_l2tpv3_tmplt},
{iavf_pattern_eth_ipv6_pfcp, IAVF_RSS_TYPE_IPV6_PFCP, &ipv6_pfcp_tmplt},
{iavf_pattern_eth_ipv6_gtpc, ETH_RSS_IPV6, &ipv6_udp_gtpc_tmplt},
+ {iavf_pattern_eth_ipv4_gre_ipv6, IAVF_RSS_TYPE_INNER_IPV6, &inner_ipv6_tmplt},
+ {iavf_pattern_eth_ipv6_gre_ipv6, IAVF_RSS_TYPE_INNER_IPV6, &inner_ipv6_tmplt},
+ {iavf_pattern_eth_ipv4_gre_ipv6_tcp, IAVF_RSS_TYPE_INNER_IPV6_TCP, &inner_ipv6_tcp_tmplt},
+ {iavf_pattern_eth_ipv6_gre_ipv6_tcp, IAVF_RSS_TYPE_INNER_IPV6_TCP, &inner_ipv6_tcp_tmplt},
+ {iavf_pattern_eth_ipv4_gre_ipv6_udp, IAVF_RSS_TYPE_INNER_IPV6_UDP, &inner_ipv6_udp_tmplt},
+ {iavf_pattern_eth_ipv6_gre_ipv6_udp, IAVF_RSS_TYPE_INNER_IPV6_UDP, &inner_ipv6_udp_tmplt},
};
static struct iavf_flow_engine iavf_hash_engine = {
switch (item->type) {
case RTE_FLOW_ITEM_TYPE_IPV4:
- if (!(*phint & IAVF_PHINT_GTPU_MSK))
+ if (!(*phint & IAVF_PHINT_GTPU_MSK) && !(*phint & IAVF_PHINT_GRE))
*phint |= IAVF_PHINT_OUTER_IPV4;
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
- if (!(*phint & IAVF_PHINT_GTPU_MSK))
+ if (!(*phint & IAVF_PHINT_GTPU_MSK) && !(*phint & IAVF_PHINT_GRE))
*phint |= IAVF_PHINT_OUTER_IPV6;
break;
case RTE_FLOW_ITEM_TYPE_GTPU:
return -rte_errno;
}
break;
+ case RTE_FLOW_ITEM_TYPE_GRE:
+ *phint |= IAVF_PHINT_GRE;
default:
break;
}
struct virtchnl_proto_hdr *hdr2;
int i, shift_count = 1;
- if (!(phint & IAVF_PHINT_GTPU_MSK))
+ if (!(phint & IAVF_PHINT_GTPU_MSK) && !(phint & IAVF_PHINT_GRE))
return;
if (phint & IAVF_PHINT_LAYERS_MSK)
}
if (shift_count == 1) {
- /* adding gtpu header at layer 0 */
+ /* adding tunnel header at layer 0 */
hdr1 = &proto_hdrs->proto_hdr[0];
} else {
- /* adding gtpu header and outer ip header */
+ /* adding tunnel header and outer ip header */
hdr1 = &proto_hdrs->proto_hdr[1];
hdr2 = &proto_hdrs->proto_hdr[0];
hdr2->field_selector = 0;
VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, GTPU_EH);
else if (phint & IAVF_PHINT_GTPU)
VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, GTPU_IP);
+ else if (phint & IAVF_PHINT_GRE)
+ VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, GRE);
}
static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,