[dpdk-dev,RFC,3/4] ethdev: support GRE and L3VXLAN tunnel type
Checks
Commit Message
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
lib/librte_ether/rte_eth_ctrl.h | 4 +++-
lib/librte_ether/rte_ethdev.h | 2 ++
lib/librte_ether/rte_flow.c | 1 +
lib/librte_ether/rte_flow.h | 7 +++++++
4 files changed, 13 insertions(+), 1 deletion(-)
@@ -83,7 +83,9 @@
#define RTE_ETH_FLOW_VXLAN 19 /**< VXLAN protocol based flow */
#define RTE_ETH_FLOW_GENEVE 20 /**< GENEVE protocol based flow */
#define RTE_ETH_FLOW_NVGRE 21 /**< NVGRE protocol based flow */
-#define RTE_ETH_FLOW_MAX 22
+#define RTE_ETH_FLOW_L3VXLAN 22 /**< L3-VXLAN protocol based flow */
+#define RTE_ETH_FLOW_GRE 23 /**< GRE protocol based flow */
+#define RTE_ETH_FLOW_MAX 24
/**
* Feature filter types
@@ -453,6 +453,8 @@ struct rte_eth_rss_conf {
#define ETH_RSS_VXLAN (1ULL << RTE_ETH_FLOW_VXLAN)
#define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE)
#define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE)
+#define ETH_RSS_L3VXLAN (1ULL << RTE_ETH_FLOW_L3VXLAN)
+#define ETH_RSS_GRE (1ULL << RTE_ETH_FLOW_GRE)
#define ETH_RSS_IP ( \
ETH_RSS_IPV4 | \
@@ -81,6 +81,7 @@ struct rte_flow_desc_data {
MK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)),
MK_FLOW_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)),
MK_FLOW_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)),
+ MK_FLOW_ITEM(L3VXLAN, sizeof(struct rte_flow_item_vxlan)),
};
/** Generate flow_action[] entry. */
@@ -300,6 +300,13 @@ enum rte_flow_item_type {
RTE_FLOW_ITEM_TYPE_GRE,
/**
+ * Matches a L3-VXLAN header.
+ *
+ * See struct rte_flow_item_vxlan.
+ */
+ RTE_FLOW_ITEM_TYPE_L3VXLAN,
+
+ /**
* [META]
*
* Fuzzy pattern match, expect faster than default.