DPDK  17.11.10
rte_flow_driver.h
Go to the documentation of this file.
1 /*-
2  * BSD LICENSE
3  *
4  * Copyright 2016 6WIND S.A.
5  * Copyright 2016 Mellanox.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  * * Neither the name of 6WIND S.A. nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 #ifndef RTE_FLOW_DRIVER_H_
35 #define RTE_FLOW_DRIVER_H_
36 
46 #include <stdint.h>
47 
48 #include "rte_ethdev.h"
49 #include "rte_flow.h"
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
91 struct rte_flow_ops {
93  int (*validate)
94  (struct rte_eth_dev *,
95  const struct rte_flow_attr *,
96  const struct rte_flow_item [],
97  const struct rte_flow_action [],
98  struct rte_flow_error *);
100  struct rte_flow *(*create)
101  (struct rte_eth_dev *,
102  const struct rte_flow_attr *,
103  const struct rte_flow_item [],
104  const struct rte_flow_action [],
105  struct rte_flow_error *);
107  int (*destroy)
108  (struct rte_eth_dev *,
109  struct rte_flow *,
110  struct rte_flow_error *);
112  int (*flush)
113  (struct rte_eth_dev *,
114  struct rte_flow_error *);
116  int (*query)
117  (struct rte_eth_dev *,
118  struct rte_flow *,
120  void *,
121  struct rte_flow_error *);
123  int (*isolate)
124  (struct rte_eth_dev *,
125  int,
126  struct rte_flow_error *);
127 };
128 
142 const struct rte_flow_ops *
143 rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error);
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif /* RTE_FLOW_DRIVER_H_ */
int(* validate)(struct rte_eth_dev *, const struct rte_flow_attr *, const struct rte_flow_item[], const struct rte_flow_action[], struct rte_flow_error *)
rte_flow_action_type
Definition: rte_flow.h:883
int(* query)(struct rte_eth_dev *, struct rte_flow *, enum rte_flow_action_type, void *, struct rte_flow_error *)
int(* isolate)(struct rte_eth_dev *, int, struct rte_flow_error *)
int(* flush)(struct rte_eth_dev *, struct rte_flow_error *)
int(* destroy)(struct rte_eth_dev *, struct rte_flow *, struct rte_flow_error *)
const struct rte_flow_ops * rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error)