*/
RTE_FLOW_ITEM_TYPE_PHY_PORT,
+ /**
+ * [META]
+ *
+ * Matches traffic originating from (ingress) or going to (egress) a
+ * given DPDK port ID.
+ *
+ * See struct rte_flow_item_port_id.
+ */
+ RTE_FLOW_ITEM_TYPE_PORT_ID,
+
/**
* Matches a byte string of a given length at a given offset.
*
* See struct rte_flow_item_geneve.
*/
RTE_FLOW_ITEM_TYPE_GENEVE,
+
+ /**
+ * Matches a VXLAN-GPE header.
+ *
+ * See struct rte_flow_item_vxlan_gpe.
+ */
+ RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
};
/**
};
#endif
+/**
+ * RTE_FLOW_ITEM_TYPE_PORT_ID
+ *
+ * Matches traffic originating from (ingress) or going to (egress) a given
+ * DPDK port ID.
+ *
+ * Normally only supported if the port ID in question is known by the
+ * underlying PMD and related to the device the flow rule is created
+ * against.
+ *
+ * This must not be confused with @p PHY_PORT which refers to the physical
+ * port of a device, whereas @p PORT_ID refers to a struct rte_eth_dev
+ * object on the application side (also known as "port representor"
+ * depending on the kind of underlying device).
+ */
+struct rte_flow_item_port_id {
+ uint32_t id; /**< DPDK port ID. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_PORT_ID. */
+#ifndef __cplusplus
+static const struct rte_flow_item_port_id rte_flow_item_port_id_mask = {
+ .id = 0xffffffff,
+};
+#endif
+
/**
* RTE_FLOW_ITEM_TYPE_RAW
*
};
#endif
+/**
+ * RTE_FLOW_ITEM_TYPE_VXLAN_GPE (draft-ietf-nvo3-vxlan-gpe-05).
+ *
+ * Matches a VXLAN-GPE header.
+ */
+struct rte_flow_item_vxlan_gpe {
+ uint8_t flags; /**< Normally 0x0c (I and P flags). */
+ uint8_t rsvd0[2]; /**< Reserved, normally 0x0000. */
+ uint8_t protocol; /**< Protocol type. */
+ uint8_t vni[3]; /**< VXLAN identifier. */
+ uint8_t rsvd1; /**< Reserved, normally 0x00. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN_GPE. */
+#ifndef __cplusplus
+static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask = {
+ .vni = "\xff\xff\xff",
+};
+#endif
+
/**
* Matching pattern item definition.
*
*/
RTE_FLOW_ACTION_TYPE_VF,
+ /**
+ * Directs packets to a given physical port index of the underlying
+ * device.
+ *
+ * See struct rte_flow_action_phy_port.
+ */
+ RTE_FLOW_ACTION_TYPE_PHY_PORT,
+
+ /**
+ * Directs matching traffic to a given DPDK port ID.
+ *
+ * See struct rte_flow_action_port_id.
+ */
+ RTE_FLOW_ACTION_TYPE_PORT_ID,
+
/**
* Traffic metering and policing (MTR).
*
uint32_t id; /**< VF ID. */
};
+/**
+ * RTE_FLOW_ACTION_TYPE_PHY_PORT
+ *
+ * Directs packets to a given physical port index of the underlying
+ * device.
+ *
+ * @see RTE_FLOW_ITEM_TYPE_PHY_PORT
+ */
+struct rte_flow_action_phy_port {
+ uint32_t original:1; /**< Use original port index if possible. */
+ uint32_t reserved:31; /**< Reserved, must be zero. */
+ uint32_t index; /**< Physical port index. */
+};
+
+/**
+ * RTE_FLOW_ACTION_TYPE_PORT_ID
+ *
+ * Directs matching traffic to a given DPDK port ID.
+ *
+ * @see RTE_FLOW_ITEM_TYPE_PORT_ID
+ */
+struct rte_flow_action_port_id {
+ uint32_t original:1; /**< Use original DPDK port ID if possible. */
+ uint32_t reserved:31; /**< Reserved, must be zero. */
+ uint32_t id; /**< DPDK port ID. */
+};
+
/**
* RTE_FLOW_ACTION_TYPE_METER
*