FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
device.c
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2017 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17 
18 #define _GNU_SOURCE
19 #include <stdint.h>
20 #include <vnet/ethernet/ethernet.h>
21 #include <vnet/ip/ip4_packet.h>
22 #include <vnet/ip/ip6_packet.h>
24 #include <vnet/bonding/node.h>
25 #include <vppinfra/lb_hash_hash.h>
26 #include <vnet/ip/ip.h>
30 
31 #define foreach_bond_tx_error \
32  _ (NONE, "no error") \
33  _ (IF_DOWN, "interface down") \
34  _ (BAD_LB_MODE, "bad load balance mode") \
35  _ (NO_MEMBER, "no member")
36 
37 typedef enum
38 {
39 #define _(f,s) BOND_TX_ERROR_##f,
41 #undef _
44 
45 static char *bond_tx_error_strings[] = {
46 #define _(n,s) s,
48 #undef _
49 };
50 
51 static u8 *
52 format_bond_tx_trace (u8 * s, va_list * args)
53 {
54  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
55  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
56  bond_packet_trace_t *t = va_arg (*args, bond_packet_trace_t *);
57  vnet_hw_interface_t *hw, *hw1;
58  vnet_main_t *vnm = vnet_get_main ();
59 
62  s = format (s, "src %U, dst %U, %s -> %s",
65  hw->name, hw1->name);
66 
67  return s;
68 }
69 
70 #ifndef CLIB_MARCH_VARIANT
71 u8 *
72 format_bond_interface_name (u8 * s, va_list * args)
73 {
74  u32 dev_instance = va_arg (*args, u32);
75  bond_main_t *bm = &bond_main;
77 
78  s = format (s, "BondEthernet%lu", bif->id);
79 
80  return s;
81 }
82 #endif
83 
84 static __clib_unused clib_error_t *
86  struct vnet_hw_interface_t *bif_hw,
87  i32 l2_if_adjust)
88 {
89  bond_if_t *bif;
91  struct vnet_hw_interface_t *mif_hw;
92 
94  if (!bif)
95  return 0;
96 
97  if ((bif_hw->l2_if_count == 1) && (l2_if_adjust == 1))
98  {
99  /* Just added first L2 interface on this port */
101  {
102  mif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
103  ethernet_set_flags (vnm, mif_hw->hw_if_index,
105  }
106  }
107  else if ((bif_hw->l2_if_count == 0) && (l2_if_adjust == -1))
108  {
109  /* Just removed last L2 subinterface on this port */
111  {
112  mif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
113  ethernet_set_flags (vnm, mif_hw->hw_if_index,
114  /*ETHERNET_INTERFACE_FLAG_DEFAULT_L3 */ 0);
115  }
116  }
117 
118  return 0;
119 }
120 
121 static __clib_unused clib_error_t *
123  struct vnet_sw_interface_t *st, int is_add)
124 {
125  /* Nothing for now */
126  return 0;
127 }
128 
129 static clib_error_t *
131 {
134  bond_main_t *bm = &bond_main;
136 
137  bif->admin_up = is_up;
138  if (is_up)
141  return 0;
142 }
143 
144 static clib_error_t *
146  u8 is_add)
147 {
148  vnet_main_t *vnm = vnet_get_main ();
149  bond_if_t *bif;
150  clib_error_t *error = 0;
151  vnet_hw_interface_t *s_hi;
152  int i;
153 
154 
155  bif = bond_get_bond_if_by_sw_if_index (hi->sw_if_index);
156  if (!bif)
157  {
158  return clib_error_return (0,
159  "No bond interface found for sw_if_index %u",
160  hi->sw_if_index);
161  }
162 
163  /* Add/del address on each member hw intf, they control the hardware */
164  vec_foreach_index (i, bif->members)
165  {
166  s_hi = vnet_get_sup_hw_interface (vnm, vec_elt (bif->members, i));
168  address, is_add);
169 
170  if (error)
171  {
172  int j;
173 
174  /* undo any that were completed before the failure */
175  for (j = i - 1; j > -1; j--)
176  {
177  s_hi = vnet_get_sup_hw_interface (vnm, vec_elt (bif->members, j));
179  address, !(is_add));
180  }
181 
182  return error;
183  }
184  }
185 
186  return 0;
187 }
188 
191 {
192  u32 idx = ptd->per_port_queue[port].n_buffers++;
193  ptd->per_port_queue[port].buffers[idx] = bi;
194 }
195 
198  bond_if_t * bif, vlib_buffer_t * b0, uword n_members)
199 {
200  bond_main_t *bm = &bond_main;
201  vlib_buffer_t *c0;
202  int port;
206  thread_index);
207 
208  for (port = 1; port < n_members; port++)
209  {
211  c0 = vlib_buffer_copy (vm, b0);
212  if (PREDICT_TRUE (c0 != 0))
213  {
214  vnet_buffer (c0)->sw_if_index[VLIB_TX] = sw_if_index;
216  }
217  }
218 
219  return 0;
220 }
221 
224 {
226  u64 *dst = (u64 *) & eth->dst_address[0];
228  u32 *src = (u32 *) & eth->src_address[2];
230 
231  return lb_hash_hash_2_tuples (a, b);
232 }
233 
236 {
237  u16 *ethertype_p;
239 
240  if (!ethernet_frame_is_tagged (clib_net_to_host_u16 (eth->type)))
241  {
242  ethertype_p = &eth->type;
243  }
244  else
245  {
246  vlan = (void *) (eth + 1);
247  ethertype_p = &vlan->type;
248  if (*ethertype_p == ntohs (ETHERNET_TYPE_VLAN))
249  {
250  vlan++;
251  ethertype_p = &vlan->type;
252  }
253  }
254  return ethertype_p;
255 }
256 
259 {
261  u8 ip_version;
262  ip4_header_t *ip4;
263  u16 ethertype, *ethertype_p;
264  u32 *mac1, *mac2, *mac3;
265 
266  ethertype_p = bond_locate_ethertype (eth);
267  ethertype = clib_mem_unaligned (ethertype_p, u16);
268 
269  if ((ethertype != htons (ETHERNET_TYPE_IP4)) &&
270  (ethertype != htons (ETHERNET_TYPE_IP6)))
271  return bond_lb_l2 (b0);
272 
273  ip4 = (ip4_header_t *) (ethertype_p + 1);
274  ip_version = (ip4->ip_version_and_header_length >> 4);
275 
276  if (ip_version == 0x4)
277  {
278  u32 a, c;
279 
280  mac1 = (u32 *) & eth->dst_address[0];
281  mac2 = (u32 *) & eth->dst_address[4];
282  mac3 = (u32 *) & eth->src_address[2];
283 
284  a = clib_mem_unaligned (mac1, u32) ^ clib_mem_unaligned (mac2, u32) ^
285  clib_mem_unaligned (mac3, u32);
286  c =
287  lb_hash_hash_2_tuples (clib_mem_unaligned (&ip4->address_pair, u64),
288  a);
289  return c;
290  }
291  else if (ip_version == 0x6)
292  {
293  u64 a;
294  u32 c;
295  ip6_header_t *ip6 = (ip6_header_t *) (eth + 1);
296 
297  mac1 = (u32 *) & eth->dst_address[0];
298  mac2 = (u32 *) & eth->dst_address[4];
299  mac3 = (u32 *) & eth->src_address[2];
300 
301  a = clib_mem_unaligned (mac1, u32) ^ clib_mem_unaligned (mac2, u32) ^
302  clib_mem_unaligned (mac3, u32);
303  c =
305  (&ip6->src_address.as_uword[0], uword),
306  clib_mem_unaligned (&ip6->src_address.as_uword[1],
307  uword),
308  clib_mem_unaligned (&ip6->dst_address.as_uword[0],
309  uword),
310  clib_mem_unaligned (&ip6->dst_address.as_uword[1],
311  uword), a);
312  return c;
313  }
314  return bond_lb_l2 (b0);
315 }
316 
319 {
321  u8 ip_version;
322  uword is_tcp_udp;
323  ip4_header_t *ip4;
324  u16 ethertype, *ethertype_p;
325 
326  ethertype_p = bond_locate_ethertype (eth);
327  ethertype = clib_mem_unaligned (ethertype_p, u16);
328 
329  if ((ethertype != htons (ETHERNET_TYPE_IP4)) &&
330  (ethertype != htons (ETHERNET_TYPE_IP6)))
331  return (bond_lb_l2 (b0));
332 
333  ip4 = (ip4_header_t *) (ethertype_p + 1);
334  ip_version = (ip4->ip_version_and_header_length >> 4);
335 
336  if (ip_version == 0x4)
337  {
338  u32 a, t1, t2;
339  tcp_header_t *tcp = (void *) (ip4 + 1);
340 
341  is_tcp_udp = (ip4->protocol == IP_PROTOCOL_TCP) ||
342  (ip4->protocol == IP_PROTOCOL_UDP);
343  t1 = is_tcp_udp ? clib_mem_unaligned (&tcp->src, u16) : 0;
344  t2 = is_tcp_udp ? clib_mem_unaligned (&tcp->dst, u16) : 0;
345  a = t1 ^ t2;
346  return
347  lb_hash_hash_2_tuples (clib_mem_unaligned (&ip4->address_pair, u64),
348  a);
349  }
350  else if (ip_version == 0x6)
351  {
352  u64 a;
353  u32 c, t1, t2;
354  ip6_header_t *ip6 = (ip6_header_t *) (eth + 1);
355  tcp_header_t *tcp = (void *) (ip6 + 1);
356 
357  is_tcp_udp = 0;
358  if (PREDICT_TRUE ((ip6->protocol == IP_PROTOCOL_TCP) ||
359  (ip6->protocol == IP_PROTOCOL_UDP)))
360  {
361  is_tcp_udp = 1;
362  tcp = (void *) (ip6 + 1);
363  }
364  else if (ip6->protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS)
365  {
367  (ip6_hop_by_hop_header_t *) (ip6 + 1);
368  if ((hbh->protocol == IP_PROTOCOL_TCP)
369  || (hbh->protocol == IP_PROTOCOL_UDP))
370  {
371  is_tcp_udp = 1;
372  tcp = (tcp_header_t *) ((u8 *) hbh + ((hbh->length + 1) << 3));
373  }
374  }
375  t1 = is_tcp_udp ? clib_mem_unaligned (&tcp->src, u16) : 0;
376  t2 = is_tcp_udp ? clib_mem_unaligned (&tcp->dst, u16) : 0;
377  a = t1 ^ t2;
378  c =
380  (&ip6->src_address.as_uword[0], uword),
381  clib_mem_unaligned (&ip6->src_address.as_uword[1],
382  uword),
383  clib_mem_unaligned (&ip6->dst_address.as_uword[0],
384  uword),
385  clib_mem_unaligned (&ip6->dst_address.as_uword[1],
386  uword), a);
387  return c;
388  }
389 
390  return bond_lb_l2 (b0);
391 }
392 
395 {
396  bif->lb_rr_last_index++;
397  if (bif->lb_rr_last_index >= n_members)
398  bif->lb_rr_last_index = 0;
399 
400  return bif->lb_rr_last_index;
401 }
402 
405  u32 * h, u32 n_left, uword n_members, u32 lb_alg)
406 {
407  while (n_left >= 4)
408  {
409  // Prefetch next iteration
410  if (n_left >= 8)
411  {
412  vlib_buffer_t **pb = b + 4;
413 
414  vlib_prefetch_buffer_header (pb[0], LOAD);
415  vlib_prefetch_buffer_header (pb[1], LOAD);
416  vlib_prefetch_buffer_header (pb[2], LOAD);
417  vlib_prefetch_buffer_header (pb[3], LOAD);
418 
419  clib_prefetch_load (pb[0]->data);
420  clib_prefetch_load (pb[1]->data);
421  clib_prefetch_load (pb[2]->data);
422  clib_prefetch_load (pb[3]->data);
423  }
424 
425  if (lb_alg == BOND_LB_L2)
426  {
427  h[0] = bond_lb_l2 (b[0]);
428  h[1] = bond_lb_l2 (b[1]);
429  h[2] = bond_lb_l2 (b[2]);
430  h[3] = bond_lb_l2 (b[3]);
431  }
432  else if (lb_alg == BOND_LB_L34)
433  {
434  h[0] = bond_lb_l34 (b[0]);
435  h[1] = bond_lb_l34 (b[1]);
436  h[2] = bond_lb_l34 (b[2]);
437  h[3] = bond_lb_l34 (b[3]);
438  }
439  else if (lb_alg == BOND_LB_L23)
440  {
441  h[0] = bond_lb_l23 (b[0]);
442  h[1] = bond_lb_l23 (b[1]);
443  h[2] = bond_lb_l23 (b[2]);
444  h[3] = bond_lb_l23 (b[3]);
445  }
446  else if (lb_alg == BOND_LB_RR)
447  {
448  h[0] = bond_lb_round_robin (bif, b[0], n_members);
449  h[1] = bond_lb_round_robin (bif, b[1], n_members);
450  h[2] = bond_lb_round_robin (bif, b[2], n_members);
451  h[3] = bond_lb_round_robin (bif, b[3], n_members);
452  }
453  else if (lb_alg == BOND_LB_BC)
454  {
455  h[0] = bond_lb_broadcast (vm, bif, b[0], n_members);
456  h[1] = bond_lb_broadcast (vm, bif, b[1], n_members);
457  h[2] = bond_lb_broadcast (vm, bif, b[2], n_members);
458  h[3] = bond_lb_broadcast (vm, bif, b[3], n_members);
459  }
460  else
461  {
462  ASSERT (0);
463  }
464 
465  n_left -= 4;
466  b += 4;
467  h += 4;
468  }
469 
470  while (n_left > 0)
471  {
472  if (bif->lb == BOND_LB_L2)
473  h[0] = bond_lb_l2 (b[0]);
474  else if (bif->lb == BOND_LB_L34)
475  h[0] = bond_lb_l34 (b[0]);
476  else if (bif->lb == BOND_LB_L23)
477  h[0] = bond_lb_l23 (b[0]);
478  else if (bif->lb == BOND_LB_RR)
479  h[0] = bond_lb_round_robin (bif, b[0], n_members);
480  else if (bif->lb == BOND_LB_BC)
481  h[0] = bond_lb_broadcast (vm, bif, b[0], n_members);
482  else
483  {
484  ASSERT (0);
485  }
486 
487  n_left -= 1;
488  b += 1;
489  h += 1;
490  }
491 }
492 
495  int use_modulo_shortcut)
496 {
497  u32 mask = n_members - 1;
498 
499 #ifdef CLIB_HAVE_VEC256
500  /* only lower 16 bits of hash due to single precision fp arithmetic */
501  u32x8 mask8, sc8u, h8a, h8b;
502  f32x8 sc8f;
503 
504  if (use_modulo_shortcut)
505  {
506  mask8 = u32x8_splat (mask);
507  }
508  else
509  {
510  mask8 = u32x8_splat (0xffff);
511  sc8u = u32x8_splat (n_members);
512  sc8f = f32x8_from_u32x8 (sc8u);
513  }
514 
515  while (n_left > 16)
516  {
517  h8a = u32x8_load_unaligned (h) & mask8;
518  h8b = u32x8_load_unaligned (h + 8) & mask8;
519 
520  if (use_modulo_shortcut == 0)
521  {
522  h8a -= sc8u * u32x8_from_f32x8 (f32x8_from_u32x8 (h8a) / sc8f);
523  h8b -= sc8u * u32x8_from_f32x8 (f32x8_from_u32x8 (h8b) / sc8f);
524  }
525 
526  u32x8_store_unaligned (h8a, h);
527  u32x8_store_unaligned (h8b, h + 8);
528  n_left -= 16;
529  h += 16;
530  }
531 #endif
532 
533  while (n_left > 4)
534  {
535  if (use_modulo_shortcut)
536  {
537  h[0] &= mask;
538  h[1] &= mask;
539  h[2] &= mask;
540  h[3] &= mask;
541  }
542  else
543  {
544  h[0] %= n_members;
545  h[1] %= n_members;
546  h[2] %= n_members;
547  h[3] %= n_members;
548  }
549  n_left -= 4;
550  h += 4;
551  }
552  while (n_left)
553  {
554  if (use_modulo_shortcut)
555  h[0] &= mask;
556  else
557  h[0] %= n_members;
558  n_left -= 1;
559  h += 1;
560  }
561 }
562 
565  u32 * bi, vlib_buffer_t ** b, u32 * data, u32 n_left,
566  int single_sw_if_index)
567 {
568  u32 sw_if_index = data[0];
569  u32 *h = data;
570 
571  while (n_left >= 4)
572  {
573  // Prefetch next iteration
574  if (n_left >= 8)
575  {
576  vlib_buffer_t **pb = b + 4;
577  vlib_prefetch_buffer_header (pb[0], LOAD);
578  vlib_prefetch_buffer_header (pb[1], LOAD);
579  vlib_prefetch_buffer_header (pb[2], LOAD);
580  vlib_prefetch_buffer_header (pb[3], LOAD);
581  }
582 
583  if (PREDICT_FALSE (single_sw_if_index))
584  {
585  vnet_buffer (b[0])->sw_if_index[VLIB_TX] = sw_if_index;
586  vnet_buffer (b[1])->sw_if_index[VLIB_TX] = sw_if_index;
587  vnet_buffer (b[2])->sw_if_index[VLIB_TX] = sw_if_index;
588  vnet_buffer (b[3])->sw_if_index[VLIB_TX] = sw_if_index;
589 
590  bond_tx_add_to_queue (ptd, 0, bi[0]);
591  bond_tx_add_to_queue (ptd, 0, bi[1]);
592  bond_tx_add_to_queue (ptd, 0, bi[2]);
593  bond_tx_add_to_queue (ptd, 0, bi[3]);
594  }
595  else
596  {
597  u32 sw_if_index[4];
598 
599  sw_if_index[0] = *vec_elt_at_index (bif->active_members, h[0]);
600  sw_if_index[1] = *vec_elt_at_index (bif->active_members, h[1]);
601  sw_if_index[2] = *vec_elt_at_index (bif->active_members, h[2]);
602  sw_if_index[3] = *vec_elt_at_index (bif->active_members, h[3]);
603 
604  vnet_buffer (b[0])->sw_if_index[VLIB_TX] = sw_if_index[0];
605  vnet_buffer (b[1])->sw_if_index[VLIB_TX] = sw_if_index[1];
606  vnet_buffer (b[2])->sw_if_index[VLIB_TX] = sw_if_index[2];
607  vnet_buffer (b[3])->sw_if_index[VLIB_TX] = sw_if_index[3];
608 
609  bond_tx_add_to_queue (ptd, h[0], bi[0]);
610  bond_tx_add_to_queue (ptd, h[1], bi[1]);
611  bond_tx_add_to_queue (ptd, h[2], bi[2]);
612  bond_tx_add_to_queue (ptd, h[3], bi[3]);
613  }
614 
615  bi += 4;
616  h += 4;
617  b += 4;
618  n_left -= 4;
619  }
620  while (n_left)
621  {
622  if (PREDICT_FALSE (single_sw_if_index))
623  {
624  vnet_buffer (b[0])->sw_if_index[VLIB_TX] = sw_if_index;
625  bond_tx_add_to_queue (ptd, 0, bi[0]);
626  }
627  else
628  {
629  u32 sw_if_index0 = *vec_elt_at_index (bif->active_members, h[0]);
630 
631  vnet_buffer (b[0])->sw_if_index[VLIB_TX] = sw_if_index0;
632  bond_tx_add_to_queue (ptd, h[0], bi[0]);
633  }
634 
635  bi += 1;
636  h += 1;
637  b += 1;
638  n_left -= 1;
639  }
640 }
641 
644  vlib_buffer_t ** b, u32 n_left, u32 * h)
645 {
647 
648  while (n_trace > 0 && n_left > 0)
649  {
650  if (PREDICT_TRUE
651  (vlib_trace_buffer (vm, node, 0, b[0], 0 /* follow_chain */ )))
652  {
654  ethernet_header_t *eth;
655 
657  t0 = vlib_add_trace (vm, node, b[0], sizeof (*t0));
658  eth = vlib_buffer_get_current (b[0]);
659  t0->ethernet = *eth;
660  t0->sw_if_index = vnet_buffer (b[0])->sw_if_index[VLIB_TX];
661  if (!h)
662  {
663  t0->bond_sw_if_index =
664  *vec_elt_at_index (bif->active_members, 0);
665  }
666  else
667  {
668  t0->bond_sw_if_index =
669  *vec_elt_at_index (bif->active_members, h[0]);
670  h++;
671  }
672  }
673  b++;
674  n_left--;
675  }
676 }
677 
681 {
682  vnet_interface_output_runtime_t *rund = (void *) node->runtime_data;
683  bond_main_t *bm = &bond_main;
685  bond_if_t *bif = pool_elt_at_index (bm->interfaces, rund->dev_instance);
686  uword n_members;
689  u32 n_left = frame->n_vectors;
690  u32 hashes[VLIB_FRAME_SIZE], *h;
691  vnet_main_t *vnm = vnet_get_main ();
692  bond_per_thread_data_t *ptd = vec_elt_at_index (bm->per_thread_data,
693  thread_index);
694  u32 p, sw_if_index;
695 
696  if (PREDICT_FALSE (bif->admin_up == 0))
697  {
701  thread_index, bif->sw_if_index,
702  frame->n_vectors);
703  vlib_error_count (vm, node->node_index, BOND_TX_ERROR_IF_DOWN,
704  frame->n_vectors);
705  return frame->n_vectors;
706  }
707 
708  n_members = vec_len (bif->active_members);
709  if (PREDICT_FALSE (n_members == 0))
710  {
714  thread_index, bif->sw_if_index,
715  frame->n_vectors);
716  vlib_error_count (vm, node->node_index, BOND_TX_ERROR_NO_MEMBER,
717  frame->n_vectors);
718  return frame->n_vectors;
719  }
720 
722 
723  /* active-backup mode, ship everything to first sw if index */
724  if ((bif->lb == BOND_LB_AB) || PREDICT_FALSE (n_members == 1))
725  {
726  sw_if_index = *vec_elt_at_index (bif->active_members, 0);
727 
728  bond_tx_trace (vm, node, bif, bufs, frame->n_vectors, 0);
730  /* single_sw_if_index */ 1);
731  goto done;
732  }
733 
734  if (bif->lb == BOND_LB_BC)
735  {
736  sw_if_index = *vec_elt_at_index (bif->active_members, 0);
737 
738  bond_tx_inline (vm, bif, bufs, hashes, n_left, n_members, BOND_LB_BC);
739  bond_tx_trace (vm, node, bif, bufs, frame->n_vectors, 0);
741  /* single_sw_if_index */ 1);
742  goto done;
743  }
744 
745  /* if have at least one member on local numa node, only members on local numa
746  node will transmit pkts when bif->local_numa_only is enabled */
747  if (bif->n_numa_members >= 1)
748  n_members = bif->n_numa_members;
749 
750  if (bif->lb == BOND_LB_L2)
751  bond_tx_inline (vm, bif, bufs, hashes, n_left, n_members, BOND_LB_L2);
752  else if (bif->lb == BOND_LB_L34)
753  bond_tx_inline (vm, bif, bufs, hashes, n_left, n_members, BOND_LB_L34);
754  else if (bif->lb == BOND_LB_L23)
755  bond_tx_inline (vm, bif, bufs, hashes, n_left, n_members, BOND_LB_L23);
756  else if (bif->lb == BOND_LB_RR)
757  bond_tx_inline (vm, bif, bufs, hashes, n_left, n_members, BOND_LB_RR);
758  else
759  {
763  thread_index, bif->sw_if_index, frame->n_vectors);
764  vlib_error_count (vm, node->node_index, BOND_TX_ERROR_BAD_LB_MODE,
765  frame->n_vectors);
766  return frame->n_vectors;
767  }
768 
769  /* calculate port out of hash */
770  h = hashes;
771  if (BOND_MODULO_SHORTCUT (n_members))
772  bond_hash_to_port (h, frame->n_vectors, n_members, 1);
773  else
774  bond_hash_to_port (h, frame->n_vectors, n_members, 0);
775 
776  bond_tx_trace (vm, node, bif, bufs, frame->n_vectors, h);
777 
778  bond_update_sw_if_index (ptd, bif, from, bufs, hashes, frame->n_vectors,
779  /* single_sw_if_index */ 0);
780 
781 done:
782  for (p = 0; p < n_members; p++)
783  {
784  vlib_frame_t *f;
785  u32 *to_next;
786 
787  sw_if_index = *vec_elt_at_index (bif->active_members, p);
788  if (PREDICT_TRUE (ptd->per_port_queue[p].n_buffers))
789  {
791  f->n_vectors = ptd->per_port_queue[p].n_buffers;
792  to_next = vlib_frame_vector_args (f);
793  clib_memcpy_fast (to_next, ptd->per_port_queue[p].buffers,
794  f->n_vectors * sizeof (u32));
796  ptd->per_port_queue[p].n_buffers = 0;
797  }
798  }
799  return frame->n_vectors;
800 }
801 
802 static walk_rc_t
804  void *arg)
805 {
806  bond_main_t *bm = &bond_main;
807 
810 
811  return (WALK_CONTINUE);
812 }
813 
814 static uword
816 {
817  vnet_main_t *vnm = vnet_get_main ();
818  uword event_type, *event_data = 0;
819 
820  while (1)
821  {
822  u32 i;
824 
826  event_type = vlib_process_get_events (vm, &event_data);
827  ASSERT (event_type == BOND_SEND_GARP_NA);
828  for (i = 0; i < vec_len (event_data); i++)
829  {
830  hw_if_index = event_data[i];
832  /* walk hw interface to process all subinterfaces */
835  }
836  vec_reset_length (event_data);
837  }
838  return 0;
839 }
840 
841 /* *INDENT-OFF* */
843  .function = bond_process,
845  .type = VLIB_NODE_TYPE_PROCESS,
846  .name = "bond-process",
847 };
848 /* *INDENT-ON* */
849 
850 /* *INDENT-OFF* */
852  .name = "bond",
853  .tx_function_n_errors = BOND_TX_N_ERROR,
854  .tx_function_error_strings = bond_tx_error_strings,
855  .format_device_name = format_bond_interface_name,
856  .set_l2_mode_function = bond_set_l2_mode_function,
857  .admin_up_down_function = bond_interface_admin_up_down,
858  .subif_add_del_function = bond_subif_add_del_function,
859  .format_tx_trace = format_bond_tx_trace,
860  .mac_addr_add_del_function = bond_add_del_mac_address,
861 };
862 
863 /* *INDENT-ON* */
864 
865 static clib_error_t *
867 {
868  bond_main_t *bm = &bond_main;
869  member_if_t *mif;
870  bond_detach_member_args_t args = { 0 };
871 
872  if (is_add)
873  return 0;
875  if (!mif)
876  return 0;
877  args.member = sw_if_index;
878  bond_detach_member (bm->vlib_main, &args);
879  return args.error;
880 }
881 
883 
884 /*
885  * fd.io coding-style-patch-verification: ON
886  *
887  * Local Variables:
888  * eval: (c-set-style "gnu")
889  * End:
890  */
bond_hash_to_port
static_always_inline void bond_hash_to_port(u32 *h, u32 n_left, u32 n_members, int use_modulo_shortcut)
Definition: device.c:494
vec_reset_length
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
Definition: vec_bootstrap.h:194
vlib_frame_t::n_vectors
u16 n_vectors
Definition: node.h:387
VNET_SW_INTERFACE_ADD_DEL_FUNCTION
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(bond_member_interface_add_del)
vlib_buffer_free
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
Definition: buffer_funcs.h:979
ntohs
#define ntohs(x)
Definition: af_xdp.bpf.c:29
thread_index
u32 thread_index
Definition: nat44_ei_hairpinning.c:495
bufs
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
Definition: nat44_ei_out2in.c:717
vnet_sw_interface_t
Definition: interface.h:869
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: nat44_ei.c:3048
vlib_prefetch_buffer_header
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
Definition: buffer.h:231
WALK_CONTINUE
@ WALK_CONTINUE
Definition: interface_funcs.h:174
ip4_neighbor.h
vlib_buffer_copy
static vlib_buffer_t * vlib_buffer_copy(vlib_main_t *vm, vlib_buffer_t *b)
Definition: buffer_funcs.h:1078
ip4
vl_api_ip4_address_t ip4
Definition: one.api:376
ethernet_set_flags
u32 ethernet_set_flags(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
Definition: interface.c:441
bond_tx_error_strings
static char * bond_tx_error_strings[]
Definition: device.c:45
vlib_process_wait_for_event
static uword * vlib_process_wait_for_event(vlib_main_t *vm)
Definition: node_funcs.h:660
f
vlib_frame_t * f
Definition: interface_output.c:1098
ethernet_vlan_header_t
Definition: packet.h:128
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:549
ethernet_frame_is_tagged
static_always_inline int ethernet_frame_is_tagged(u16 type)
Definition: ethernet.h:77
bond_per_thread_data_t::per_port_queue
bond_per_port_queue_t * per_port_queue
Definition: node.h:165
tcp_header_t
struct _tcp_header tcp_header_t
format_ethernet_address
u8 * format_ethernet_address(u8 *s, va_list *args)
Definition: format.c:44
ethernet_header_t::dst_address
u8 dst_address[6]
Definition: packet.h:55
vnet_hw_interface_t::sw_if_index
u32 sw_if_index
Definition: interface.h:670
vlib_get_buffers
vlib_get_buffers(vm, from, b, n_left_from)
ethernet_header_t::src_address
u8 src_address[6]
Definition: packet.h:56
bond_locate_ethertype
static_always_inline u16 * bond_locate_ethertype(ethernet_header_t *eth)
Definition: device.c:235
VLIB_FRAME_SIZE
#define VLIB_FRAME_SIZE
Definition: node.h:368
bond_main
bond_main_t bond_main
Definition: node.c:25
node
vlib_main_t vlib_node_runtime_t * node
Definition: nat44_ei.c:3047
format_bond_interface_name
u8 * format_bond_interface_name(u8 *s, va_list *args)
Definition: device.c:72
clib_error_return
#define clib_error_return(e, args...)
Definition: error.h:99
VNET_DEVICE_CLASS
VNET_DEVICE_CLASS(af_xdp_device_class)
bond_if_t::id
u32 id
Definition: node.h:181
bond_active_interface_switch_cb
static walk_rc_t bond_active_interface_switch_cb(vnet_main_t *vnm, u32 sw_if_index, void *arg)
Definition: device.c:803
u16
unsigned short u16
Definition: types.h:57
vnet_hw_interface_t::l2_if_count
u32 l2_if_count
Definition: interface.h:706
VNET_SW_INTERFACE_FLAG_ADMIN_UP
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
Definition: interface.h:844
ethernet_header_t::type
u16 type
Definition: packet.h:59
ip6_hop_by_hop_packet.h
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
bond_get_bond_if_by_sw_if_index
static bond_if_t * bond_get_bond_if_by_sw_if_index(u32 sw_if_index)
Definition: node.h:503
VNET_HW_INTERFACE_FLAG_LINK_UP
@ VNET_HW_INTERFACE_FLAG_LINK_UP
Definition: interface.h:509
port
u16 port
Definition: lb_types.api:73
vlib_get_trace_count
static u32 vlib_get_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt)
Definition: trace_funcs.h:212
bond_main_t::vnet_main
vnet_main_t * vnet_main
Definition: node.h:377
vnet_interface_main_t::sw_if_counters
vlib_simple_counter_main_t * sw_if_counters
Definition: interface.h:1023
hi
vl_api_ip4_address_t hi
Definition: arp.api:37
vnet_hw_interface_t::dev_instance
u32 dev_instance
Definition: interface.h:660
vlib_error_count
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
Definition: error_funcs.h:57
vlib_frame_t
Definition: node.h:372
BOND_MODULO_SHORTCUT
#define BOND_MODULO_SHORTCUT(a)
Definition: node.h:34
bond_if_t
Definition: node.h:168
ip6_hop_by_hop_header_t
Definition: ip6_hop_by_hop_packet.h:18
clib_memcpy_fast
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
Definition: string.h:92
ip4_header_t
Definition: ip4_packet.h:87
ethernet.h
h
h
Definition: flowhash_template.h:372
VNET_DEVICE_CLASS_TX_FN
#define VNET_DEVICE_CLASS_TX_FN(devclass)
Definition: interface.h:317
error
Definition: cJSON.c:88
bond_main_t::interfaces
bond_if_t * interfaces
Definition: node.h:364
i32
signed int i32
Definition: types.h:77
bond_lb_l23
static_always_inline u32 bond_lb_l23(vlib_buffer_t *b0)
Definition: device.c:258
ip6_packet.h
vec_elt
#define vec_elt(v, i)
Get vector value at index i.
Definition: vec_bootstrap.h:210
bond_dev_class
VNET_DEVICE_CLASS_TX_FN() bond_dev_class(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: device.c:678
vlib_process_get_events
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type,...
Definition: node_funcs.h:583
format_bond_tx_trace
static u8 * format_bond_tx_trace(u8 *s, va_list *args)
Definition: device.c:52
vlib_increment_simple_counter
static void vlib_increment_simple_counter(vlib_simple_counter_main_t *cm, u32 thread_index, u32 index, u64 increment)
Increment a simple counter.
Definition: counter.h:74
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
BOND_TX_N_ERROR
@ BOND_TX_N_ERROR
Definition: device.c:42
ip6_neighbor.h
vnet_interface_output_runtime_t::dev_instance
u32 dev_instance
Definition: interface_funcs.h:479
bond_subif_add_del_function
static __clib_unused clib_error_t * bond_subif_add_del_function(vnet_main_t *vnm, u32 hw_if_index, struct vnet_sw_interface_t *st, int is_add)
Definition: device.c:122
CLIB_UNUSED
#define CLIB_UNUSED(x)
Definition: clib.h:90
vnet_buffer
#define vnet_buffer(b)
Definition: buffer.h:441
vec_elt_at_index
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
Definition: vec_bootstrap.h:203
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
bond_packet_trace_t::ethernet
ethernet_header_t ethernet
Definition: node.h:394
PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition: clib.h:124
bond_if_t::members
u32 * members
Definition: node.h:187
ip6_neighbor_advertise
void ip6_neighbor_advertise(vlib_main_t *vm, vnet_main_t *vnm, u32 sw_if_index, const ip6_address_t *addr)
Definition: ip6_neighbor.c:43
vlib_get_buffer_index
static u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
Definition: buffer_funcs.h:324
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
bond_update_sw_if_index
static_always_inline void bond_update_sw_if_index(bond_per_thread_data_t *ptd, bond_if_t *bif, u32 *bi, vlib_buffer_t **b, u32 *data, u32 n_left, int single_sw_if_index)
Definition: device.c:564
vnet_get_frame_to_sw_interface
static vlib_frame_t * vnet_get_frame_to_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
Definition: interface_funcs.h:357
c
svmdb_client_t * c
Definition: vpp_get_metrics.c:48
bond_detach_member
void bond_detach_member(vlib_main_t *vm, bond_detach_member_args_t *args)
Definition: cli.c:830
static_always_inline
#define static_always_inline
Definition: clib.h:112
bond_if_t::lb
u8 lb
Definition: node.h:172
lb_hash_hash
static_always_inline u32 lb_hash_hash(u64 k0, u64 k1, u64 k2, u64 k3, u64 k4)
Definition: lb_hash_hash.h:46
vec_foreach_index
#define vec_foreach_index(var, v)
Iterate over vector indices.
Definition: vec_bootstrap.h:220
bond_member_interface_add_del
static clib_error_t * bond_member_interface_add_del(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
Definition: device.c:866
uword
u64 uword
Definition: types.h:112
ethernet_header_t
Definition: packet.h:52
bond_per_port_queue_t::buffers
u32 buffers[VLIB_FRAME_SIZE]
Definition: node.h:159
bond_per_thread_data_t
Definition: node.h:163
clib_mem_unaligned
#define clib_mem_unaligned(pointer, type)
Definition: types.h:155
vlib_main_t::thread_index
u32 thread_index
Definition: main.h:215
VLIB_NODE_FLAG_TRACE_SUPPORTED
#define VLIB_NODE_FLAG_TRACE_SUPPORTED
Definition: node.h:295
node.h
vnet_hw_interface_t::n_trace
i32 n_trace
Definition: interface.h:738
mask
vl_api_pnat_mask_t mask
Definition: pnat.api:45
address
manual_print typedef address
Definition: ip_types.api:96
src
vl_api_address_t src
Definition: gre.api:54
bond_lb_round_robin
static_always_inline u32 bond_lb_round_robin(bond_if_t *bif, vlib_buffer_t *b0, uword n_members)
Definition: device.c:394
ip4_neighbor_advertise
void ip4_neighbor_advertise(vlib_main_t *vm, vnet_main_t *vnm, u32 sw_if_index, const ip4_address_t *addr)
Definition: ip4_neighbor.c:71
vlib_set_trace_count
static void vlib_set_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt, u32 count)
Definition: trace_funcs.h:226
bond_tx_inline
static_always_inline void bond_tx_inline(vlib_main_t *vm, bond_if_t *bif, vlib_buffer_t **b, u32 *h, u32 n_left, uword n_members, u32 lb_alg)
Definition: device.c:404
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
bond_interface_admin_up_down
static clib_error_t * bond_interface_admin_up_down(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
Definition: device.c:130
data
u8 data[128]
Definition: ipsec_types.api:95
ip4_packet.h
vnet_hw_interface_t
Definition: interface.h:638
vnet_main_t
Definition: vnet.h:76
foreach_bond_tx_error
#define foreach_bond_tx_error
Definition: device.c:31
ip_neighbor.h
u64
unsigned long u64
Definition: types.h:89
member_if_t
Definition: node.h:213
format
description fragment has unexpected format
Definition: map.api:433
ASSERT
#define ASSERT(truth)
Definition: error_bootstrap.h:69
bond_packet_trace_t::sw_if_index
u32 sw_if_index
Definition: node.h:395
f32x8_from_u32x8
static_always_inline f32x8 f32x8_from_u32x8(u32x8 v)
Definition: vector_avx2.h:238
bond_if_t::lb_rr_last_index
u32 lb_rr_last_index
Definition: node.h:175
ip.h
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
ip6
vl_api_ip6_address_t ip6
Definition: one.api:424
clib_prefetch_load
static_always_inline void clib_prefetch_load(void *p)
Definition: cache.h:92
dst
vl_api_ip4_address_t dst
Definition: pnat.api:41
ip6_hop_by_hop_header_t::length
u8 length
Definition: ip6_hop_by_hop_packet.h:26
vnet_get_hw_interface_or_null
static vnet_hw_interface_t * vnet_get_hw_interface_or_null(vnet_main_t *vnm, u32 hw_if_index)
Definition: interface_funcs.h:50
bond_per_port_queue_t::n_buffers
u32 n_buffers
Definition: node.h:160
lb_hash_hash.h
vnet_put_frame_to_sw_interface
static void vnet_put_frame_to_sw_interface(vnet_main_t *vnm, u32 sw_if_index, vlib_frame_t *f)
Definition: interface_funcs.h:364
vec_foreach
#define vec_foreach(var, vec)
Vector iterator.
Definition: vec_bootstrap.h:213
n_left
u32 n_left
Definition: interface_output.c:1096
VLIB_NODE_TYPE_PROCESS
@ VLIB_NODE_TYPE_PROCESS
Definition: node.h:84
bond_packet_trace_t
Definition: node.h:392
ip6_header_t
Definition: ip6_packet.h:294
bond_lb_l34
static_always_inline u32 bond_lb_l34(vlib_buffer_t *b0)
Definition: device.c:318
BOND_SEND_GARP_NA
@ BOND_SEND_GARP_NA
Definition: node.h:75
bond_get_member_by_sw_if_index
static member_if_t * bond_get_member_by_sw_if_index(u32 sw_if_index)
Definition: node.h:525
bond_add_del_mac_address
static clib_error_t * bond_add_del_mac_address(vnet_hw_interface_t *hi, const u8 *address, u8 is_add)
Definition: device.c:145
vnet_main
vnet_main_t vnet_main
Definition: misc.c:43
bond_tx_trace
static_always_inline void bond_tx_trace(vlib_main_t *vm, vlib_node_runtime_t *node, bond_if_t *bif, vlib_buffer_t **b, u32 n_left, u32 *h)
Definition: device.c:643
vnet_hw_interface_add_del_mac_address
clib_error_t * vnet_hw_interface_add_del_mac_address(vnet_main_t *vnm, u32 hw_if_index, const u8 *mac_address, u8 is_add)
Definition: interface.c:1539
vlib_main_t
Definition: main.h:102
lb_hash_hash_2_tuples
static_always_inline u32 lb_hash_hash_2_tuples(u64 k0, u32 k1)
Definition: lb_hash_hash.h:54
vlib_node_t
Definition: node.h:247
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
b
vlib_buffer_t ** b
Definition: nat44_ei_out2in.c:717
u32x8_from_f32x8
static_always_inline u32x8 u32x8_from_f32x8(f32x8 v)
Definition: vector_avx2.h:244
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
vnet_hw_interface_set_flags
clib_error_t * vnet_hw_interface_set_flags(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_interface_flags_t flags)
Definition: interface.c:513
a
a
Definition: bitmap.h:525
vlib_buffer_get_current
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:257
rt
vnet_interface_output_runtime_t * rt
Definition: interface_output.c:419
bond_if_t::active_members
u32 * active_members
Definition: node.h:190
ETHERNET_INTERFACE_FLAG_ACCEPT_ALL
#define ETHERNET_INTERFACE_FLAG_ACCEPT_ALL
Definition: ethernet.h:162
ethernet_vlan_header_t::type
u16 type
Definition: packet.h:136
i
int i
Definition: flowhash_template.h:376
ip6_hop_by_hop_header_t::protocol
u8 protocol
Definition: ip6_hop_by_hop_packet.h:21
bond_tx_error_t
bond_tx_error_t
Definition: device.c:37
bond_lb_broadcast
static_always_inline u32 bond_lb_broadcast(vlib_main_t *vm, bond_if_t *bif, vlib_buffer_t *b0, uword n_members)
Definition: device.c:197
bond_process
static uword bond_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: device.c:815
vnet_hw_interface_t::name
u8 * name
Definition: interface.h:678
vnet_hw_interface_t::hw_if_index
u32 hw_if_index
Definition: interface.h:667
bond_main_t::per_thread_data
bond_per_thread_data_t * per_thread_data
Definition: node.h:386
bond_detach_member_args_t::member
u32 member
Definition: node.h:108
vnet_hw_interface_walk_sw
void vnet_hw_interface_walk_sw(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.
Definition: interface.c:1122
bond_lb_l2
static_always_inline u32 bond_lb_l2(vlib_buffer_t *b0)
Definition: device.c:223
bond_main_t
Definition: node.h:361
vlib_node_runtime_t
Definition: node.h:454
vlib_trace_buffer
static __clib_warn_unused_result int vlib_trace_buffer(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, vlib_buffer_t *b, int follow_chain)
Definition: trace_funcs.h:153
bond_if_t::admin_up
u8 admin_up
Definition: node.h:170
from
from
Definition: nat44_ei_hairpinning.c:415
PREDICT_TRUE
#define PREDICT_TRUE(x)
Definition: clib.h:125
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
VLIB_TX
@ VLIB_TX
Definition: defs.h:47
bond_if_t::hw_if_index
u32 hw_if_index
Definition: node.h:183
walk_rc_t
enum walk_rc_t_ walk_rc_t
Walk return code.
bond_detach_member_args_t
Definition: node.h:106
bond_set_l2_mode_function
static __clib_unused clib_error_t * bond_set_l2_mode_function(vnet_main_t *vnm, struct vnet_hw_interface_t *bif_hw, i32 l2_if_adjust)
Definition: device.c:85
VNET_INTERFACE_COUNTER_DROP
@ VNET_INTERFACE_COUNTER_DROP
Definition: interface.h:904
bond_packet_trace_t::bond_sw_if_index
u32 bond_sw_if_index
Definition: node.h:396
bond_tx_add_to_queue
static_always_inline void bond_tx_add_to_queue(bond_per_thread_data_t *ptd, u32 port, u32 bi)
Definition: device.c:190
vnet_main_t::interface_main
vnet_interface_main_t interface_main
Definition: vnet.h:81
bond_detach_member_args_t::error
clib_error_t * error
Definition: node.h:111
bond_process_node
vlib_node_registration_t bond_process_node
(constructor) VLIB_REGISTER_NODE (bond_process_node)
Definition: device.c:842
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111
vnet_interface_output_runtime_t
Definition: interface_funcs.h:475
VLIB_REGISTER_NODE
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169
bond_main_t::vlib_main
vlib_main_t * vlib_main
Definition: node.h:376
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105