FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
ip_punt_drop.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __IP_PUNT_DROP_H__
17 #define __IP_PUNT_DROP_H__
18 
19 #include <vnet/ip/ip.h>
20 #include <vnet/policer/policer.h>
22 
23 /**
24  * IP4 punt policer configuration
25  * we police the punt rate to prevent overloading the host
26  */
27 typedef struct ip_punt_policer_t_
28 {
32 
34 {
39 
41 {
45 
46 #define foreach_ip_punt_policer_error \
47 _(DROP, "ip punt policer drop")
48 
49 typedef enum
50 {
51 #define _(sym,str) IP_PUNT_POLICER_ERROR_##sym,
53 #undef _
56 
57 extern u8 *format_ip_punt_policer_trace (u8 * s, va_list * args);
62 
63 /**
64  * IP punt policing node function
65  */
69  vlib_frame_t * frame, u8 arc_index, u32 policer_index)
70 {
71  u32 *from, *to_next, n_left_from, n_left_to_next, next_index;
72  u64 time_in_policer_periods;
75 
76  time_in_policer_periods =
78 
80  n_left_from = frame->n_vectors;
81  next_index = node->cached_next_index;
82 
83  while (n_left_from > 0)
84  {
85  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
86 
87  while (n_left_from >= 4 && n_left_to_next >= 2)
88  {
89  vlib_buffer_t *b0, *b1;
90  u32 next0, next1;
91  u8 act0, act1;
92  u32 bi0, bi1;
93 
94  next0 = next1 = 0;
95  bi0 = to_next[0] = from[0];
96  bi1 = to_next[1] = from[1];
97 
98  from += 2;
99  n_left_from -= 2;
100  to_next += 2;
101  n_left_to_next -= 2;
102 
103  b0 = vlib_get_buffer (vm, bi0);
104  b1 = vlib_get_buffer (vm, bi1);
105 
106  act0 = vnet_policer_police (vm, b0, policer_index,
107  time_in_policer_periods, POLICE_CONFORM,
108  true);
109  act1 = vnet_policer_police (vm, b1, policer_index,
110  time_in_policer_periods, POLICE_CONFORM,
111  true);
112 
113  if (PREDICT_FALSE (act0 == QOS_ACTION_HANDOFF))
114  {
115  next0 = next1 = IP_PUNT_POLICER_NEXT_HANDOFF;
116  }
117  else
118  {
119 
121  &b0->current_config_index, &next0, 0);
123  &b1->current_config_index, &next1, 0);
124 
125  if (PREDICT_FALSE (act0 == QOS_ACTION_DROP))
126  {
128  b0->error = node->errors[IP_PUNT_POLICER_ERROR_DROP];
129  }
130  if (PREDICT_FALSE (act1 == QOS_ACTION_DROP))
131  {
133  b1->error = node->errors[IP_PUNT_POLICER_ERROR_DROP];
134  }
135 
136  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
137  {
139  vlib_add_trace (vm, node, b0, sizeof (*t));
140  t->next = next0;
141  t->policer_index = policer_index;
142  }
143  if (PREDICT_FALSE (b1->flags & VLIB_BUFFER_IS_TRACED))
144  {
146  vlib_add_trace (vm, node, b1, sizeof (*t));
147  t->next = next1;
148  t->policer_index = policer_index;
149  }
150  }
151 
153  n_left_to_next,
154  bi0, bi1, next0, next1);
155  }
156  while (n_left_from > 0 && n_left_to_next > 0)
157  {
158  vlib_buffer_t *b0;
159  u32 next0;
160  u32 bi0;
161  u8 act0;
162 
163  next0 = 0;
164  bi0 = to_next[0] = from[0];
165 
166  from += 1;
167  n_left_from -= 1;
168  to_next += 1;
169  n_left_to_next -= 1;
170 
171  b0 = vlib_get_buffer (vm, bi0);
172 
173  act0 = vnet_policer_police (vm, b0, policer_index,
174  time_in_policer_periods, POLICE_CONFORM,
175  true);
176  if (PREDICT_FALSE (act0 == QOS_ACTION_HANDOFF))
177  {
179  }
180  else
181  {
183  &b0->current_config_index, &next0, 0);
184 
185  if (PREDICT_FALSE (act0 == QOS_ACTION_DROP))
186  {
188  b0->error = node->errors[IP_PUNT_POLICER_ERROR_DROP];
189  }
190 
191  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
192  {
194  vlib_add_trace (vm, node, b0, sizeof (*t));
195  t->next = next0;
196  t->policer_index = policer_index;
197  }
198  }
200  n_left_to_next, bi0, next0);
201  }
202  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
203  }
204 
205  return frame->n_vectors;
206 }
207 
208 /**
209  * IP4 punt redirect per-rx interface configuration
210  * redirect punted traffic to another location.
211  */
213 {
214  /**
215  * Node linkage into the FIB graph
216  */
218 
223 
224  /**
225  * redirect forwarding
226  */
229 
230 /**
231  * IP punt redirect configuration
232  */
233 typedef struct ip_punt_redirect_t_
234 {
236 
237  /**
238  * per-RX interface configuration.
239  * sw_if_index = 0 (from which packets are never received) is used to
240  * indicate 'from-any'
241  */
244 
246 
247 /**
248  * IP punt redirect next nodes
249  */
251 {
257 
258 /**
259  * IP Punt redirect trace
260  */
262 {
266 
267 /**
268  * Add a punt redirect entry
269  */
270 extern void ip_punt_redirect_add (fib_protocol_t fproto, u32 rx_sw_if_index,
272  const fib_route_path_t *rpaths);
273 
274 extern void ip_punt_redirect_del (fib_protocol_t fproto, u32 rx_sw_if_index);
276  u32 rx_sw_if_index);
277 extern u8 *format_ip_punt_redirect (u8 * s, va_list * args);
278 
279 extern u8 *format_ip_punt_redirect_trace (u8 * s, va_list * args);
280 
281 typedef walk_rc_t (*ip_punt_redirect_walk_cb_t) (u32 rx_sw_if_index,
282  const ip_punt_redirect_rx_t *
283  redirect, void *arg);
284 extern void ip_punt_redirect_walk (fib_protocol_t fproto,
285  ip_punt_redirect_walk_cb_t cb, void *ctx);
286 
289 {
291 }
292 
297 {
298  u32 *from, *to_next, n_left_from, n_left_to_next, next_index;
301  index_t *redirects;
302 
304  n_left_from = frame->n_vectors;
305  next_index = node->cached_next_index;
307 
308  while (n_left_from > 0)
309  {
310  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
311 
312  while (n_left_from > 0 && n_left_to_next > 0)
313  {
314  u32 rx_sw_if_index0, rrxi0;
315  ip_punt_redirect_rx_t *rrx0;
316  vlib_buffer_t *b0;
317  u32 next0;
318  u32 bi0;
319 
320  rrxi0 = INDEX_INVALID;
321  next0 = 0;
322  bi0 = to_next[0] = from[0];
323 
324  from += 1;
325  n_left_from -= 1;
326  to_next += 1;
327  n_left_to_next -= 1;
328 
329  b0 = vlib_get_buffer (vm, bi0);
330 
332  &b0->current_config_index, &next0, 0);
333 
334  rx_sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
335 
336  /*
337  * If config exists for this particular RX interface use it,
338  * else use the default (at RX = 0)
339  */
340  if (vec_len (redirects) > rx_sw_if_index0)
341  {
342  rrxi0 = redirects[rx_sw_if_index0];
343  if (INDEX_INVALID == rrxi0)
344  rrxi0 = redirects[0];
345  }
346  else if (vec_len (redirects) >= 1)
347  rrxi0 = redirects[0];
348 
349  if (PREDICT_TRUE (INDEX_INVALID != rrxi0))
350  {
351  /* prevent ttl decrement on forward */
352  b0->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
353  rrx0 = ip_punt_redirect_get (rrxi0);
354  vnet_buffer (b0)->ip.adj_index[VLIB_TX] = rrx0->dpo.dpoi_index;
355  next0 = rrx0->dpo.dpoi_next_node;
356  }
357 
358  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
359  {
361  vlib_add_trace (vm, node, b0, sizeof (*t));
362  t->next = next0;
363  t->rrxi = rrxi0;
364  }
365 
367  n_left_to_next, bi0, next0);
368  }
369 
370  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
371  }
372 
373  return frame->n_vectors;
374 }
375 
380 {
381  u32 *from, *to_next, n_left_from, n_left_to_next, next_index;
382 
384  n_left_from = frame->n_vectors;
385  next_index = node->cached_next_index;
386 
387  while (n_left_from > 0)
388  {
389  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
390 
391  while (n_left_from >= 8 && n_left_to_next >= 4)
392  {
393  vlib_buffer_t *b0, *b1, *b2, *b3;
394  u32 next0, next1, next2, next3;
395  u32 bi0, bi1, bi2, bi3;
396 
397  next0 = next1 = next2 = next3 = 0;
398 
399  /* Prefetch next iteration. */
400  {
401  vlib_buffer_t *p4, *p5, *p6, *p7;
402 
403  p4 = vlib_get_buffer (vm, from[4]);
404  p5 = vlib_get_buffer (vm, from[5]);
405  p6 = vlib_get_buffer (vm, from[6]);
406  p7 = vlib_get_buffer (vm, from[7]);
407 
408  vlib_prefetch_buffer_header (p4, LOAD);
409  vlib_prefetch_buffer_header (p5, LOAD);
410  vlib_prefetch_buffer_header (p6, LOAD);
411  vlib_prefetch_buffer_header (p7, LOAD);
412  }
413 
414  bi0 = to_next[0] = from[0];
415  bi1 = to_next[1] = from[1];
416  bi2 = to_next[2] = from[2];
417  bi3 = to_next[3] = from[3];
418 
419  from += 4;
420  n_left_from -= 4;
421  to_next += 4;
422  n_left_to_next -= 4;
423 
424  b0 = vlib_get_buffer (vm, bi0);
425  b1 = vlib_get_buffer (vm, bi1);
426  b2 = vlib_get_buffer (vm, bi2);
427  b3 = vlib_get_buffer (vm, bi3);
428 
429  /* punt and drop features are not associated with a given interface
430  * so the special index 0 is used */
431  vnet_feature_arc_start (arc_index, 0, &next0, b0);
432  vnet_feature_arc_start (arc_index, 0, &next1, b1);
433  vnet_feature_arc_start (arc_index, 0, &next2, b2);
434  vnet_feature_arc_start (arc_index, 0, &next3, b3);
435 
437  to_next, n_left_to_next,
438  bi0, bi1, bi2, bi3,
439  next0, next1, next2, next3);
440  }
441 
442  while (n_left_from > 0 && n_left_to_next > 0)
443  {
444  vlib_buffer_t *b0;
445  u32 next0;
446  u32 bi0;
447 
448  next0 = 0;
449  bi0 = to_next[0] = from[0];
450 
451  from += 1;
452  n_left_from -= 1;
453  to_next += 1;
454  n_left_to_next -= 1;
455 
456  b0 = vlib_get_buffer (vm, bi0);
457 
458  vnet_feature_arc_start (arc_index, 0, &next0, b0);
459 
461  n_left_to_next, bi0, next0);
462  }
463  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
464  }
465 
466  return frame->n_vectors;
467 }
468 
469 #endif
470 
471 /*
472  * fd.io coding-style-patch-verification: ON
473  *
474  * Local Variables:
475  * eval: (c-set-style "gnu")
476  * End:
477  */
ip6_punt_policer_node
vlib_node_registration_t ip6_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_policer_node)
Definition: ip6_punt_drop.c:82
ip4_punt_redirect_trace_t_::next
u32 next
Definition: ip_punt_drop.h:264
vnet_feature_config_main_t_
Definition: feature.h:80
dpo_id_t_::dpoi_next_node
u16 dpoi_next_node
The next VLIB node to follow.
Definition: dpo.h:186
dpo_id_t_::dpoi_index
index_t dpoi_index
the index of objects of that type
Definition: dpo.h:190
vnet_feature_config_main_t_::config_main
vnet_config_main_t config_main
Definition: feature.h:82
ip_punt_policer_trace_t_::next
u32 next
Definition: ip_punt_drop.h:43
vlib_prefetch_buffer_header
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
Definition: buffer.h:231
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: nat44_ei.c:3048
next_index
nat44_ei_hairpin_src_next_t next_index
Definition: nat44_ei_hairpinning.c:412
ip_punt_redirect_find
index_t ip_punt_redirect_find(fib_protocol_t fproto, u32 rx_sw_if_index)
Definition: ip_punt_drop.c:59
vlib_get_buffer
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:111
IP_PUNT_REDIRECT_NEXT_TX
@ IP_PUNT_REDIRECT_NEXT_TX
Definition: ip_punt_drop.h:253
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:549
IP_PUNT_POLICER_NEXT_DROP
@ IP_PUNT_POLICER_NEXT_DROP
Definition: ip_punt_drop.h:35
format_ip_punt_redirect
u8 * format_ip_punt_redirect(u8 *s, va_list *args)
Definition: ip_punt_drop.c:129
ip_punt_policer_next_t_
ip_punt_policer_next_t_
Definition: ip_punt_drop.h:33
node
vlib_main_t vlib_node_runtime_t * node
Definition: nat44_ei.c:3047
foreach_ip_punt_policer_error
#define foreach_ip_punt_policer_error
Definition: ip_punt_drop.h:46
vlib_validate_buffer_enqueue_x4
#define vlib_validate_buffer_enqueue_x4(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, bi2, bi3, next0, next1, next2, next3)
Finish enqueueing four buffers forward in the graph.
Definition: buffer_node.h:140
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
fm
vnet_feature_main_t * fm
Definition: nat44_ei_hairpinning.c:592
ip_punt_redirect_add
void ip_punt_redirect_add(fib_protocol_t fproto, u32 rx_sw_if_index, fib_forward_chain_type_t ct, const fib_route_path_t *rpaths)
Add a punt redirect entry.
Definition: ip_punt_drop.c:72
ip_punt_policer_trace_t
struct ip_punt_policer_trace_t_ ip_punt_policer_trace_t
VLIB_RX
@ VLIB_RX
Definition: defs.h:46
policer.h
ip_punt_policer_t_::policer_index
u32 policer_index
Definition: ip_punt_drop.h:29
vlib_frame_t
Definition: node.h:372
IP4_PUNT_POLICER_N_ERROR
@ IP4_PUNT_POLICER_N_ERROR
Definition: ip_punt_drop.h:54
ip4_punt_redirect_trace_t_::rrxi
index_t rrxi
Definition: ip_punt_drop.h:263
ip_punt_redirect_cfg
ip_punt_redirect_cfg_t ip_punt_redirect_cfg
Definition: ip_punt_drop.c:20
ip_punt_redirect_t_::redirect_by_rx_sw_if_index
index_t * redirect_by_rx_sw_if_index[FIB_PROTOCOL_IP_MAX]
per-RX interface configuration.
Definition: ip_punt_drop.h:242
ip_punt_policer_t
struct ip_punt_policer_t_ ip_punt_policer_t
IP4 punt policer configuration we police the punt rate to prevent overloading the host.
ip_punt_policer_t_::fq_index
u32 fq_index
Definition: ip_punt_drop.h:30
ip_punt_policer_t_
IP4 punt policer configuration we police the punt rate to prevent overloading the host.
Definition: ip_punt_drop.h:27
ip_punt_redirect_rx_t
struct ip_punt_redirect_rx_t_ ip_punt_redirect_rx_t
IP4 punt redirect per-rx interface configuration redirect punted traffic to another location.
ip_punt_redirect_rx_t_::node
fib_node_t node
Node linkage into the FIB graph.
Definition: ip_punt_drop.h:217
ip_punt_redirect_rx_t_::fproto
fib_protocol_t fproto
Definition: ip_punt_drop.h:219
ip_punt_policer_next_t
enum ip_punt_policer_next_t_ ip_punt_policer_next_t
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
vlib_buffer_t::error
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:145
fib_forward_chain_type_t
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
vnet_buffer
#define vnet_buffer(b)
Definition: buffer.h:441
FIB_PROTOCOL_IP_MAX
#define FIB_PROTOCOL_IP_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements.
Definition: fib_types.h:57
IP_PUNT_POLICER_N_NEXT
@ IP_PUNT_POLICER_N_NEXT
Definition: ip_punt_drop.h:37
ip_punt_policer_trace_t_
Definition: ip_punt_drop.h:40
PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition: clib.h:124
ip_punt_redirect
static uword ip_punt_redirect(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index, fib_protocol_t fproto)
Definition: ip_punt_drop.h:294
vlib_frame_vector_args
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:301
index_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:43
static_always_inline
#define static_always_inline
Definition: clib.h:112
ip_punt_redirect_walk_cb_t
walk_rc_t(* ip_punt_redirect_walk_cb_t)(u32 rx_sw_if_index, const ip_punt_redirect_rx_t *redirect, void *arg)
Definition: ip_punt_drop.h:281
fib_node_index_t
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
uword
u64 uword
Definition: types.h:112
arc_index
u8 arc_index
Definition: nat44_ei_hairpinning.c:593
ip_punt_policer_trace_t_::policer_index
u32 policer_index
Definition: ip_punt_drop.h:42
QOS_ACTION_DROP
@ QOS_ACTION_DROP
Definition: police.h:29
cm
vnet_feature_config_main_t * cm
Definition: nat44_ei_hairpinning.c:594
ip_punt_policer
static uword ip_punt_policer(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index, u32 policer_index)
IP punt policing node function.
Definition: ip_punt_drop.h:67
vnet_policer_police
static_always_inline u8 vnet_policer_police(vlib_main_t *vm, vlib_buffer_t *b, u32 policer_index, u64 time_in_policer_periods, policer_result_e packet_color, bool handoff)
Definition: police_inlines.h:59
fib_protocol_t
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
ip_punt_redirect_rx_t_
IP4 punt redirect per-rx interface configuration redirect punted traffic to another location.
Definition: ip_punt_drop.h:212
feature_main
vnet_feature_main_t feature_main
Definition: pnat_test_stubs.h:27
police_inlines.h
IP_PUNT_POLICER_NEXT_HANDOFF
@ IP_PUNT_POLICER_NEXT_HANDOFF
Definition: ip_punt_drop.h:36
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
ip_punt_redirect_del
void ip_punt_redirect_del(fib_protocol_t fproto, u32 rx_sw_if_index)
Definition: ip_punt_drop.c:105
ip_punt_redirect_rx_t_::payload_type
fib_forward_chain_type_t payload_type
Definition: ip_punt_drop.h:220
ip_punt_redirect_rx_t_::pl
fib_node_index_t pl
Definition: ip_punt_drop.h:221
POLICER_TICKS_PER_PERIOD_SHIFT
#define POLICER_TICKS_PER_PERIOD_SHIFT
Definition: police.h:70
vlib_buffer_t::current_config_index
u32 current_config_index
Used by feature subgraph arcs to visit enabled feature nodes.
Definition: buffer.h:156
ip_punt_redirect_walk
void ip_punt_redirect_walk(fib_protocol_t fproto, ip_punt_redirect_walk_cb_t cb, void *ctx)
Definition: ip_punt_drop.c:158
format_ip_punt_redirect_trace
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
Definition: ip_punt_drop.c:23
ip_punt_redirect_rx_t_::dpo
dpo_id_t dpo
redirect forwarding
Definition: ip_punt_drop.h:227
vlib_validate_buffer_enqueue_x1
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
Definition: buffer_node.h:224
ip_punt_redirect_next_t_
ip_punt_redirect_next_t_
IP punt redirect next nodes.
Definition: ip_punt_drop.h:250
always_inline
#define always_inline
Definition: rdma_mlx5dv.h:23
u64
unsigned long u64
Definition: types.h:89
vlib_put_next_frame
vlib_put_next_frame(vm, node, next_index, 0)
ip.h
POLICE_CONFORM
@ POLICE_CONFORM
Definition: police.h:20
u32
unsigned int u32
Definition: types.h:88
format_ip_punt_policer_trace
u8 * format_ip_punt_policer_trace(u8 *s, va_list *args)
Definition: ip4_punt_drop.c:39
fib_route_path_t_
A representation of a path as described by a route producer.
Definition: fib_types.h:500
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
ip_punt_redirect_rx_t_::sibling
u32 sibling
Definition: ip_punt_drop.h:222
ip6_punt_policer_cfg
ip_punt_policer_t ip6_punt_policer_cfg
Definition: ip6_punt_drop.c:38
ip_punt_redirect_get
static_always_inline ip_punt_redirect_rx_t * ip_punt_redirect_get(index_t rrxi)
Definition: ip_punt_drop.h:288
IP_PUNT_REDIRECT_NEXT_ARP
@ IP_PUNT_REDIRECT_NEXT_ARP
Definition: ip_punt_drop.h:254
fib_node_t_
An node in the FIB graph.
Definition: fib_node.h:301
vlib_main_t
Definition: main.h:102
vlib_add_trace
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
Definition: trace.c:628
u8
unsigned char u8
Definition: types.h:56
IP_PUNT_REDIRECT_N_NEXT
@ IP_PUNT_REDIRECT_N_NEXT
Definition: ip_punt_drop.h:255
QOS_ACTION_HANDOFF
@ QOS_ACTION_HANDOFF
Definition: police.h:32
vnet_get_config_data
static void * vnet_get_config_data(vnet_config_main_t *cm, u32 *config_index, u32 *next_index, u32 n_data_bytes)
Definition: config.h:123
ip_punt_redirect_next_t
enum ip_punt_redirect_next_t_ ip_punt_redirect_next_t
IP punt redirect next nodes.
vnet_feature_arc_start
static_always_inline void vnet_feature_arc_start(u8 arc, u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
Definition: feature.h:302
dpo_id_t_
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:172
vlib_validate_buffer_enqueue_x2
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
Definition: buffer_node.h:70
IP_PUNT_REDIRECT_NEXT_DROP
@ IP_PUNT_REDIRECT_NEXT_DROP
Definition: ip_punt_drop.h:252
vnet_feature_main_t::feature_config_mains
vnet_feature_config_main_t * feature_config_mains
feature config main objects
Definition: feature.h:100
ip_punt_redirect_t_
IP punt redirect configuration.
Definition: ip_punt_drop.h:233
vlib_node_runtime_t
Definition: node.h:454
ip4_punt_redirect_trace_t_
IP Punt redirect trace.
Definition: ip_punt_drop.h:261
ip_drop_or_punt
static uword ip_drop_or_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index)
Definition: ip_punt_drop.h:377
clib_cpu_time_now
static u64 clib_cpu_time_now(void)
Definition: time.h:81
from
from
Definition: nat44_ei_hairpinning.c:415
INDEX_INVALID
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
Definition: dpo.h:49
PREDICT_TRUE
#define PREDICT_TRUE(x)
Definition: clib.h:125
ip_punt_redirect_cfg_t
struct ip_punt_redirect_t_ ip_punt_redirect_cfg_t
IP punt redirect configuration.
vlib_get_next_frame
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
Definition: node_funcs.h:395
VLIB_TX
@ VLIB_TX
Definition: defs.h:47
walk_rc_t
enum walk_rc_t_ walk_rc_t
Walk return code.
n_left_from
n_left_from
Definition: nat44_ei_hairpinning.c:416
ip4_punt_policer_node
vlib_node_registration_t ip4_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_policer_node)
Definition: ip4_punt_drop.c:93
ip_punt_redirect_trace_t
struct ip4_punt_redirect_trace_t_ ip_punt_redirect_trace_t
IP Punt redirect trace.
ip_punt_redirect_t_::pool
ip_punt_redirect_rx_t * pool
Definition: ip_punt_drop.h:235
vnet_feature_main_t
Definition: feature.h:86
ip4_punt_policer_cfg
ip_punt_policer_t ip4_punt_policer_cfg
Definition: ip4_punt_drop.c:49
vlib_buffer_t::flags
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
Definition: buffer.h:133
ip_punt_policer_error_t
ip_punt_policer_error_t
Definition: ip_punt_drop.h:49
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111