2 * Copyright (c) 2016 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #include <vnet/adj/adj_nbr.h>
17 #include <vnet/adj/adj_internal.h>
18 #include <vnet/adj/adj_l2.h>
19 #include <vnet/adj/adj_nsh.h>
20 #include <vnet/adj/adj_midchain.h>
21 #include <vnet/ethernet/arp_packet.h>
22 #include <vnet/dpo/drop_dpo.h>
23 #include <vnet/dpo/load_balance.h>
24 #include <vnet/fib/fib_walk.h>
25 #include <vnet/fib/fib_entry.h>
28 * The two midchain tx feature node indices
30 static u32 adj_midchain_tx_feature_node[VNET_LINK_NUM];
31 static u32 adj_midchain_tx_no_count_feature_node[VNET_LINK_NUM];
33 static u32 *adj_midchain_feat_count_per_sw_if_index[VNET_LINK_NUM];
36 * @brief Trace data for packets traversing the midchain tx node
38 typedef struct adj_midchain_tx_trace_t_
41 * @brief the midchain adj we are traversing
44 } adj_midchain_tx_trace_t;
47 adj_midchain_tx_inline (vlib_main_t * vm,
48 vlib_node_runtime_t * node,
52 u32 * from, * to_next, n_left_from, n_left_to_next;
54 vnet_main_t *vnm = vnet_get_main ();
55 vnet_interface_main_t *im = &vnm->interface_main;
56 u32 thread_index = vm->thread_index;
58 /* Vector of buffer / pkt indices we're supposed to process */
59 from = vlib_frame_vector_args (frame);
61 /* Number of buffers / pkts */
62 n_left_from = frame->n_vectors;
64 /* Speculatively send the first buffer to the last disposition we used */
65 next_index = node->cached_next_index;
67 while (n_left_from > 0)
69 /* set up to enqueue to our disposition with index = next_index */
70 vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
72 while (n_left_from >= 8 && n_left_to_next > 4)
74 const ip_adjacency_t *adj0, *adj1, *adj2, *adj3;
75 const dpo_id_t *dpo0, *dpo1, *dpo2, *dpo3;
76 vlib_buffer_t * b0, *b1, *b2, *b3;
77 u32 bi0, adj_index0, next0;
78 u32 bi1, adj_index1, next1;
79 u32 bi2, adj_index2, next2;
80 u32 bi3, adj_index3, next3;
82 /* Prefetch next iteration. */
84 vlib_buffer_t * p4, * p5;
85 vlib_buffer_t * p6, * p7;
87 p4 = vlib_get_buffer (vm, from[4]);
88 p5 = vlib_get_buffer (vm, from[5]);
89 p6 = vlib_get_buffer (vm, from[6]);
90 p7 = vlib_get_buffer (vm, from[7]);
92 vlib_prefetch_buffer_header (p4, LOAD);
93 vlib_prefetch_buffer_header (p5, LOAD);
94 vlib_prefetch_buffer_header (p6, LOAD);
95 vlib_prefetch_buffer_header (p7, LOAD);
112 b0 = vlib_get_buffer(vm, bi0);
113 b1 = vlib_get_buffer(vm, bi1);
114 b2 = vlib_get_buffer(vm, bi2);
115 b3 = vlib_get_buffer(vm, bi3);
117 /* Follow the DPO on which the midchain is stacked */
118 adj_index0 = vnet_buffer(b0)->ip.adj_index[VLIB_TX];
119 adj_index1 = vnet_buffer(b1)->ip.adj_index[VLIB_TX];
120 adj_index2 = vnet_buffer(b2)->ip.adj_index[VLIB_TX];
121 adj_index3 = vnet_buffer(b3)->ip.adj_index[VLIB_TX];
123 adj0 = adj_get(adj_index0);
124 adj1 = adj_get(adj_index1);
125 adj2 = adj_get(adj_index2);
126 adj3 = adj_get(adj_index3);
128 dpo0 = &adj0->sub_type.midchain.next_dpo;
129 dpo1 = &adj1->sub_type.midchain.next_dpo;
130 dpo2 = &adj2->sub_type.midchain.next_dpo;
131 dpo3 = &adj3->sub_type.midchain.next_dpo;
133 next0 = dpo0->dpoi_next_node;
134 next1 = dpo1->dpoi_next_node;
135 next2 = dpo2->dpoi_next_node;
136 next3 = dpo3->dpoi_next_node;
138 vnet_buffer(b1)->ip.adj_index[VLIB_TX] = dpo1->dpoi_index;
139 vnet_buffer(b0)->ip.adj_index[VLIB_TX] = dpo0->dpoi_index;
140 vnet_buffer(b2)->ip.adj_index[VLIB_TX] = dpo2->dpoi_index;
141 vnet_buffer(b3)->ip.adj_index[VLIB_TX] = dpo3->dpoi_index;
145 vlib_increment_combined_counter (im->combined_sw_if_counters
146 + VNET_INTERFACE_COUNTER_TX,
148 adj0->rewrite_header.sw_if_index,
150 vlib_buffer_length_in_chain (vm, b0));
151 vlib_increment_combined_counter (im->combined_sw_if_counters
152 + VNET_INTERFACE_COUNTER_TX,
154 adj1->rewrite_header.sw_if_index,
156 vlib_buffer_length_in_chain (vm, b1));
157 vlib_increment_combined_counter (im->combined_sw_if_counters
158 + VNET_INTERFACE_COUNTER_TX,
160 adj2->rewrite_header.sw_if_index,
162 vlib_buffer_length_in_chain (vm, b2));
163 vlib_increment_combined_counter (im->combined_sw_if_counters
164 + VNET_INTERFACE_COUNTER_TX,
166 adj3->rewrite_header.sw_if_index,
168 vlib_buffer_length_in_chain (vm, b3));
171 if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
173 adj_midchain_tx_trace_t *tr = vlib_add_trace (vm, node,
177 if (PREDICT_FALSE(b1->flags & VLIB_BUFFER_IS_TRACED))
179 adj_midchain_tx_trace_t *tr = vlib_add_trace (vm, node,
183 if (PREDICT_FALSE(b2->flags & VLIB_BUFFER_IS_TRACED))
185 adj_midchain_tx_trace_t *tr = vlib_add_trace (vm, node,
189 if (PREDICT_FALSE(b3->flags & VLIB_BUFFER_IS_TRACED))
191 adj_midchain_tx_trace_t *tr = vlib_add_trace (vm, node,
196 vlib_validate_buffer_enqueue_x4 (vm, node, next_index,
197 to_next, n_left_to_next,
199 next0, next1, next2, next3);
201 while (n_left_from > 0 && n_left_to_next > 0)
203 u32 bi0, adj_index0, next0;
204 const ip_adjacency_t * adj0;
205 const dpo_id_t *dpo0;
215 b0 = vlib_get_buffer(vm, bi0);
217 /* Follow the DPO on which the midchain is stacked */
218 adj_index0 = vnet_buffer(b0)->ip.adj_index[VLIB_TX];
219 adj0 = adj_get(adj_index0);
220 dpo0 = &adj0->sub_type.midchain.next_dpo;
221 next0 = dpo0->dpoi_next_node;
222 vnet_buffer(b0)->ip.adj_index[VLIB_TX] = dpo0->dpoi_index;
226 vlib_increment_combined_counter (im->combined_sw_if_counters
227 + VNET_INTERFACE_COUNTER_TX,
229 adj0->rewrite_header.sw_if_index,
231 vlib_buffer_length_in_chain (vm, b0));
234 if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
236 adj_midchain_tx_trace_t *tr = vlib_add_trace (vm, node,
241 vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
242 to_next, n_left_to_next,
246 vlib_put_next_frame (vm, node, next_index, n_left_to_next);
249 return frame->n_vectors;
253 format_adj_midchain_tx_trace (u8 * s, va_list * args)
255 CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
256 CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
257 adj_midchain_tx_trace_t *tr = va_arg (*args, adj_midchain_tx_trace_t*);
259 s = format(s, "adj-midchain:[%d]:%U", tr->ai,
260 format_ip_adjacency, tr->ai,
261 FORMAT_IP_ADJACENCY_NONE);
267 adj_midchain_tx (vlib_main_t * vm,
268 vlib_node_runtime_t * node,
269 vlib_frame_t * frame)
271 return (adj_midchain_tx_inline(vm, node, frame, 1));
274 VLIB_REGISTER_NODE (adj_midchain_tx_node, static) = {
275 .function = adj_midchain_tx,
276 .name = "adj-midchain-tx",
277 .vector_size = sizeof (u32),
279 .format_trace = format_adj_midchain_tx_trace,
288 adj_midchain_tx_no_count (vlib_main_t * vm,
289 vlib_node_runtime_t * node,
290 vlib_frame_t * frame)
292 return (adj_midchain_tx_inline(vm, node, frame, 0));
295 VLIB_REGISTER_NODE (adj_midchain_tx_no_count_node, static) = {
296 .function = adj_midchain_tx_no_count,
297 .name = "adj-midchain-tx-no-count",
298 .vector_size = sizeof (u32),
300 .format_trace = format_adj_midchain_tx_trace,
308 VNET_FEATURE_INIT (adj_midchain_tx_ip4, static) = {
309 .arc_name = "ip4-output",
310 .node_name = "adj-midchain-tx",
311 .runs_before = VNET_FEATURES ("interface-output"),
312 .feature_index_ptr = &adj_midchain_tx_feature_node[VNET_LINK_IP4],
314 VNET_FEATURE_INIT (adj_midchain_tx_no_count_ip4, static) = {
315 .arc_name = "ip4-output",
316 .node_name = "adj-midchain-tx-no-count",
317 .runs_before = VNET_FEATURES ("interface-output"),
318 .feature_index_ptr = &adj_midchain_tx_no_count_feature_node[VNET_LINK_IP4],
320 VNET_FEATURE_INIT (adj_midchain_tx_ip6, static) = {
321 .arc_name = "ip6-output",
322 .node_name = "adj-midchain-tx",
323 .runs_before = VNET_FEATURES ("interface-output"),
324 .feature_index_ptr = &adj_midchain_tx_feature_node[VNET_LINK_IP6],
326 VNET_FEATURE_INIT (adj_midchain_tx_no_count_ip6, static) = {
327 .arc_name = "ip6-output",
328 .node_name = "adj-midchain-tx-no-count",
329 .runs_before = VNET_FEATURES ("interface-output"),
330 .feature_index_ptr = &adj_midchain_tx_no_count_feature_node[VNET_LINK_IP6],
332 VNET_FEATURE_INIT (adj_midchain_tx_mpls, static) = {
333 .arc_name = "mpls-output",
334 .node_name = "adj-midchain-tx",
335 .runs_before = VNET_FEATURES ("interface-output"),
336 .feature_index_ptr = &adj_midchain_tx_feature_node[VNET_LINK_MPLS],
338 VNET_FEATURE_INIT (adj_midchain_tx_no_count_mpls, static) = {
339 .arc_name = "mpls-output",
340 .node_name = "adj-midchain-tx-no-count",
341 .runs_before = VNET_FEATURES ("interface-output"),
342 .feature_index_ptr = &adj_midchain_tx_no_count_feature_node[VNET_LINK_MPLS],
344 VNET_FEATURE_INIT (adj_midchain_tx_ethernet, static) = {
345 .arc_name = "ethernet-output",
346 .node_name = "adj-midchain-tx",
347 .runs_before = VNET_FEATURES ("error-drop"),
348 .feature_index_ptr = &adj_midchain_tx_feature_node[VNET_LINK_ETHERNET],
350 VNET_FEATURE_INIT (adj_midchain_tx_no_count_ethernet, static) = {
351 .arc_name = "ethernet-output",
352 .node_name = "adj-midchain-tx-no-count",
353 .runs_before = VNET_FEATURES ("error-drop"),
354 .feature_index_ptr = &adj_midchain_tx_no_count_feature_node[VNET_LINK_ETHERNET],
356 VNET_FEATURE_INIT (adj_midchain_tx_nsh, static) = {
357 .arc_name = "nsh-output",
358 .node_name = "adj-midchain-tx",
359 .runs_before = VNET_FEATURES ("error-drop"),
360 .feature_index_ptr = &adj_midchain_tx_feature_node[VNET_LINK_NSH],
362 VNET_FEATURE_INIT (adj_midchain_tx_no_count_nsh, static) = {
363 .arc_name = "nsh-output",
364 .node_name = "adj-midchain-tx-no-count",
365 .runs_before = VNET_FEATURES ("error-drop"),
366 .feature_index_ptr = &adj_midchain_tx_no_count_feature_node[VNET_LINK_NSH],
370 adj_get_midchain_node (vnet_link_t link)
374 return (ip4_midchain_node.index);
376 return (ip6_midchain_node.index);
378 return (mpls_midchain_node.index);
379 case VNET_LINK_ETHERNET:
380 return (adj_l2_midchain_node.index);
382 return (adj_nsh_midchain_node.index);
391 adj_midchain_get_feature_arc_index_for_link_type (const ip_adjacency_t *adj)
394 switch (adj->ia_link)
398 arc = ip4_main.lookup_main.output_feature_arc_index;
403 arc = ip6_main.lookup_main.output_feature_arc_index;
408 arc = mpls_main.output_feature_arc_index;
411 case VNET_LINK_ETHERNET:
413 arc = ethernet_main.output_feature_arc_index;
418 arc = nsh_main_dummy.output_feature_arc_index;
426 ASSERT (arc != (u8) ~0);
432 adj_nbr_midchain_get_tx_node (ip_adjacency_t *adj)
434 return ((adj->ia_flags & ADJ_FLAG_MIDCHAIN_NO_COUNT) ?
435 adj_midchain_tx_no_count_node.index :
436 adj_midchain_tx_node.index);
440 adj_nbr_midchain_get_feature_node (ip_adjacency_t *adj)
442 if (adj->ia_flags & ADJ_FLAG_MIDCHAIN_NO_COUNT)
444 return (adj_midchain_tx_no_count_feature_node[adj->ia_link]);
447 return (adj_midchain_tx_feature_node[adj->ia_link]);
453 * Setup the adj as a mid-chain
456 adj_midchain_teardown (ip_adjacency_t *adj)
461 dpo_reset(&adj->sub_type.midchain.next_dpo);
463 arc_index = adj_midchain_get_feature_arc_index_for_link_type (adj);
464 feature_index = adj_nbr_midchain_get_feature_node(adj);
466 if (0 == --adj_midchain_feat_count_per_sw_if_index[adj->ia_link][adj->rewrite_header.sw_if_index])
468 vnet_feature_enable_disable_with_index (arc_index, feature_index,
469 adj->rewrite_header.sw_if_index,
477 * Setup the adj as a mid-chain
480 adj_midchain_setup (adj_index_t adj_index,
481 adj_midchain_fixup_t fixup,
485 u32 feature_index, tx_node;
489 ASSERT(ADJ_INDEX_INVALID != adj_index);
491 adj = adj_get(adj_index);
493 adj->sub_type.midchain.fixup_func = fixup;
494 adj->sub_type.midchain.fixup_data = data;
495 adj->sub_type.midchain.fei = FIB_NODE_INDEX_INVALID;
496 adj->ia_flags |= flags;
498 arc_index = adj_midchain_get_feature_arc_index_for_link_type (adj);
499 feature_index = adj_nbr_midchain_get_feature_node(adj);
500 tx_node = adj_nbr_midchain_get_tx_node(adj);
502 vec_validate (adj_midchain_feat_count_per_sw_if_index[adj->ia_link],
503 adj->rewrite_header.sw_if_index);
505 if (0 == adj_midchain_feat_count_per_sw_if_index[adj->ia_link][adj->rewrite_header.sw_if_index]++)
507 vnet_feature_enable_disable_with_index (arc_index, feature_index,
508 adj->rewrite_header.sw_if_index,
509 1 /* enable */, 0, 0);
513 * stack the midchain on the drop so it's ready to forward in the adj-midchain-tx.
514 * The graph arc used/created here is from the midchain-tx node to the
515 * child's registered node. This is because post adj processing the next
516 * node are any output features, then the midchain-tx. from there we
517 * need to get to the stacked child's node.
519 dpo_stack_from_node(tx_node,
520 &adj->sub_type.midchain.next_dpo,
521 drop_dpo_get(vnet_link_to_dpo_proto(adj->ia_link)));
525 * adj_nbr_midchain_update_rewrite
527 * Update the adjacency's rewrite string. A NULL string implies the
528 * rewrite is reset (i.e. when ARP/ND entry is gone).
529 * NB: the adj being updated may be handling traffic in the DP.
532 adj_nbr_midchain_update_rewrite (adj_index_t adj_index,
533 adj_midchain_fixup_t fixup,
534 const void *fixup_data,
540 ASSERT(ADJ_INDEX_INVALID != adj_index);
542 adj = adj_get(adj_index);
545 * one time only update. since we don't support changing the tunnel
546 * src,dst, this is all we need.
548 if (adj->lookup_next_index != IP_LOOKUP_NEXT_MIDCHAIN &&
549 adj->lookup_next_index != IP_LOOKUP_NEXT_MCAST_MIDCHAIN)
551 adj_midchain_setup(adj_index, fixup, fixup_data, flags);
555 * update the rewrite with the workers paused.
557 adj_nbr_update_rewrite_internal(adj,
558 IP_LOOKUP_NEXT_MIDCHAIN,
559 adj_get_midchain_node(adj->ia_link),
560 adj_nbr_midchain_get_tx_node(adj),
565 * adj_nbr_midchain_unstack
567 * Unstack the adj. stack it on drop
570 adj_nbr_midchain_unstack (adj_index_t adj_index)
572 fib_node_index_t *entry_indicies, tmp;
575 ASSERT(ADJ_INDEX_INVALID != adj_index);
576 adj = adj_get (adj_index);
579 * check to see if this unstacking breaks a recursion loop
581 entry_indicies = NULL;
582 tmp = adj->sub_type.midchain.fei;
583 adj->sub_type.midchain.fei = FIB_NODE_INDEX_INVALID;
585 if (FIB_NODE_INDEX_INVALID != tmp)
587 fib_entry_recursive_loop_detect(tmp, &entry_indicies);
588 vec_free(entry_indicies);
594 dpo_stack(DPO_ADJACENCY_MIDCHAIN,
595 vnet_link_to_dpo_proto(adj->ia_link),
596 &adj->sub_type.midchain.next_dpo,
597 drop_dpo_get(vnet_link_to_dpo_proto(adj->ia_link)));
598 CLIB_MEMORY_BARRIER();
602 adj_nbr_midchain_stack_on_fib_entry (adj_index_t ai,
603 fib_node_index_t fei,
604 fib_forward_chain_type_t fct)
606 fib_node_index_t *entry_indicies;
607 dpo_id_t tmp = DPO_INVALID;
613 * check to see if this stacking will form a recursion loop
615 entry_indicies = NULL;
616 adj->sub_type.midchain.fei = fei;
618 if (fib_entry_recursive_loop_detect(adj->sub_type.midchain.fei, &entry_indicies))
621 * loop formed, stack on the drop.
623 dpo_copy(&tmp, drop_dpo_get(fib_forw_chain_type_to_dpo_proto(fct)));
627 fib_entry_contribute_forwarding (fei, fct, &tmp);
629 if ((adj->ia_flags & ADJ_FLAG_MIDCHAIN_IP_STACK) &&
630 (DPO_LOAD_BALANCE == tmp.dpoi_type))
633 * do that hash now and stack on the choice.
634 * If the choice is an incomplete adj then we will need a poke when
635 * it becomes complete. This happens since the adj update walk propagates
636 * as far a recursive paths.
638 const dpo_id_t *choice;
642 lb = load_balance_get (tmp.dpoi_index);
644 if (FIB_FORW_CHAIN_TYPE_UNICAST_IP4 == fct)
646 hash = ip4_compute_flow_hash ((ip4_header_t *) adj_get_rewrite (ai),
649 else if (FIB_FORW_CHAIN_TYPE_UNICAST_IP6 == fct)
651 hash = ip6_compute_flow_hash ((ip6_header_t *) adj_get_rewrite (ai),
660 choice = load_balance_get_bucket_i (lb, hash & lb->lb_n_buckets_minus_1);
661 dpo_copy (&tmp, choice);
664 adj_nbr_midchain_stack (ai, &tmp);
666 vec_free(entry_indicies);
670 * adj_nbr_midchain_stack
673 adj_nbr_midchain_stack (adj_index_t adj_index,
674 const dpo_id_t *next)
678 ASSERT(ADJ_INDEX_INVALID != adj_index);
680 adj = adj_get(adj_index);
682 ASSERT((IP_LOOKUP_NEXT_MIDCHAIN == adj->lookup_next_index) ||
683 (IP_LOOKUP_NEXT_MCAST_MIDCHAIN == adj->lookup_next_index));
685 dpo_stack_from_node(adj_nbr_midchain_get_tx_node(adj),
686 &adj->sub_type.midchain.next_dpo,
691 adj_ndr_midchain_recursive_loop_detect (adj_index_t ai,
692 fib_node_index_t **entry_indicies)
694 fib_node_index_t *entry_index, *entries;
695 ip_adjacency_t * adj;
698 entries = *entry_indicies;
700 vec_foreach(entry_index, entries)
702 if (*entry_index == adj->sub_type.midchain.fei)
705 * The entry this midchain links to is already in the set
706 * of visited entries, this is a loop
708 adj->ia_flags |= ADJ_FLAG_MIDCHAIN_LOOPED;
713 adj->ia_flags &= ~ADJ_FLAG_MIDCHAIN_LOOPED;
718 format_adj_midchain (u8* s, va_list *ap)
720 index_t index = va_arg(*ap, index_t);
721 u32 indent = va_arg(*ap, u32);
722 ip_adjacency_t * adj = adj_get(index);
724 s = format (s, "%U", format_vnet_link, adj->ia_link);
725 if (adj->rewrite_header.flags & VNET_REWRITE_HAS_FEATURES)
726 s = format(s, " [features]");
727 s = format (s, " via %U",
728 format_ip46_address, &adj->sub_type.nbr.next_hop,
729 adj_proto_to_46(adj->ia_nh_proto));
730 s = format (s, " %U",
732 &adj->rewrite_header, sizeof (adj->rewrite_data), indent);
733 s = format (s, "\n%Ustacked-on",
734 format_white_space, indent);
736 if (FIB_NODE_INDEX_INVALID != adj->sub_type.midchain.fei)
738 s = format (s, " entry:%d", adj->sub_type.midchain.fei);
741 s = format (s, ":\n%U%U",
742 format_white_space, indent+2,
743 format_dpo_id, &adj->sub_type.midchain.next_dpo, indent+2);
749 adj_dpo_lock (dpo_id_t *dpo)
751 adj_lock(dpo->dpoi_index);
754 adj_dpo_unlock (dpo_id_t *dpo)
756 adj_unlock(dpo->dpoi_index);
759 const static dpo_vft_t adj_midchain_dpo_vft = {
760 .dv_lock = adj_dpo_lock,
761 .dv_unlock = adj_dpo_unlock,
762 .dv_format = format_adj_midchain,
763 .dv_get_urpf = adj_dpo_get_urpf,
767 * @brief The per-protocol VLIB graph nodes that are assigned to a midchain
770 * this means that these graph nodes are ones from which a midchain is the
771 * parent object in the DPO-graph.
773 const static char* const midchain_ip4_nodes[] =
778 const static char* const midchain_ip6_nodes[] =
783 const static char* const midchain_mpls_nodes[] =
788 const static char* const midchain_ethernet_nodes[] =
793 const static char* const midchain_nsh_nodes[] =
799 const static char* const * const midchain_nodes[DPO_PROTO_NUM] =
801 [DPO_PROTO_IP4] = midchain_ip4_nodes,
802 [DPO_PROTO_IP6] = midchain_ip6_nodes,
803 [DPO_PROTO_MPLS] = midchain_mpls_nodes,
804 [DPO_PROTO_ETHERNET] = midchain_ethernet_nodes,
805 [DPO_PROTO_NSH] = midchain_nsh_nodes,
809 adj_midchain_module_init (void)
811 dpo_register(DPO_ADJACENCY_MIDCHAIN, &adj_midchain_dpo_vft, midchain_nodes);