crypto/octeontx: add global resource init
[dpdk.git] / lib / librte_ethdev / rte_flow.h
index f062ffe..68bbf57 100644 (file)
@@ -1506,6 +1506,79 @@ enum rte_flow_action_type {
         * error.
         */
        RTE_FLOW_ACTION_TYPE_NVGRE_DECAP,
+
+       /**
+        * Modify IPv4 source address in the outermost IPv4 header.
+        *
+        * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV4,
+        * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error.
+        *
+        * See struct rte_flow_action_set_ipv4.
+        */
+       RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC,
+
+       /**
+        * Modify IPv4 destination address in the outermost IPv4 header.
+        *
+        * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV4,
+        * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error.
+        *
+        * See struct rte_flow_action_set_ipv4.
+        */
+       RTE_FLOW_ACTION_TYPE_SET_IPV4_DST,
+
+       /**
+        * Modify IPv6 source address in the outermost IPv6 header.
+        *
+        * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV6,
+        * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error.
+        *
+        * See struct rte_flow_action_set_ipv6.
+        */
+       RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC,
+
+       /**
+        * Modify IPv6 destination address in the outermost IPv6 header.
+        *
+        * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV6,
+        * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error.
+        *
+        * See struct rte_flow_action_set_ipv6.
+        */
+       RTE_FLOW_ACTION_TYPE_SET_IPV6_DST,
+
+       /**
+        * Modify source port number in the outermost TCP/UDP header.
+        *
+        * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_TCP
+        * or RTE_FLOW_ITEM_TYPE_UDP, then the PMD should return a
+        * RTE_FLOW_ERROR_TYPE_ACTION error.
+        *
+        * See struct rte_flow_action_set_tp.
+        */
+       RTE_FLOW_ACTION_TYPE_SET_TP_SRC,
+
+       /**
+        * Modify destination port number in the outermost TCP/UDP header.
+        *
+        * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_TCP
+        * or RTE_FLOW_ITEM_TYPE_UDP, then the PMD should return a
+        * RTE_FLOW_ERROR_TYPE_ACTION error.
+        *
+        * See struct rte_flow_action_set_tp.
+        */
+       RTE_FLOW_ACTION_TYPE_SET_TP_DST,
+
+       /**
+        * Swap the source and destination MAC addresses in the outermost
+        * Ethernet header.
+        *
+        * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_ETH,
+        * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error.
+        *
+        * No associated configuration structure.
+        */
+       RTE_FLOW_ACTION_TYPE_MAC_SWAP,
 };
 
 /**
@@ -1869,6 +1942,51 @@ struct rte_flow_action_nvgre_encap {
        struct rte_flow_item *definition;
 };
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC
+ * RTE_FLOW_ACTION_TYPE_SET_IPV4_DST
+ *
+ * Allows modification of IPv4 source (RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC)
+ * and destination address (RTE_FLOW_ACTION_TYPE_SET_IPV4_DST) in the
+ * specified outermost IPv4 header.
+ */
+struct rte_flow_action_set_ipv4 {
+       rte_be32_t ipv4_addr;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC
+ * RTE_FLOW_ACTION_TYPE_SET_IPV6_DST
+ *
+ * Allows modification of IPv6 source (RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC)
+ * and destination address (RTE_FLOW_ACTION_TYPE_SET_IPV6_DST) in the
+ * specified outermost IPv6 header.
+ */
+struct rte_flow_action_set_ipv6 {
+       uint8_t ipv6_addr[16];
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ACTION_TYPE_SET_TP_SRC
+ * RTE_FLOW_ACTION_TYPE_SET_TP_DST
+ *
+ * Allows modification of source (RTE_FLOW_ACTION_TYPE_SET_TP_SRC)
+ * and destination (RTE_FLOW_ACTION_TYPE_SET_TP_DST) port numbers
+ * in the specified outermost TCP/UDP header.
+ */
+struct rte_flow_action_set_tp {
+       rte_be16_t port;
+};
+
 /*
  * Definition of a single action.
  *