FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
nsh_output.c
Go to the documentation of this file.
1 /*
2  * nsh_output.c: NSH Adj rewrite
3  *
4  * Copyright (c) 2017-2019 Intel and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #include <vlib/vlib.h>
19 #include <vnet/pg/pg.h>
20 #include <vnet/ip/ip.h>
21 #include <nsh/nsh.h>
22 
23 typedef struct {
24  /* Adjacency taken. */
27 
28  /* Packet data, possibly *after* rewrite. */
29  u8 packet_data[64 - 1*sizeof(u32)];
31 
32 #define foreach_nsh_output_next \
33 _(DROP, "error-drop") \
34 _(INTERFACE, "interface-output" )
35 
36 typedef enum {
37 #define _(s,n) NSH_OUTPUT_NEXT_##s,
39 #undef _
42 
43 static u8 *
44 format_nsh_output_trace (u8 * s, va_list * args)
45 {
46  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
47  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
48  nsh_output_trace_t * t = va_arg (*args, nsh_output_trace_t *);
49  uword indent = format_get_indent (s);
50 
51  s = format (s, "adj-idx %d : %U flow hash: 0x%08x",
52  t->adj_index,
54  t->flow_hash);
55  s = format (s, "\n%U%U",
56  format_white_space, indent,
58  t->adj_index, t->packet_data, sizeof (t->packet_data));
59  return s;
60 }
61 
62 static inline uword
65  vlib_frame_t * from_frame,
66  int is_midchain)
67 {
68  u32 n_left_from, next_index, * from, * to_next, thread_index;
69  vlib_node_runtime_t * error_node;
70  u32 n_left_to_next;
71  nsh_main_t *nm;
72 
73  thread_index = vlib_get_thread_index();
74  error_node = vlib_node_get_runtime (vm, nsh_eth_output_node.index);
75  from = vlib_frame_vector_args (from_frame);
76  n_left_from = from_frame->n_vectors;
77  next_index = node->cached_next_index;
78  nm = &nsh_main;
79 
80  while (n_left_from > 0)
81  {
82  vlib_get_next_frame (vm, node, next_index,
83  to_next, n_left_to_next);
84 
85  while (n_left_from >= 4 && n_left_to_next >= 2)
86  {
87  ip_adjacency_t * adj0;
88  nsh_base_header_t *hdr0;
89  ethernet_header_t * eth_hdr0;
90  vlib_buffer_t * p0;
91  u32 pi0, adj_index0, next0, error0;
92 
93  ip_adjacency_t * adj1;
94  nsh_base_header_t *hdr1;
95  ethernet_header_t * eth_hdr1;
96  vlib_buffer_t * p1;
97  u32 pi1, adj_index1, next1, error1;
98  int pkt_len0, pkt_len1;
99  word rw_len0, rw_len1;
100 
101  /* Prefetch next iteration. */
102  {
103  vlib_buffer_t * p2, * p3;
104 
105  p2 = vlib_get_buffer (vm, from[2]);
106  p3 = vlib_get_buffer (vm, from[3]);
107 
108  vlib_prefetch_buffer_header (p2, STORE);
109  vlib_prefetch_buffer_header (p3, STORE);
110 
111  CLIB_PREFETCH (p2->data, sizeof (hdr0[0]), STORE);
112  CLIB_PREFETCH (p3->data, sizeof (hdr1[0]), STORE);
113  }
114 
115  pi0 = to_next[0] = from[0];
116  pi1 = to_next[1] = from[1];
117 
118  from += 2;
119  n_left_from -= 2;
120  to_next += 2;
121  n_left_to_next -= 2;
122 
123  p0 = vlib_get_buffer (vm, pi0);
124  p1 = vlib_get_buffer (vm, pi1);
125 
126  adj_index0 = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
127  adj_index1 = vnet_buffer (p1)->ip.adj_index[VLIB_TX];
128 
129  adj0 = adj_get(adj_index0);
130  adj1 = adj_get(adj_index1);
131  hdr0 = vlib_buffer_get_current (p0);
132  hdr1 = vlib_buffer_get_current (p1);
133 
134  /* Guess we are only writing on simple Ethernet header. */
135  vnet_rewrite_two_headers (adj0[0], adj1[0], hdr0, hdr1,
136  sizeof (ethernet_header_t));
137 
138  eth_hdr0 = (ethernet_header_t*)((u8 *)hdr0-sizeof(ethernet_header_t));
139  eth_hdr0->type = clib_host_to_net_u16(ETHERNET_TYPE_NSH);
140  eth_hdr1 = (ethernet_header_t*)((u8 *)hdr1-sizeof(ethernet_header_t));
141  eth_hdr1->type = clib_host_to_net_u16(ETHERNET_TYPE_NSH);
142 
143  /* Update packet buffer attributes/set output interface. */
144  rw_len0 = adj0[0].rewrite_header.data_bytes;
145  rw_len1 = adj1[0].rewrite_header.data_bytes;
146  pkt_len0 = vlib_buffer_length_in_chain (vm, p0);
147  pkt_len1 = vlib_buffer_length_in_chain (vm, p1);
148 
149  /* Bump the adj counters for packet and bytes */
150  if (adj_index0 == adj_index1)
151  {
152  vlib_increment_combined_counter (&adjacency_counters, thread_index, adj_index0, 2,
153  pkt_len0 + rw_len0 + pkt_len1 + rw_len1);
154  }
155  else
156  {
157  vlib_increment_combined_counter (&adjacency_counters, thread_index, adj_index0, 1,
158  pkt_len0 + rw_len0);
159  vlib_increment_combined_counter (&adjacency_counters, thread_index, adj_index1, 1,
160  pkt_len1 + rw_len1);
161  }
162  /* Check MTU of outgoing interface. */
163  if (PREDICT_TRUE(pkt_len0 <=
164  adj0[0].rewrite_header.max_l3_packet_bytes))
165  {
166  vlib_buffer_advance (p0, -rw_len0);
167 
168  vnet_buffer (p0)->sw_if_index[VLIB_TX] =
169  adj0[0].rewrite_header.sw_if_index;
170  next0 = NSH_OUTPUT_NEXT_INTERFACE;
171  error0 = IP4_ERROR_NONE;
172 
173  if (PREDICT_FALSE(adj0[0].rewrite_header.flags & VNET_REWRITE_HAS_FEATURES))
175  adj0[0].rewrite_header.sw_if_index,
176  &next0, p0);
177  }
178  else
179  {
180  error0 = IP4_ERROR_MTU_EXCEEDED;
181  next0 = NSH_OUTPUT_NEXT_DROP;
182  }
183  if (PREDICT_TRUE(pkt_len1 <=
184  adj1[0].rewrite_header.max_l3_packet_bytes))
185  {
186  vlib_buffer_advance (p1, -rw_len1);
187 
188  vnet_buffer (p1)->sw_if_index[VLIB_TX] =
189  adj1[0].rewrite_header.sw_if_index;
190  next1 = NSH_OUTPUT_NEXT_INTERFACE;
191  error1 = IP4_ERROR_NONE;
192 
193  if (PREDICT_FALSE(adj1[0].rewrite_header.flags & VNET_REWRITE_HAS_FEATURES))
195  adj1[0].rewrite_header.sw_if_index,
196  &next1, p1);
197  }
198  else
199  {
200  error1 = IP4_ERROR_MTU_EXCEEDED;
201  next1 = NSH_OUTPUT_NEXT_DROP;
202  }
203  if (is_midchain)
204  {
205  adj0->sub_type.midchain.fixup_func
206  (vm, adj0, p0, adj0->sub_type.midchain.fixup_data);
207  adj1->sub_type.midchain.fixup_func
208  (vm, adj1, p1, adj1->sub_type.midchain.fixup_data);
209  }
210 
211  p0->error = error_node->errors[error0];
212  p1->error = error_node->errors[error1];
213 
214  if (PREDICT_FALSE(p0->flags & VLIB_BUFFER_IS_TRACED))
215  {
216  nsh_output_trace_t *tr = vlib_add_trace (vm, node,
217  p0, sizeof (*tr));
218  tr->adj_index = vnet_buffer(p0)->ip.adj_index[VLIB_TX];
219  tr->flow_hash = vnet_buffer(p0)->ip.flow_hash;
220  }
221  if (PREDICT_FALSE(p1->flags & VLIB_BUFFER_IS_TRACED))
222  {
223  nsh_output_trace_t *tr = vlib_add_trace (vm, node,
224  p1, sizeof (*tr));
225  tr->adj_index = vnet_buffer(p1)->ip.adj_index[VLIB_TX];
226  tr->flow_hash = vnet_buffer(p1)->ip.flow_hash;
227  }
228 
229  vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
230  to_next, n_left_to_next,
231  pi0, pi1, next0, next1);
232  }
233 
234  while (n_left_from > 0 && n_left_to_next > 0)
235  {
236  ip_adjacency_t * adj0;
237  nsh_base_header_t *hdr0;
238  ethernet_header_t * eth_hdr0;
239  vlib_buffer_t * p0;
240  u32 pi0, adj_index0, next0, error0;
241  int pkt_len0;
242  word rw_len0;
243 
244  pi0 = to_next[0] = from[0];
245 
246  p0 = vlib_get_buffer (vm, pi0);
247 
248  adj_index0 = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
249 
250  adj0 = adj_get(adj_index0);
251  hdr0 = vlib_buffer_get_current (p0);
252 
253  /* Guess we are only writing on simple Ethernet header. */
254  vnet_rewrite_one_header (adj0[0], hdr0,
255  sizeof (ethernet_header_t));
256 
257  eth_hdr0 = (ethernet_header_t*)((u8 *)hdr0-sizeof(ethernet_header_t));
258  eth_hdr0->type = clib_host_to_net_u16(ETHERNET_TYPE_NSH);
259 
260  /* Update packet buffer attributes/set output interface. */
261  rw_len0 = adj0[0].rewrite_header.data_bytes;
262  pkt_len0 = vlib_buffer_length_in_chain (vm, p0);
263 
264  vlib_increment_combined_counter (&adjacency_counters, thread_index, adj_index0, 1,
265  pkt_len0 + rw_len0);
266 
267  /* Check MTU of outgoing interface. */
268  if (PREDICT_TRUE(pkt_len0 <= adj0[0].rewrite_header.max_l3_packet_bytes))
269  {
270  vlib_buffer_advance (p0, -rw_len0);
271 
272  vnet_buffer (p0)->sw_if_index[VLIB_TX] =
273  adj0[0].rewrite_header.sw_if_index;
274  next0 = NSH_OUTPUT_NEXT_INTERFACE;
275  error0 = IP4_ERROR_NONE;
276 
277  if (PREDICT_FALSE(adj0[0].rewrite_header.flags & VNET_REWRITE_HAS_FEATURES))
279  adj0[0].rewrite_header.sw_if_index,
280  &next0, p0);
281  }
282  else
283  {
284  error0 = IP4_ERROR_MTU_EXCEEDED;
285  next0 = NSH_OUTPUT_NEXT_DROP;
286  }
287  if (is_midchain)
288  {
289  adj0->sub_type.midchain.fixup_func
290  (vm, adj0, p0, adj0->sub_type.midchain.fixup_data);
291  }
292 
293  p0->error = error_node->errors[error0];
294 
295  from += 1;
296  n_left_from -= 1;
297  to_next += 1;
298  n_left_to_next -= 1;
299 
300  if (PREDICT_FALSE(p0->flags & VLIB_BUFFER_IS_TRACED))
301  {
302  nsh_output_trace_t *tr = vlib_add_trace (vm, node,
303  p0, sizeof (*tr));
304  tr->adj_index = vnet_buffer(p0)->ip.adj_index[VLIB_TX];
305  tr->flow_hash = vnet_buffer(p0)->ip.flow_hash;
306  }
307 
308  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
309  to_next, n_left_to_next,
310  pi0, next0);
311  }
312 
313  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
314  }
315 
316  return from_frame->n_vectors;
317 }
318 
320 {
323 
326  vlib_frame_t * from_frame)
327 {
328  return (nsh_output_inline(vm, node, from_frame, /* is_midchain */ 0));
329 }
330 
332  .name = "nsh-eth-output",
333  /* Takes a vector of packets. */
334  .vector_size = sizeof (u32),
335  .n_next_nodes = NSH_OUTPUT_N_NEXT,
336  .next_nodes = {
337 #define _(s,n) [NSH_OUTPUT_NEXT_##s] = n,
339 #undef _
340  },
341 
342  .format_trace = format_nsh_output_trace,
343 };
344 
347  vlib_frame_t * from_frame)
348 {
349  return (nsh_output_inline(vm, node, from_frame, /* is_midchain */ 1));
350 }
351 
353  .name = "nsh-midchain",
354  .vector_size = sizeof (u32),
355  .format_trace = format_nsh_output_trace,
356  .n_next_nodes = 1,
357  .next_nodes = {
358  [NSH_MIDCHAIN_NEXT_DROP] = "error-drop",
359  },
360 };
361 
362 /* Built-in nsh tx feature path definition */
363 VNET_FEATURE_INIT (nsh_interface_output, static) = {
364  .arc_name = "nsh-eth-output",
365  .node_name = "interface-output",
366  .runs_before = 0, /* not before any other features */
367 };
368 
369 /* Built-in ip4 tx feature path definition */
370 /* *INDENT-OFF* */
371 VNET_FEATURE_ARC_INIT (nsh_eth_output, static) =
372 {
373  .arc_name = "nsh-eth-output",
374  .start_nodes = VNET_FEATURES ("nsh-midchain"),
375 };
376 
377 VNET_FEATURE_INIT (nsh_eth_tx_drop, static) =
378 {
379  .arc_name = "nsh-eth-output",
380  .node_name = "error-drop",
381  .runs_before = 0, /* not before any other features */
382 };
383 /* *INDENT-ON* */
384 /**
385  * @brief Next index values from the NSH incomplete adj node
386  */
387 #define foreach_nsh_adj_incomplete_next \
388 _(DROP, "error-drop") \
389 _(IP4, "ip4-arp") \
390 _(IP6, "ip6-discover-neighbor")
391 
392 typedef enum {
393 #define _(s,n) NSH_ADJ_INCOMPLETE_NEXT_##s,
395 #undef _
398 
399 /**
400  * @brief A struct to hold tracing information for the NSH label imposition
401  * node.
402  */
404 {
407 
408 
409 /**
410  * @brief Graph node for incomplete NSH adjacency.
411  * This node will push traffic to either the v4-arp or v6-nd node
412  * based on the next-hop proto of the adj.
413  * We pay a cost for this 'routing' node, but an incomplete adj is the
414  * exception case.
415  */
418  vlib_frame_t * from_frame)
419 {
420  u32 n_left_from, next_index, * from, * to_next;
421 
422  from = vlib_frame_vector_args (from_frame);
423  n_left_from = from_frame->n_vectors;
424  next_index = node->cached_next_index;
425 
426  while (n_left_from > 0)
427  {
428  u32 n_left_to_next;
429 
430  vlib_get_next_frame (vm, node, next_index,
431  to_next, n_left_to_next);
432 
433  while (n_left_from > 0 && n_left_to_next > 0)
434  {
435  u32 pi0, next0, adj_index0;
436  ip_adjacency_t * adj0;
437  vlib_buffer_t * p0;
438 
439  pi0 = to_next[0] = from[0];
440  p0 = vlib_get_buffer (vm, pi0);
441  from += 1;
442  n_left_from -= 1;
443  to_next += 1;
444  n_left_to_next -= 1;
445 
446  adj_index0 = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
447 
448  adj0 = adj_get(adj_index0);
449 
451  {
452  next0 = NSH_ADJ_INCOMPLETE_NEXT_IP4;
453  }
454  else
455  {
456  next0 = NSH_ADJ_INCOMPLETE_NEXT_IP6;
457  }
458 
459  if (PREDICT_FALSE(p0->flags & VLIB_BUFFER_IS_TRACED))
460  {
462  vlib_add_trace (vm, node, p0, sizeof (*tr));
463  tr->next = next0;
464  }
465 
466  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
467  to_next, n_left_to_next,
468  pi0, next0);
469  }
470 
471  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
472  }
473 
474  return from_frame->n_vectors;
475 }
476 
477 static u8 *
478 format_nsh_adj_incomplete_trace (u8 * s, va_list * args)
479 {
480  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
481  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
483  uword indent;
484 
485  t = va_arg (*args, nsh_adj_incomplete_trace_t *);
486  indent = format_get_indent (s);
487 
488  s = format (s, "%Unext:%d",
489  format_white_space, indent,
490  t->next);
491  return (s);
492 }
493 
495  .name = "nsh-adj-incomplete",
496  .format_trace = format_nsh_adj_incomplete_trace,
497  /* Takes a vector of packets. */
498  .vector_size = sizeof (u32),
499  .n_next_nodes = NSH_ADJ_INCOMPLETE_N_NEXT,
500  .next_nodes = {
501 #define _(s,n) [NSH_ADJ_INCOMPLETE_NEXT_##s] = n,
503 #undef _
504  },
505 };
506 
nsh_midchain_next_t_
Definition: nsh_output.c:319
#define vnet_rewrite_one_header(rw0, p0, most_likely_size)
Definition: rewrite.h:211
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
Definition: buffer.h:124
enum nsh_midchain_next_t_ nsh_midchain_next_t
#define CLIB_UNUSED(x)
Definition: clib.h:87
format_function_t format_ip_adjacency_packet_data
Definition: format.h:59
static void vlib_increment_combined_counter(vlib_combined_counter_main_t *cm, u32 thread_index, u32 index, u64 n_packets, u64 n_bytes)
Increment a combined counter.
Definition: counter.h:220
#define PREDICT_TRUE(x)
Definition: clib.h:121
IP unicast adjacency.
Definition: adj.h:227
VNET_FEATURE_ARC_INIT(nsh_eth_output, static)
static u32 format_get_indent(u8 *s)
Definition: format.h:72
vlib_node_registration_t nsh_adj_incomplete_node
(constructor) VLIB_REGISTER_NODE (nsh_adj_incomplete_node)
Definition: nsh_output.c:494
vlib_main_t * vm
Definition: in2out_ed.c:1582
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:424
#define VLIB_NODE_FN(node)
Definition: node.h:202
vlib_error_t * errors
Vector of errors for this node.
Definition: node.h:469
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
Definition: buffer_funcs.h:402
u8 output_feature_arc_index
Definition: nsh.h:160
unsigned char u8
Definition: types.h:56
A struct to hold tracing information for the NSH label imposition node.
Definition: nsh_output.c:403
u8 packet_data[64 - 1 *sizeof(u32)]
Definition: nsh_output.c:29
VNET_FEATURE_INIT(nsh_interface_output, static)
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
Definition: adj.h:459
i64 word
Definition: types.h:111
format_function_t format_ip_adjacency
Definition: format.h:58
vlib_node_registration_t nsh_midchain_node
(constructor) VLIB_REGISTER_NODE (nsh_midchain_node)
Definition: nsh_output.c:352
u8 * format_white_space(u8 *s, va_list *va)
Definition: std-formats.c:129
struct nsh_adj_incomplete_trace_t_ nsh_adj_incomplete_trace_t
A struct to hold tracing information for the NSH label imposition node.
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
Definition: buffer.h:203
vlib_node_registration_t nsh_eth_output_node
(constructor) VLIB_REGISTER_NODE (nsh_eth_output_node)
Definition: nsh_output.c:331
unsigned int u32
Definition: types.h:88
struct ip_adjacency_t_::@149::@151 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
union ip_adjacency_t_::@149 sub_type
static u8 * format_nsh_output_trace(u8 *s, va_list *args)
Definition: nsh_output.c:44
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:136
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:229
static uword nsh_output_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_midchain)
Definition: nsh_output.c:63
#define PREDICT_FALSE(x)
Definition: clib.h:120
#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
#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
#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:391
vlib_combined_counter_main_t adjacency_counters
Adjacency packet counters.
Definition: adj.c:25
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169
u16 n_vectors
Definition: node.h:396
static_always_inline uword vlib_get_thread_index(void)
Definition: threads.h:219
#define CLIB_PREFETCH(addr, size, type)
Definition: cache.h:80
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
Definition: node_funcs.h:115
u8 data[]
Packet data.
Definition: buffer.h:181
nsh_main_t nsh_main
Definition: nsh.c:28
static u8 * format_nsh_adj_incomplete_trace(u8 *s, va_list *args)
Definition: nsh_output.c:478
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
Definition: main.c:483
vlib_main_t vlib_node_runtime_t * node
Definition: in2out_ed.c:1582
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
Definition: node.h:510
#define foreach_nsh_output_next
Definition: nsh_output.c:32
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
Definition: buffer.h:248
#define VNET_FEATURES(...)
Definition: feature.h:470
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
Definition: adj.h:342
Definition: defs.h:47
VLIB buffer representation.
Definition: buffer.h:102
u64 uword
Definition: types.h:112
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:297
#define foreach_nsh_adj_incomplete_next
Next index values from the NSH incomplete adj node.
Definition: nsh_output.c:387
nsh_output_next_t
Definition: nsh_output.c:36
#define vnet_buffer(b)
Definition: buffer.h:417
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
Definition: trace.c:577
#define vnet_rewrite_two_headers(rw0, rw1, p0, p1, most_likely_size)
Definition: rewrite.h:215
This adjacency/interface has output features configured.
Definition: rewrite.h:57
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:85
nsh_adj_incomplete_next_t
Definition: nsh_output.c:392
static_always_inline void vnet_feature_arc_start(u8 arc, u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
Definition: feature.h:302