FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
interface.c
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  * srp_interface.c: srp interfaces
17  *
18  * Copyright (c) 2008 Eliot Dresselhaus
19  *
20  * Permission is hereby granted, free of charge, to any person obtaining
21  * a copy of this software and associated documentation files (the
22  * "Software"), to deal in the Software without restriction, including
23  * without limitation the rights to use, copy, modify, merge, publish,
24  * distribute, sublicense, and/or sell copies of the Software, and to
25  * permit persons to whom the Software is furnished to do so, subject to
26  * the following conditions:
27  *
28  * The above copyright notice and this permission notice shall be
29  * included in all copies or substantial portions of the Software.
30  *
31  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
35  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
36  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
37  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38  */
39 
40 #include <vnet/vnet.h>
41 #include <vnet/pg/pg.h>
42 #include <vnet/srp/srp.h>
43 
44 static u8*
47  vnet_link_t link_type,
48  const void * dst_address)
49 {
51  srp_main_t * sm = &srp_main;
53  u8* rewrite = NULL;
54  u16 type;
55  uword n_bytes = sizeof (h[0]);
56 
57  switch (link_type) {
58 #define _(a,b) case VNET_LINK_##a: type = ETHERNET_TYPE_##b; break
59  _ (IP4, IP4);
60  _ (IP6, IP6);
61  _ (MPLS, MPLS);
62  _ (ARP, ARP);
63 #undef _
64  default:
65  return (NULL);
66  }
67 
70 
71  clib_memcpy (h->ethernet.src_address, hw->hw_address, sizeof (h->ethernet.src_address));
72  if (dst_address)
73  clib_memcpy (h->ethernet.dst_address, dst_address, sizeof (h->ethernet.dst_address));
74  else
75  clib_memset (h->ethernet.dst_address, ~0, sizeof (h->ethernet.dst_address)); /* broadcast */
76 
77  h->ethernet.type = clib_host_to_net_u16 (type);
78 
79  h->srp.as_u16 = 0;
80  h->srp.mode = SRP_MODE_data;
81  h->srp.ttl = sm->default_data_ttl;
83 
84  return (rewrite);
85 }
86 
87 static void srp_register_interface_helper (u32 * hw_if_indices_by_side, u32 redistribute);
88 
89 void serialize_srp_main (serialize_main_t * m, va_list * va)
90 {
91  srp_main_t * sm = &srp_main;
93 
94  serialize_integer (m, pool_elts (sm->interface_pool), sizeof (u32));
96  serialize_integer (m, si->rings[SRP_RING_OUTER].hw_if_index, sizeof (u32));
97  serialize_integer (m, si->rings[SRP_RING_INNER].hw_if_index, sizeof (u32));
98  }
99 }
100 
101 void unserialize_srp_main (serialize_main_t * m, va_list * va)
102 {
103  u32 i, n_ifs, hw_if_indices[SRP_N_RING];
104 
105  unserialize_integer (m, &n_ifs, sizeof (u32));
106  for (i = 0; i < n_ifs; i++)
107  {
108  unserialize_integer (m, &hw_if_indices[SRP_RING_OUTER], sizeof (u32));
109  unserialize_integer (m, &hw_if_indices[SRP_RING_INNER], sizeof (u32));
110  srp_register_interface_helper (hw_if_indices, /* redistribute */ 0);
111  }
112 }
113 
114 static void srp_register_interface_helper (u32 * hw_if_indices_by_side, u32 redistribute)
115 {
116  vnet_main_t * vnm = vnet_get_main();
117  srp_main_t * sm = &srp_main;
120  uword s, * p;
121 
122  /* Check if interface has already been registered. */
123  p = hash_get (sm->interface_index_by_hw_if_index, hw_if_indices_by_side[0]);
124  if (p)
125  {
126  si = pool_elt_at_index (sm->interface_pool, p[0]);
127  }
128  else
129  {
130  pool_get (sm->interface_pool, si);
131  clib_memset (si, 0, sizeof (si[0]));
132  }
133  for (s = 0; s < SRP_N_SIDE; s++)
134  {
135  hws[s] = vnet_get_hw_interface (vnm, hw_if_indices_by_side[s]);
136  si->rings[s].ring = s;
137  si->rings[s].hw_if_index = hw_if_indices_by_side[s];
138  si->rings[s].sw_if_index = hws[s]->sw_if_index;
139  hash_set (sm->interface_index_by_hw_if_index, hw_if_indices_by_side[s], si - sm->interface_pool);
140  }
141 
142  /* Inherit MAC address from outer ring. */
143  clib_memcpy (si->my_address, hws[SRP_RING_OUTER]->hw_address,
144  vec_len (hws[SRP_RING_OUTER]->hw_address));
145 
146  /* Default time to wait to restore signal. */
147  si->config.wait_to_restore_idle_delay = 60;
148  si->config.ips_tx_interval = 1;
149 }
150 
151 void srp_register_interface (u32 * hw_if_indices_by_side)
152 {
153  srp_register_interface_helper (hw_if_indices_by_side, /* redistribute */ 1);
154 }
155 
157 {
159  si->hw_wrap_function = f;
160 }
161 
163 {
165  si->hw_enable_function = f;
166 }
167 
168 void srp_interface_enable_ips (u32 hw_if_index)
169 {
170  srp_main_t * sm = &srp_main;
172 
173  si->ips_process_enable = 1;
174 
175  vlib_node_set_state (sm->vlib_main, srp_ips_process_node.index, VLIB_NODE_STATE_POLLING);
176 }
177 
178 static uword
179 srp_is_valid_class_for_interface (vnet_main_t * vnm, u32 hw_if_index, u32 hw_class_index)
180 {
182 
183  if (! si)
184  return 0;
185 
186  /* Both sides must be admin down. */
188  return 0;
190  return 0;
191 
192  return 1;
193 }
194 
195 static void
197  u32 old_hw_class_index, u32 new_hw_class_index)
198 {
199  srp_main_t * sm = &srp_main;
202  vnet_device_class_t * dc;
203  u32 r, to_srp;
204 
205  if (!si) {
206  clib_warning ("srp interface no set si = 0");
207  return;
208  }
209 
210  to_srp = new_hw_class_index == srp_hw_interface_class.index;
211 
212  /* Changing class on either outer or inner rings implies changing the class
213  of the other. */
214  for (r = 0; r < SRP_N_RING; r++)
215  {
216  srp_interface_ring_t * ir = &si->rings[r];
217 
218  hi = vnet_get_hw_interface (vnm, ir->hw_if_index);
219  dc = vnet_get_device_class (vnm, hi->dev_class_index);
220 
221  /* hw_if_index itself will be handled by caller. */
222  if (ir->hw_if_index != hw_if_index)
223  {
225  new_hw_class_index,
226  to_srp ? si - sm->interface_pool : ~0);
227 
228  if (dc->hw_class_change)
229  dc->hw_class_change (vnm, ir->hw_if_index, new_hw_class_index);
230  }
231  else
232  hi->hw_instance = to_srp ? si - sm->interface_pool : ~0;
233  }
234 
235  if (si->hw_enable_function)
236  si->hw_enable_function (si, /* enable */ to_srp);
237 }
238 
240  .name = "SRP",
241  .format_address = format_ethernet_address,
242  .format_header = format_srp_header_with_length,
243  .format_device = format_srp_device,
244  .unformat_hw_address = unformat_ethernet_address,
245  .unformat_header = unformat_srp_header,
246  .build_rewrite = srp_build_rewrite,
247  .update_adjacency = ethernet_update_adjacency,
248  .is_valid_class_for_interface = srp_is_valid_class_for_interface,
249  .hw_class_change = srp_interface_hw_class_change,
250 };
251 
253 {
255  ASSERT (si != 0);
256  c[0] = si->config;
257 }
258 
260 {
262  ASSERT (si != 0);
263  if (memcmp (&si->config, &c[0], sizeof (c[0])))
264  {
265  si->config = c[0];
266  }
267 }
268 
269 #if DEBUG > 0
270 
271 #define VNET_SIMULATED_SRP_TX_NEXT_SRP_INPUT VNET_INTERFACE_TX_N_NEXT
272 /* Echo packets back to srp input. */
273 static uword
274 simulated_srp_interface_tx (vlib_main_t * vm,
277 {
278  u32 n_left_from, n_left_to_next, n_copy, * from, * to_next;
279  u32 next_index = VNET_SIMULATED_SRP_TX_NEXT_SRP_INPUT;
280  u32 i;
281  vlib_buffer_t * b;
282 
283  n_left_from = frame->n_vectors;
285 
286  while (n_left_from > 0)
287  {
288  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
289 
290  n_copy = clib_min (n_left_from, n_left_to_next);
291 
292  clib_memcpy_fast (to_next, from, n_copy * sizeof (from[0]));
293  n_left_to_next -= n_copy;
294  n_left_from -= n_copy;
295  for (i = 0; i < n_copy; i++)
296  {
297  b = vlib_get_buffer (vm, from[i]);
298  /* TX interface will be fake eth; copy to RX for benefit of srp-input. */
299  b->sw_if_index[VLIB_RX] = b->sw_if_index[VLIB_TX];
300  }
301 
302  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
303  }
304 
305  return n_left_from;
306 }
307 
308 static u8 * format_simulated_srp_name (u8 * s, va_list * args)
309 {
310  u32 dev_instance = va_arg (*args, u32);
311  return format (s, "fake-srp%d", dev_instance);
312 }
313 
314 VNET_DEVICE_CLASS (srp_simulated_device_class,static) = {
315  .name = "Simulated srp",
316  .format_device_name = format_simulated_srp_name,
317  .tx_function = simulated_srp_interface_tx,
318 };
319 
320 static clib_error_t *
321 create_simulated_srp_interfaces (vlib_main_t * vm,
322  unformat_input_t * input,
323  vlib_cli_command_t * cmd)
324 {
325  vnet_main_t * vnm = vnet_get_main();
326  u8 address[6];
327  u32 hw_if_index;
329  static u32 instance;
330 
332  {
333  clib_memset (address, 0, sizeof (address));
334  address[0] = 0xde;
335  address[1] = 0xad;
336  address[5] = instance;
337  }
338 
339  hw_if_index = vnet_register_interface (vnm,
340  srp_simulated_device_class.index,
341  instance++,
342  srp_hw_interface_class.index, 0);
343 
344  hi = vnet_get_hw_interface (vnm, hw_if_index);
345 
346  srp_setup_node (vm, hi->output_node_index);
347 
348  hi->min_packet_bytes = 40 + 16;
349 
350  /* Standard default ethernet MTU. */
352 
353  vec_free (hi->hw_address);
354  vec_add (hi->hw_address, address, sizeof (address));
355 
356  {
357  uword slot;
358 
360  (vm, hi->tx_node_index,
361  "srp-input",
362  VNET_SIMULATED_SRP_TX_NEXT_SRP_INPUT);
363  ASSERT (slot == VNET_SIMULATED_SRP_TX_NEXT_SRP_INPUT);
364  }
365 
366  return /* no error */ 0;
367 }
368 
369 static VLIB_CLI_COMMAND (create_simulated_srp_interface_command) = {
370  .path = "srp create-interfaces",
371  .short_help = "Create simulated srp interface",
372  .function = create_simulated_srp_interfaces,
373 };
374 #endif
srp_build_rewrite
static u8 * srp_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
Definition: interface.c:45
srp_interface_set_hw_enable_function
void srp_interface_set_hw_enable_function(u32 hw_if_index, srp_hw_enable_function_t *f)
Definition: interface.c:162
srp_register_interface_helper
static void srp_register_interface_helper(u32 *hw_if_indices_by_side, u32 redistribute)
Definition: interface.c:114
unformat_ethernet_address
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
Definition: format.c:233
serialize_integer
static void serialize_integer(serialize_main_t *m, u64 x, u32 n_bytes)
Definition: serialize.h:185
srp_ips_process_node
vlib_node_registration_t srp_ips_process_node
Definition: node.c:857
vec_add
#define vec_add(V, E, N)
Add N elements to end of vector V (no header, unspecified alignment)
Definition: vec.h:688
vnet_hw_interface_init_for_class
void vnet_hw_interface_init_for_class(vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index, u32 hw_instance)
Definition: interface.c:1182
unformat_user
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:989
srp_main_t
Definition: srp.h:125
vnet_sw_interface_set_mtu
void vnet_sw_interface_set_mtu(vnet_main_t *vnm, u32 sw_if_index, u32 mtu)
Definition: interface.c:706
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: nat44_ei.c:3048
vnet_device_class_t
struct _vnet_device_class vnet_device_class_t
srp_main_t::vlib_main
vlib_main_t * vlib_main
Definition: srp.h:126
VNET_DEVICE_CLASS
VNET_DEVICE_CLASS(ethernet_simulated_device_class)
clib_memcpy
#define clib_memcpy(d, s, n)
Definition: string.h:197
next_index
nat44_ei_hairpin_src_next_t next_index
Definition: nat44_ei_hairpinning.c:412
pg.h
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
srp.h
f
vlib_frame_t * f
Definition: interface_output.c:1080
vlib_node_set_state
static void vlib_node_set_state(vlib_main_t *vm, u32 node_index, vlib_node_state_t new_state)
Set node dispatch state.
Definition: node_funcs.h:175
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:553
vnet_hw_interface_t::hw_address
u8 * hw_address
Definition: interface.h:649
format_ethernet_address
u8 * format_ethernet_address(u8 *s, va_list *args)
Definition: format.c:44
vnet_hw_interface_t::sw_if_index
u32 sw_if_index
Definition: interface.h:670
srp_main_t::interface_index_by_hw_if_index
uword * interface_index_by_hw_if_index
Definition: srp.h:131
node
vlib_main_t vlib_node_runtime_t * node
Definition: nat44_ei.c:3047
vlib_cli_command_t::path
char * path
Definition: cli.h:96
u16
unsigned short u16
Definition: types.h:57
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
VLIB_RX
@ VLIB_RX
Definition: defs.h:46
hi
vl_api_ip4_address_t hi
Definition: arp.api:37
vnet_get_device_class
static vnet_device_class_t * vnet_get_device_class(vnet_main_t *vnm, u32 dev_class_index)
Definition: interface_funcs.h:124
SRP_RING_OUTER
@ SRP_RING_OUTER
Definition: srp.h:64
srp_interface_set_hw_wrap_function
void srp_interface_set_hw_wrap_function(u32 hw_if_index, srp_hw_wrap_function_t *f)
Definition: interface.c:156
unformat_input_t
struct _unformat_input_t unformat_input_t
srp_main_t::default_data_ttl
u32 default_data_ttl
Definition: srp.h:134
serialize_main_t
Definition: serialize.h:144
r
vnet_hw_if_output_node_runtime_t * r
Definition: interface_output.c:1071
vlib_frame_t
Definition: node.h:372
clib_memcpy_fast
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
Definition: string.h:92
srp_main_t::interface_pool
srp_interface_t * interface_pool
Definition: srp.h:129
srp_interface_ring_t::hw_if_index
u32 hw_if_index
Definition: srp.h:76
srp_get_interface_from_vnet_hw_interface
static srp_interface_t * srp_get_interface_from_vnet_hw_interface(u32 hw_if_index)
Definition: srp.h:175
h
h
Definition: flowhash_template.h:372
format_srp_device
u8 * format_srp_device(u8 *s, va_list *args)
Definition: node.c:553
hash_set
#define hash_set(h, key, value)
Definition: hash.h:255
vnet_sw_interface_t::sw_if_index
u32 sw_if_index
Definition: interface.h:875
srp_interface_hw_class_change
static void srp_interface_hw_class_change(vnet_main_t *vnm, u32 hw_if_index, u32 old_hw_class_index, u32 new_hw_class_index)
Definition: interface.c:196
pool_foreach
#define pool_foreach(VAR, POOL)
Iterate through pool.
Definition: pool.h:534
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
slot
u8 slot
Definition: pci_types.api:22
srp_hw_enable_function_t
void() srp_hw_enable_function_t(struct srp_interface_t *si, u32 wrap_enable)
Definition: srp.h:95
unserialize_srp_main
void unserialize_srp_main(serialize_main_t *m, va_list *va)
Definition: interface.c:101
SRP_N_RING
@ SRP_N_RING
Definition: srp.h:66
format_srp_header_with_length
u8 * format_srp_header_with_length(u8 *s, va_list *args)
Definition: format.c:63
vnet_get_hw_interface
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
Definition: interface_funcs.h:44
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
srp_interface_set_interface_config
void srp_interface_set_interface_config(u32 hw_if_index, srp_interface_config_t *c)
Definition: interface.c:259
srp_and_ethernet_header_t
Definition: packet.h:95
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
c
svmdb_client_t * c
Definition: vpp_get_metrics.c:48
srp_interface_config_t
Definition: srp.h:97
unserialize_integer
static void unserialize_integer(serialize_main_t *m, void *x, u32 n_bytes)
Definition: serialize.h:201
uword
u64 uword
Definition: types.h:112
hash_get
#define hash_get(h, key)
Definition: hash.h:249
srp_hw_interface_class
vnet_hw_interface_class_t srp_hw_interface_class
i
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:261
pool_get
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
Definition: pool.h:255
srp_header_compute_parity
static void srp_header_compute_parity(srp_header_t *h)
Definition: packet.h:89
vec_validate
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
Definition: vec.h:523
address
manual_print typedef address
Definition: ip_types.api:96
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:163
clib_min
#define clib_min(x, y)
Definition: clib.h:342
SRP_N_SIDE
@ SRP_N_SIDE
Definition: srp.h:69
vlib_node_add_named_next_with_slot
uword vlib_node_add_named_next_with_slot(vlib_main_t *vm, uword node, char *name, uword slot)
Definition: node.c:244
vnet_sw_interface_is_admin_up
static uword vnet_sw_interface_is_admin_up(vnet_main_t *vnm, u32 sw_if_index)
Definition: interface_funcs.h:265
srp_interface_t
Definition: srp.h:105
vnet_hw_interface_t
Definition: interface.h:638
vnet_main_t
Definition: vnet.h:76
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
VNET_HW_INTERFACE_CLASS
VNET_HW_INTERFACE_CLASS(ethernet_hw_interface_class)
serialize_srp_main
void serialize_srp_main(serialize_main_t *m, va_list *va)
Definition: interface.c:89
ethernet_update_adjacency
void ethernet_update_adjacency(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
Definition: interface.c:198
format
description fragment has unexpected format
Definition: map.api:433
ASSERT
#define ASSERT(truth)
Definition: error_bootstrap.h:69
vlib_put_next_frame
vlib_put_next_frame(vm, node, next_index, 0)
u32
unsigned int u32
Definition: types.h:88
vnet_get_sup_hw_interface
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
Definition: interface_funcs.h:92
srp_interface_ring_t
Definition: srp.h:72
srp_hw_wrap_function_t
void() srp_hw_wrap_function_t(u32 hw_if_index, u32 wrap_enable)
Definition: srp.h:94
n_bytes
u32 n_bytes
Definition: interface_output.c:401
si
vnet_sw_interface_t * si
Definition: interface_output.c:398
srp_register_interface
void srp_register_interface(u32 *hw_if_indices_by_side)
Definition: interface.c:151
instance
u32 instance
Definition: gre.api:51
pool_elts
static uword pool_elts(void *v)
Number of active elements in a pool.
Definition: pool.h:127
srp_main
srp_main_t srp_main
Definition: node.c:44
srp_setup_node
static void srp_setup_node(vlib_main_t *vm, u32 node_index)
Definition: srp.h:193
srp_is_valid_class_for_interface
static uword srp_is_valid_class_for_interface(vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index)
Definition: interface.c:179
clib_memset
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vlib_main_t
Definition: main.h:102
vnet_link_t
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
srp_interface_enable_ips
void srp_interface_enable_ips(u32 hw_if_index)
Definition: interface.c:168
b
vlib_buffer_t ** b
Definition: nat44_ei_out2in.c:717
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
srp_interface_get_interface_config
void srp_interface_get_interface_config(u32 hw_if_index, srp_interface_config_t *c)
Definition: interface.c:252
SRP_RING_INNER
@ SRP_RING_INNER
Definition: srp.h:65
clib_warning
#define clib_warning(format, args...)
Definition: error.h:59
vnet_sw_interface_t::hw_if_index
u32 hw_if_index
Definition: interface.h:886
vnet.h
vlib_node_runtime_t
Definition: node.h:454
unformat_srp_header
uword unformat_srp_header(unformat_input_t *input, va_list *args)
Definition: format.c:111
vlib_cli_command_t
Definition: cli.h:92
from
from
Definition: nat44_ei_hairpinning.c:415
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
rewrite
rewrite
Definition: pnat.api:158
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
n_left_from
n_left_from
Definition: nat44_ei_hairpinning.c:416
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
vnet_register_interface
u32 vnet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, u32 hw_class_index, u32 hw_instance)
Definition: interface.c:812
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111