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:
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/devices/devices.h>
17 #include <vnet/feature/feature.h>
20 device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
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,
36 VNET_FEATURE_ARC_INIT (device_input, static) =
38 .arc_name = "device-input",
39 .start_nodes = VNET_FEATURES ("device-input"),
40 .arc_index_ptr = &feature_main.device_input_feature_arc_index,
43 VNET_FEATURE_INIT (l2_patch, static) = {
44 .arc_name = "device-input",
45 .node_name = "l2-patch",
46 .runs_before = VNET_FEATURES ("ethernet-input"),
49 VNET_FEATURE_INIT (worker_handoff, static) = {
50 .arc_name = "device-input",
51 .node_name = "worker-handoff",
52 .runs_before = VNET_FEATURES ("ethernet-input"),
55 VNET_FEATURE_INIT (ethernet_input, static) = {
56 .arc_name = "device-input",
57 .node_name = "ethernet-input",
58 .runs_before = 0, /* not before any other features */
63 * fd.io coding-style-patch-verification: ON
66 * eval: (c-set-style "gnu")