test/telemetry: fix typo at beginning of line
[dpdk.git] / lib / librte_ethdev / rte_flow_driver.h
index 51a9a57..f3d7282 100644 (file)
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
@@ -101,6 +102,67 @@ struct rte_flow_ops {
                (struct rte_eth_dev *dev,
                 FILE *file,
                 struct rte_flow_error *error);
+       /** See rte_flow_get_aged_flows() */
+       int (*get_aged_flows)
+               (struct rte_eth_dev *dev,
+                void **context,
+                uint32_t nb_contexts,
+                struct rte_flow_error *err);
+       /** See rte_flow_shared_action_create() */
+       struct rte_flow_shared_action *(*shared_action_create)
+               (struct rte_eth_dev *dev,
+                const struct rte_flow_shared_action_conf *conf,
+                const struct rte_flow_action *action,
+                struct rte_flow_error *error);
+       /** See rte_flow_shared_action_destroy() */
+       int (*shared_action_destroy)
+               (struct rte_eth_dev *dev,
+                struct rte_flow_shared_action *shared_action,
+                struct rte_flow_error *error);
+       /** See rte_flow_shared_action_update() */
+       int (*shared_action_update)
+               (struct rte_eth_dev *dev,
+                struct rte_flow_shared_action *shared_action,
+                const struct rte_flow_action *update,
+                struct rte_flow_error *error);
+       /** See rte_flow_shared_action_query() */
+       int (*shared_action_query)
+               (struct rte_eth_dev *dev,
+                const struct rte_flow_shared_action *shared_action,
+                void *data,
+                struct rte_flow_error *error);
+       /** See rte_flow_tunnel_decap_set() */
+       int (*tunnel_decap_set)
+               (struct rte_eth_dev *dev,
+                struct rte_flow_tunnel *tunnel,
+                struct rte_flow_action **pmd_actions,
+                uint32_t *num_of_actions,
+                struct rte_flow_error *err);
+       /** See rte_flow_tunnel_match() */
+       int (*tunnel_match)
+               (struct rte_eth_dev *dev,
+                struct rte_flow_tunnel *tunnel,
+                struct rte_flow_item **pmd_items,
+                uint32_t *num_of_items,
+                struct rte_flow_error *err);
+       /** See rte_flow_get_rte_flow_restore_info() */
+       int (*get_restore_info)
+               (struct rte_eth_dev *dev,
+                struct rte_mbuf *m,
+                struct rte_flow_restore_info *info,
+                struct rte_flow_error *err);
+       /** See rte_flow_action_tunnel_decap_release() */
+       int (*tunnel_action_decap_release)
+               (struct rte_eth_dev *dev,
+                struct rte_flow_action *pmd_actions,
+                uint32_t num_of_actions,
+                struct rte_flow_error *err);
+       /** See rte_flow_item_release() */
+       int (*tunnel_item_release)
+               (struct rte_eth_dev *dev,
+                struct rte_flow_item *pmd_items,
+                uint32_t num_of_items,
+                struct rte_flow_error *err);
 };
 
 /**
@@ -119,70 +181,6 @@ struct rte_flow_ops {
 const struct rte_flow_ops *
 rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error);
 
-/** Helper macro to build input graph for rte_flow_expand_rss(). */
-#define RTE_FLOW_EXPAND_RSS_NEXT(...) \
-       (const int []){ \
-               __VA_ARGS__, 0, \
-       }
-
-/** Node object of input graph for rte_flow_expand_rss(). */
-struct rte_flow_expand_node {
-       const int *const next;
-       /**<
-        * List of next node indexes. Index 0 is interpreted as a terminator.
-        */
-       const enum rte_flow_item_type type;
-       /**< Pattern item type of current node. */
-       uint64_t rss_types;
-       /**<
-        * RSS types bit-field associated with this node
-        * (see ETH_RSS_* definitions).
-        */
-};
-
-/** Object returned by rte_flow_expand_rss(). */
-struct rte_flow_expand_rss {
-       uint32_t entries;
-       /**< Number of entries @p patterns and @p priorities. */
-       struct {
-               struct rte_flow_item *pattern; /**< Expanded pattern array. */
-               uint32_t priority; /**< Priority offset for each expansion. */
-       } entry[];
-};
-
-/**
- * Expand RSS flows into several possible flows according to the RSS hash
- * fields requested and the driver capabilities.
- *
- * @b EXPERIMENTAL: this API may change without prior notice
- *
- * @param[out] buf
- *   Buffer to store the result expansion.
- * @param[in] size
- *   Buffer size in bytes. If 0, @p buf can be NULL.
- * @param[in] pattern
- *   User flow pattern.
- * @param[in] types
- *   RSS types to expand (see ETH_RSS_* definitions).
- * @param[in] graph
- *   Input graph to expand @p pattern according to @p types.
- * @param[in] graph_root_index
- *   Index of root node in @p graph, typically 0.
- *
- * @return
- *   A positive value representing the size of @p buf in bytes regardless of
- *   @p size on success, a negative errno value otherwise and rte_errno is
- *   set, the following errors are defined:
- *
- *   -E2BIG: graph-depth @p graph is too deep.
- */
-__rte_experimental
-int
-rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
-                   const struct rte_flow_item *pattern, uint64_t types,
-                   const struct rte_flow_expand_node graph[],
-                   int graph_root_index);
-
 #ifdef __cplusplus
 }
 #endif