devices: create dummy device-input node to keep nexts in sync
[vpp.git] / vnet / vnet / devices / devices.c
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 #include <vnet/devices/devices.h>
17 #include <vnet/feature/feature.h>
18
19 static uword
20 device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
21                  vlib_frame_t * frame)
22 {
23   return 0;
24 }
25
26 /* *INDENT-OFF* */
27 VLIB_REGISTER_NODE (device_input_node) = {
28   .function = device_input_fn,
29   .name = "device-input",
30   .type = VLIB_NODE_TYPE_INPUT,
31   .state = VLIB_NODE_STATE_DISABLED,
32   .n_next_nodes = VNET_DEVICE_INPUT_N_NEXT_NODES,
33   .next_nodes = VNET_DEVICE_INPUT_NEXT_NODES,
34 };
35
36 VNET_FEATURE_ARC_INIT (device_input, static) =
37 {
38   .arc_name  = "device-input",
39   .start_nodes = VNET_FEATURES ("device-input"),
40 };
41
42 VNET_FEATURE_INIT (l2_patch, static) = {
43   .arc_name = "device-input",
44   .node_name = "l2-patch",
45   .runs_before = VNET_FEATURES ("ethernet-input"),
46 };
47
48 VNET_FEATURE_INIT (worker_handoff, static) = {
49   .arc_name = "device-input",
50   .node_name = "worker-handoff",
51   .runs_before = VNET_FEATURES ("ethernet-input"),
52 };
53
54 VNET_FEATURE_INIT (ethernet_input, static) = {
55   .arc_name = "device-input",
56   .node_name = "ethernet-input",
57   .runs_before = 0, /* not before any other features */
58 };
59 /* *INDENT-ON* */
60
61 /*
62  * fd.io coding-style-patch-verification: ON
63  *
64  * Local Variables:
65  * eval: (c-set-style "gnu")
66  * End:
67  */