FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
flow_api.c
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * flow_api.c - flow api
4  *
5  * Copyright (c) 2020 Intel and/or its affiliates.
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *------------------------------------------------------------------
18  */
19 
20 #include <stddef.h>
21 
22 #include <vnet/vnet.h>
23 #include <vlibmemory/api.h>
24 #include <vnet/interface.h>
25 #include <vnet/api_errno.h>
26 #include <vnet/flow/flow.h>
27 #include <vnet/fib/fib_table.h>
28 #include <vnet/udp/udp_local.h>
30 #include <vnet/ip/ip_types_api.h>
31 
32 #include <vnet/format_fns.h>
33 #include <vnet/flow/flow.api_enum.h>
34 #include <vnet/flow/flow.api_types.h>
35 
36 #define REPLY_MSG_ID_BASE flow_main.msg_id_base
38 
39 static inline void
40 ipv4_addr_and_mask_convert (vl_api_ip4_address_and_mask_t * vl_api_addr,
41  ip4_address_and_mask_t * vnet_addr)
42 {
43  clib_memcpy (vnet_addr, vl_api_addr, sizeof (*vnet_addr));
44 }
45 
46 static inline void
47 ipv6_addr_and_mask_convert (vl_api_ip6_address_and_mask_t * vl_api_addr,
48  ip6_address_and_mask_t * vnet_addr)
49 {
50  clib_memcpy (vnet_addr, vl_api_addr, sizeof (*vnet_addr));
51 }
52 
53 static inline void
54 protocol_and_mask_convert (vl_api_ip_prot_and_mask_t * vl_api_protocol,
55  ip_prot_and_mask_t * vnet_protocol)
56 {
57  vnet_protocol->prot = (ip_protocol_t) vl_api_protocol->prot;
58  vnet_protocol->mask = vl_api_protocol->mask;
59 }
60 
61 static inline void
62 port_and_mask_convert (vl_api_ip_port_and_mask_t * vl_api_port,
63  ip_port_and_mask_t * vnet_port)
64 {
65  vnet_port->port = ntohs (vl_api_port->port);
66  vnet_port->mask = ntohs (vl_api_port->mask);
67 }
68 
69 static inline void
70 ipv4_flow_convert (vl_api_flow_ip4_t *vl_api_flow, vnet_flow_ip4_t *f)
71 {
72  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
73  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
74 
75  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
76 }
77 
78 static void
79 ipv6_flow_convert (vl_api_flow_ip6_t *vl_api_flow, vnet_flow_ip6_t *f)
80 {
81  ipv6_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
82  ipv6_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
83 
84  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
85 }
86 
87 static inline void
88 ipv4_n_tuple_flow_convert (vl_api_flow_ip4_n_tuple_t * vl_api_flow,
89  vnet_flow_ip4_n_tuple_t * f)
90 {
91  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
92  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
93  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
94 
95  port_and_mask_convert (&vl_api_flow->src_port, &f->src_port);
96  port_and_mask_convert (&vl_api_flow->dst_port, &f->dst_port);
97 }
98 
99 static void
100 ipv6_n_tuple_flow_convert (vl_api_flow_ip6_n_tuple_t * vl_api_flow,
101  vnet_flow_ip6_n_tuple_t * f)
102 {
103  ipv6_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
104  ipv6_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
105  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
106 
107  port_and_mask_convert (&vl_api_flow->src_port, &f->src_port);
108  port_and_mask_convert (&vl_api_flow->dst_port, &f->dst_port);
109 }
110 
111 static inline void
112 ipv4_n_tuple_tagged_flow_convert (vl_api_flow_ip4_n_tuple_tagged_t *
113  vl_api_flow,
114  vnet_flow_ip4_n_tuple_tagged_t * f)
115 {
116  return ipv4_n_tuple_flow_convert ((vl_api_flow_ip4_n_tuple_t *) vl_api_flow,
117  (vnet_flow_ip4_n_tuple_t *) f);
118 }
119 
120 static inline void
121 ipv6_n_tuple_tagged_flow_convert (vl_api_flow_ip6_n_tuple_tagged_t *
122  vl_api_flow,
123  vnet_flow_ip6_n_tuple_tagged_t * f)
124 {
125  return ipv6_n_tuple_flow_convert ((vl_api_flow_ip6_n_tuple_t *) vl_api_flow,
126  (vnet_flow_ip6_n_tuple_t *) f);
127 }
128 
129 static inline void
130 ipv4_l2tpv3oip_flow_convert (vl_api_flow_ip4_l2tpv3oip_t * vl_api_flow,
131  vnet_flow_ip4_l2tpv3oip_t * f)
132 {
133  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
134  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
135 
136  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
137  f->session_id = ntohl (vl_api_flow->session_id);
138 }
139 
140 static inline void
141 ipv4_ipsec_esp_flow_convert (vl_api_flow_ip4_ipsec_esp_t * vl_api_flow,
142  vnet_flow_ip4_ipsec_esp_t * f)
143 {
144  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
145  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
146 
147  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
148  f->spi = ntohl (vl_api_flow->spi);
149 }
150 
151 static inline void
152 ipv4_ipsec_ah_flow_convert (vl_api_flow_ip4_ipsec_ah_t * vl_api_flow,
153  vnet_flow_ip4_ipsec_ah_t * f)
154 {
155  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
156  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
157 
158  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
159  f->spi = ntohl (vl_api_flow->spi);
160 }
161 
162 static inline void
163 ipv4_vxlan_flow_convert (vl_api_flow_ip4_vxlan_t *vl_api_flow,
164  vnet_flow_ip4_vxlan_t *f)
165 {
166  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
167  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
168  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
169 
170  port_and_mask_convert (&vl_api_flow->src_port, &f->src_port);
171  port_and_mask_convert (&vl_api_flow->dst_port, &f->dst_port);
172 
173  f->vni = ntohl (vl_api_flow->vni);
174 }
175 
176 static inline void
177 ipv6_vxlan_flow_convert (vl_api_flow_ip6_vxlan_t *vl_api_flow,
178  vnet_flow_ip6_vxlan_t *f)
179 {
180  ipv6_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
181  ipv6_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
182  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
183 
184  port_and_mask_convert (&vl_api_flow->src_port, &f->src_port);
185  port_and_mask_convert (&vl_api_flow->dst_port, &f->dst_port);
186 
187  f->vni = ntohl (vl_api_flow->vni);
188 }
189 
190 static inline void
191 ipv4_gtpu_flow_convert (vl_api_flow_ip4_gtpu_t * vl_api_flow,
192  vnet_flow_ip4_gtpu_t * f)
193 {
194  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
195  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
196 
197  port_and_mask_convert (&vl_api_flow->src_port, &f->src_port);
198  port_and_mask_convert (&vl_api_flow->dst_port, &f->dst_port);
199 
200  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
201  f->teid = ntohl (vl_api_flow->teid);
202 }
203 
204 static inline void
205 ipv4_gtpc_flow_convert (vl_api_flow_ip4_gtpc_t * vl_api_flow,
206  vnet_flow_ip4_gtpc_t * f)
207 {
208  ipv4_addr_and_mask_convert (&vl_api_flow->src_addr, &f->src_addr);
209  ipv4_addr_and_mask_convert (&vl_api_flow->dst_addr, &f->dst_addr);
210 
211  port_and_mask_convert (&vl_api_flow->src_port, &f->src_port);
212  port_and_mask_convert (&vl_api_flow->dst_port, &f->dst_port);
213 
214  protocol_and_mask_convert (&vl_api_flow->protocol, &f->protocol);
215  f->teid = ntohl (vl_api_flow->teid);
216 }
217 
218 static void
220 {
222  int rv = 0;
224  u32 flow_index = ~0;
225  vl_api_flow_rule_t *f = &mp->flow;
226 
227  vnet_main_t *vnm = vnet_get_main ();
228 
229  flow.type = ntohl (f->type);
230  flow.actions = ntohl (f->actions);
231  flow.mark_flow_id = ntohl (f->mark_flow_id);
232  flow.redirect_node_index = ntohl (f->redirect_node_index);
233  flow.redirect_device_input_next_index =
234  ntohl (f->redirect_device_input_next_index);
235  flow.redirect_queue = ntohl (f->redirect_queue);
236  flow.buffer_advance = ntohl (f->buffer_advance);
237 
238  switch (flow.type)
239  {
240  case VNET_FLOW_TYPE_IP4:
241  ipv4_flow_convert (&f->flow.ip4, &flow.ip4);
242  break;
243  case VNET_FLOW_TYPE_IP6:
244  ipv6_flow_convert (&f->flow.ip6, &flow.ip6);
245  break;
246  case VNET_FLOW_TYPE_IP4_N_TUPLE:
247  ipv4_n_tuple_flow_convert (&f->flow.ip4_n_tuple, &flow.ip4_n_tuple);
248  break;
249  case VNET_FLOW_TYPE_IP6_N_TUPLE:
250  ipv6_n_tuple_flow_convert (&f->flow.ip6_n_tuple, &flow.ip6_n_tuple);
251  break;
252  case VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED:
253  ipv4_n_tuple_tagged_flow_convert (&f->flow.ip4_n_tuple_tagged,
255  break;
256  case VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED:
257  ipv6_n_tuple_tagged_flow_convert (&f->flow.ip6_n_tuple_tagged,
259  break;
260  case VNET_FLOW_TYPE_IP4_L2TPV3OIP:
261  ipv4_l2tpv3oip_flow_convert (&f->flow.ip4_l2tpv3oip,
263  break;
264  case VNET_FLOW_TYPE_IP4_IPSEC_ESP:
265  ipv4_ipsec_esp_flow_convert (&f->flow.ip4_ipsec_esp,
267  break;
268  case VNET_FLOW_TYPE_IP4_IPSEC_AH:
269  ipv4_ipsec_ah_flow_convert (&f->flow.ip4_ipsec_ah, &flow.ip4_ipsec_ah);
270  break;
271  case VNET_FLOW_TYPE_IP4_VXLAN:
272  ipv4_vxlan_flow_convert (&f->flow.ip4_vxlan, &flow.ip4_vxlan);
273  break;
274  case VNET_FLOW_TYPE_IP6_VXLAN:
275  ipv6_vxlan_flow_convert (&f->flow.ip6_vxlan, &flow.ip6_vxlan);
276  break;
277  case VNET_FLOW_TYPE_IP4_GTPU:
278  ipv4_gtpu_flow_convert (&f->flow.ip4_gtpu, &flow.ip4_gtpu);
279  break;
280  case VNET_FLOW_TYPE_IP4_GTPC:
281  ipv4_gtpc_flow_convert (&f->flow.ip4_gtpc, &flow.ip4_gtpc);
282  break;
283  default:
284  rv = VNET_FLOW_ERROR_NOT_SUPPORTED;
285  goto out;
286  break;
287  }
288 
289  rv = vnet_flow_add (vnm, &flow, &flow_index);
290 
291 out:
292  /* *INDENT-OFF* */
293  REPLY_MACRO2(VL_API_FLOW_ADD_REPLY,
294  ({
295  rmp->flow_index = ntohl (flow_index);
296  }));
297  /* *INDENT-ON* */
298 }
299 
300 static void
302 {
304  int rv = 0;
305 
306  vnet_main_t *vnm = vnet_get_main ();
307  rv = vnet_flow_del (vnm, ntohl (mp->flow_index));
308 
309  REPLY_MACRO (VL_API_FLOW_DEL_REPLY);
310 }
311 
312 static void
314 {
316  int rv = 0;
317 
318  vnet_main_t *vnm = vnet_get_main ();
319  rv =
320  vnet_flow_enable (vnm, ntohl (mp->flow_index), ntohl (mp->hw_if_index));
321 
322  REPLY_MACRO (VL_API_FLOW_ENABLE_REPLY);
323 }
324 
325 static void
327 {
329  int rv = 0;
330 
331  vnet_main_t *vnm = vnet_get_main ();
332  rv =
333  vnet_flow_disable (vnm, ntohl (mp->flow_index), ntohl (mp->hw_if_index));
334 
335  REPLY_MACRO (VL_API_FLOW_DISABLE_REPLY);
336 }
337 
338 #include <vnet/flow/flow.api.c>
339 static clib_error_t *
341 {
343 
344  return 0;
345 }
346 
348 
349 /*
350  * fd.io coding-style-patch-verification: ON
351  *
352  * Local Variables:
353  * eval: (c-set-style "gnu")
354  * End:
355  */
vnet_flow_enable
int vnet_flow_enable(vnet_main_t *vnm, u32 flow_index, u32 hw_if_index)
Definition: flow.c:91
vnet_flow_del
int vnet_flow_del(vnet_main_t *vnm, u32 flow_index)
Definition: flow.c:67
ipv4_gtpc_flow_convert
static void ipv4_gtpc_flow_convert(vl_api_flow_ip4_gtpc_t *vl_api_flow, vnet_flow_ip4_gtpc_t *f)
Definition: flow_api.c:205
flow::ip4_n_tuple_tagged
vl_api_flow_ip4_n_tuple_tagged_t ip4_n_tuple_tagged
Definition: flow_types.api:206
flow::ip4_n_tuple
vl_api_flow_ip4_n_tuple_t ip4_n_tuple
Definition: flow_types.api:204
api.h
flow::ip6_n_tuple_tagged
vl_api_flow_ip6_n_tuple_tagged_t ip6_n_tuple_tagged
Definition: flow_types.api:207
ntohs
#define ntohs(x)
Definition: af_xdp.bpf.c:29
vl_api_flow_add_reply_t::flow_index
u32 flow_index
Definition: flow.api:44
vl_api_flow_del_t_handler
static void vl_api_flow_del_t_handler(vl_api_flow_del_t *mp)
Definition: flow_api.c:301
port_and_mask_convert
static void port_and_mask_convert(vl_api_ip_port_and_mask_t *vl_api_port, ip_port_and_mask_t *vnet_port)
Definition: flow_api.c:62
REPLY_MACRO2
#define REPLY_MACRO2(t, body)
Definition: api_helper_macros.h:65
flow::ip4_l2tpv3oip
vl_api_flow_ip4_l2tpv3oip_t ip4_l2tpv3oip
Definition: flow_types.api:201
hw_flow_api_hookup
static clib_error_t * hw_flow_api_hookup(vlib_main_t *vm)
Definition: flow_api.c:340
clib_memcpy
#define clib_memcpy(d, s, n)
Definition: string.h:197
ip6_address_and_mask_t
Definition: ip6_packet.h:59
ipv6_flow_convert
static void ipv6_flow_convert(vl_api_flow_ip6_t *vl_api_flow, vnet_flow_ip6_t *f)
Definition: flow_api.c:79
flow_main
vnet_flow_main_t flow_main
Definition: flow.c:21
flow::ip4_ipsec_esp
vl_api_flow_ip4_ipsec_esp_t ip4_ipsec_esp
Definition: flow_types.api:202
f
vlib_frame_t * f
Definition: interface_output.c:1098
ip_port_and_mask_t::mask
u16 mask
Definition: flow.h:181
VLIB_API_INIT_FUNCTION
VLIB_API_INIT_FUNCTION(hw_flow_api_hookup)
fib_table.h
ip4_address_and_mask_t
Definition: ip4_packet.h:82
tunnel_types_api.h
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
flow
Definition: flow_types.api:196
ipv4_l2tpv3oip_flow_convert
static void ipv4_l2tpv3oip_flow_convert(vl_api_flow_ip4_l2tpv3oip_t *vl_api_flow, vnet_flow_ip4_l2tpv3oip_t *f)
Definition: flow_api.c:130
ipv4_ipsec_esp_flow_convert
static void ipv4_ipsec_esp_flow_convert(vl_api_flow_ip4_ipsec_esp_t *vl_api_flow, vnet_flow_ip4_ipsec_esp_t *f)
Definition: flow_api.c:141
ipv6_addr_and_mask_convert
static void ipv6_addr_and_mask_convert(vl_api_ip6_address_and_mask_t *vl_api_addr, ip6_address_and_mask_t *vnet_addr)
Definition: flow_api.c:47
ip_prot_and_mask_t::prot
ip_protocol_t prot
Definition: flow.h:186
vl_api_flow_add_t
flow add request
Definition: flow.api:27
vl_api_flow_add_t_handler
static void vl_api_flow_add_t_handler(vl_api_flow_add_t *mp)
Definition: flow_api.c:219
ipv4_flow_convert
static void ipv4_flow_convert(vl_api_flow_ip4_t *vl_api_flow, vnet_flow_ip4_t *f)
Definition: flow_api.c:70
vl_api_flow_enable_t::flow_index
u32 flow_index
Definition: flow.api:70
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
REPLY_MACRO
#define REPLY_MACRO(t)
Definition: api_helper_macros.h:30
setup_message_id_table
static void setup_message_id_table(api_main_t *am)
Definition: sr_mpls_api.c:174
ipv4_vxlan_flow_convert
static void ipv4_vxlan_flow_convert(vl_api_flow_ip4_vxlan_t *vl_api_flow, vnet_flow_ip4_vxlan_t *f)
Definition: flow_api.c:163
protocol_and_mask_convert
static void protocol_and_mask_convert(vl_api_ip_prot_and_mask_t *vl_api_protocol, ip_prot_and_mask_t *vnet_protocol)
Definition: flow_api.c:54
udp_local.h
vl_api_flow_disable_t_handler
static void vl_api_flow_disable_t_handler(vl_api_flow_disable_t *mp)
Definition: flow_api.c:326
ipv6_vxlan_flow_convert
static void ipv6_vxlan_flow_convert(vl_api_flow_ip6_vxlan_t *vl_api_flow, vnet_flow_ip6_vxlan_t *f)
Definition: flow_api.c:177
ipv4_gtpu_flow_convert
static void ipv4_gtpu_flow_convert(vl_api_flow_ip4_gtpu_t *vl_api_flow, vnet_flow_ip4_gtpu_t *f)
Definition: flow_api.c:191
ipv6_n_tuple_tagged_flow_convert
static void ipv6_n_tuple_tagged_flow_convert(vl_api_flow_ip6_n_tuple_tagged_t *vl_api_flow, vnet_flow_ip6_n_tuple_tagged_t *f)
Definition: flow_api.c:121
ipv4_addr_and_mask_convert
static void ipv4_addr_and_mask_convert(vl_api_ip4_address_and_mask_t *vl_api_addr, ip4_address_and_mask_t *vnet_addr)
Definition: flow_api.c:40
interface.h
vnet_flow_disable
int vnet_flow_disable(vnet_main_t *vnm, u32 flow_index, u32 hw_if_index)
Definition: flow.c:135
vnet_flow_t
Definition: flow.h:223
ip_port_and_mask_t::port
u16 port
Definition: flow.h:181
vl_api_flow_del_t
flow del request
Definition: flow.api:52
vl_api_flow_enable_t
flow enable request
Definition: flow.api:66
vnet_main_t
Definition: vnet.h:76
vl_api_flow_disable_t
flow disable request
Definition: flow.api:81
flow::ip6_vxlan
vl_api_flow_ip6_vxlan_t ip6_vxlan
Definition: flow_types.api:209
flow::ip4_gtpc
vl_api_flow_ip4_gtpc_t ip4_gtpc
Definition: flow_types.api:210
vl_api_flow_enable_t::hw_if_index
u32 hw_if_index
Definition: flow.api:71
format_fns.h
ipv4_ipsec_ah_flow_convert
static void ipv4_ipsec_ah_flow_convert(vl_api_flow_ip4_ipsec_ah_t *vl_api_flow, vnet_flow_ip4_ipsec_ah_t *f)
Definition: flow_api.c:152
u32
unsigned int u32
Definition: types.h:88
flow::ip4_vxlan
vl_api_flow_ip4_vxlan_t ip4_vxlan
Definition: flow_types.api:208
flow
vl_api_flow_t flow
Definition: flow_types.api:240
ip_prot_and_mask_t::mask
u8 mask
Definition: flow.h:189
api_helper_macros.h
flow::ip6_n_tuple
vl_api_flow_ip6_n_tuple_t ip6_n_tuple
Definition: flow_types.api:205
flow::ip4_ipsec_ah
vl_api_flow_ip4_ipsec_ah_t ip4_ipsec_ah
Definition: flow_types.api:203
vl_api_flow_add_t::flow
vl_api_flow_rule_t flow
Definition: flow.api:31
vl_api_flow_del_t::flow_index
u32 flow_index
Definition: flow.api:56
vl_api_flow_add_reply_t
reply for adding flow
Definition: flow.api:40
ip_protocol_t
enum ip_protocol ip_protocol_t
vlib_main_t
Definition: main.h:102
ipv4_n_tuple_tagged_flow_convert
static void ipv4_n_tuple_tagged_flow_convert(vl_api_flow_ip4_n_tuple_tagged_t *vl_api_flow, vnet_flow_ip4_n_tuple_tagged_t *f)
Definition: flow_api.c:112
clib_error_t
Definition: clib_error.h:21
flow::ip4
vl_api_flow_ip4_t ip4
Definition: flow_types.api:199
ipv6_n_tuple_flow_convert
static void ipv6_n_tuple_flow_convert(vl_api_flow_ip6_n_tuple_t *vl_api_flow, vnet_flow_ip6_n_tuple_t *f)
Definition: flow_api.c:100
rv
int __clib_unused rv
Definition: application.c:491
flow::ip6
vl_api_flow_ip6_t ip6
Definition: flow_types.api:200
vnet.h
api_errno.h
ipv4_n_tuple_flow_convert
static void ipv4_n_tuple_flow_convert(vl_api_flow_ip4_n_tuple_t *vl_api_flow, vnet_flow_ip4_n_tuple_t *f)
Definition: flow_api.c:88
vnet_flow_add
int vnet_flow_add(vnet_main_t *vnm, vnet_flow_t *flow, u32 *flow_index)
Definition: flow.c:43
flow.h
vl_api_flow_disable_t::flow_index
u32 flow_index
Definition: flow.api:85
ip_port_and_mask_t
Definition: flow.h:179
vl_api_flow_disable_t::hw_if_index
u32 hw_if_index
Definition: flow.api:86
ip_types_api.h
vnet_flow_main_t::msg_id_base
u16 msg_id_base
Definition: flow.h:290
flow::ip4_gtpu
vl_api_flow_ip4_gtpu_t ip4_gtpu
Definition: flow_types.api:211
ip_prot_and_mask_t
Definition: flow.h:184
vl_api_flow_enable_t_handler
static void vl_api_flow_enable_t_handler(vl_api_flow_enable_t *mp)
Definition: flow_api.c:313