blob: 3eef95b7c908442e0ccd7fddfa16ff9d53bd490d [file] [log] [blame]
Damjan Marion22311502016-10-28 20:30:15 +02001/*
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
Damjan Marion51327ac2016-11-09 11:59:42 +010016#include <vnet/devices/devices.h>
Damjan Marion22311502016-10-28 20:30:15 +020017#include <vnet/feature/feature.h>
18
Damjan Marion51327ac2016-11-09 11:59:42 +010019static uword
20device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
21 vlib_frame_t * frame)
22{
23 return 0;
24}
25
Damjan Marion22311502016-10-28 20:30:15 +020026/* *INDENT-OFF* */
Damjan Marion51327ac2016-11-09 11:59:42 +010027VLIB_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
Dave Barach9f6186e2016-11-08 12:12:12 -050036VNET_FEATURE_ARC_INIT (device_input, static) =
37{
Damjan Marion22311502016-10-28 20:30:15 +020038 .arc_name = "device-input",
Damjan Marion51327ac2016-11-09 11:59:42 +010039 .start_nodes = VNET_FEATURES ("device-input"),
Damjan Marion8b3191e2016-11-09 19:54:20 +010040 .arc_index_ptr = &feature_main.device_input_feature_arc_index,
Damjan Marion22311502016-10-28 20:30:15 +020041};
42
43VNET_FEATURE_INIT (l2_patch, static) = {
44 .arc_name = "device-input",
45 .node_name = "l2-patch",
46 .runs_before = VNET_FEATURES ("ethernet-input"),
47};
48
49VNET_FEATURE_INIT (worker_handoff, static) = {
50 .arc_name = "device-input",
51 .node_name = "worker-handoff",
52 .runs_before = VNET_FEATURES ("ethernet-input"),
53};
54
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +010055VNET_FEATURE_INIT (span_input, static) = {
56 .arc_name = "device-input",
57 .node_name = "span-input",
58 .runs_before = VNET_FEATURES ("ethernet-input"),
59};
60
Damjan Marion22311502016-10-28 20:30:15 +020061VNET_FEATURE_INIT (ethernet_input, static) = {
62 .arc_name = "device-input",
63 .node_name = "ethernet-input",
64 .runs_before = 0, /* not before any other features */
65};
66/* *INDENT-ON* */
67
68/*
69 * fd.io coding-style-patch-verification: ON
70 *
71 * Local Variables:
72 * eval: (c-set-style "gnu")
73 * End:
74 */