ethdev: add physical port action to flow API
[dpdk.git] / lib / librte_ether / rte_flow.h
index 2c7c4d0..58b75e9 100644 (file)
@@ -988,6 +988,14 @@ enum rte_flow_action_type {
         */
        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,
+
        /**
         * Traffic metering and policing (MTR).
         *
@@ -1111,6 +1119,20 @@ struct rte_flow_action_vf {
        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_METER
  *