Damjan Marion | 2231150 | 2016-10-28 20:30:15 +0200 | [diff] [blame] | 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 | |
Damjan Marion | 51327ac | 2016-11-09 11:59:42 +0100 | [diff] [blame] | 16 | #include <vnet/devices/devices.h> |
Damjan Marion | 2231150 | 2016-10-28 20:30:15 +0200 | [diff] [blame] | 17 | #include <vnet/feature/feature.h> |
| 18 | |
Damjan Marion | 51327ac | 2016-11-09 11:59:42 +0100 | [diff] [blame] | 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 | |
Damjan Marion | 2231150 | 2016-10-28 20:30:15 +0200 | [diff] [blame] | 26 | /* *INDENT-OFF* */ |
Damjan Marion | 51327ac | 2016-11-09 11:59:42 +0100 | [diff] [blame] | 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 | |
Dave Barach | 9f6186e | 2016-11-08 12:12:12 -0500 | [diff] [blame] | 36 | VNET_FEATURE_ARC_INIT (device_input, static) = |
| 37 | { |
Damjan Marion | 2231150 | 2016-10-28 20:30:15 +0200 | [diff] [blame] | 38 | .arc_name = "device-input", |
Damjan Marion | 51327ac | 2016-11-09 11:59:42 +0100 | [diff] [blame] | 39 | .start_nodes = VNET_FEATURES ("device-input"), |
Damjan Marion | 8b3191e | 2016-11-09 19:54:20 +0100 | [diff] [blame] | 40 | .arc_index_ptr = &feature_main.device_input_feature_arc_index, |
Damjan Marion | 2231150 | 2016-10-28 20:30:15 +0200 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | VNET_FEATURE_INIT (l2_patch, static) = { |
| 44 | .arc_name = "device-input", |
| 45 | .node_name = "l2-patch", |
| 46 | .runs_before = VNET_FEATURES ("ethernet-input"), |
| 47 | }; |
| 48 | |
| 49 | VNET_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 Kotucek | f6e3dc4 | 2016-11-04 09:58:01 +0100 | [diff] [blame^] | 55 | VNET_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 Marion | 2231150 | 2016-10-28 20:30:15 +0200 | [diff] [blame] | 61 | VNET_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 | */ |