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