DPDK  19.05.0
rte_flow_driver.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016 6WIND S.A.
3  * Copyright 2016 Mellanox Technologies, Ltd
4  */
5 
6 #ifndef RTE_FLOW_DRIVER_H_
7 #define RTE_FLOW_DRIVER_H_
8 
18 #include <stdint.h>
19 
20 #include "rte_ethdev.h"
21 #include "rte_flow.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
63 struct rte_flow_ops {
65  int (*validate)
66  (struct rte_eth_dev *,
67  const struct rte_flow_attr *,
68  const struct rte_flow_item [],
69  const struct rte_flow_action [],
70  struct rte_flow_error *);
72  struct rte_flow *(*create)
73  (struct rte_eth_dev *,
74  const struct rte_flow_attr *,
75  const struct rte_flow_item [],
76  const struct rte_flow_action [],
77  struct rte_flow_error *);
79  int (*destroy)
80  (struct rte_eth_dev *,
81  struct rte_flow *,
82  struct rte_flow_error *);
84  int (*flush)
85  (struct rte_eth_dev *,
86  struct rte_flow_error *);
88  int (*query)
89  (struct rte_eth_dev *,
90  struct rte_flow *,
91  const struct rte_flow_action *,
92  void *,
93  struct rte_flow_error *);
95  int (*isolate)
96  (struct rte_eth_dev *,
97  int,
98  struct rte_flow_error *);
99 };
100 
114 const struct rte_flow_ops *
115 rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error);
116 
118 #define RTE_FLOW_EXPAND_RSS_NEXT(...) \
119  (const int []){ \
120  __VA_ARGS__, 0, \
121  }
122 
125  const int *const next;
131  uint64_t rss_types;
136 };
137 
140  uint32_t entries;
142  struct {
144  uint32_t priority;
145  } entry[];
146 };
147 
174 int __rte_experimental
175 rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
176  const struct rte_flow_item *pattern, uint64_t types,
177  const struct rte_flow_expand_node graph[],
178  int graph_root_index);
179 
180 #ifdef __cplusplus
181 }
182 #endif
183 
184 #endif /* RTE_FLOW_DRIVER_H_ */