diff options
author | Damjan Marion <damarion@cisco.com> | 2016-11-15 19:47:58 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2016-11-18 13:42:30 +0000 |
commit | 7dc4146eb15a3244d529410cc4adf09a636c2fdb (patch) | |
tree | 567894656f9d3282efa57579ac8acba641a58378 /vnet/vnet/devices/devices.c | |
parent | c6e8e1096bea2b5f007fa9d1efb793ee4011af44 (diff) |
dpdk: quad loop dpdk-input node
Change-Id: I761af883403b6740bd24ce196ae0bfe6bc77b409
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/devices/devices.c')
-rw-r--r-- | vnet/vnet/devices/devices.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vnet/vnet/devices/devices.c b/vnet/vnet/devices/devices.c index 3eef95b7c90..a1100194f3d 100644 --- a/vnet/vnet/devices/devices.c +++ b/vnet/vnet/devices/devices.c @@ -13,8 +13,11 @@ * limitations under the License. */ +#include <vnet/vnet.h> #include <vnet/devices/devices.h> #include <vnet/feature/feature.h> +#include <vnet/ip/ip.h> +#include <vnet/ethernet/ethernet.h> static uword device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -33,6 +36,18 @@ VLIB_REGISTER_NODE (device_input_node) = { .next_nodes = VNET_DEVICE_INPUT_NEXT_NODES, }; +/* Table defines how much we need to advance current data pointer + in the buffer if we shortcut to l3 nodes */ + +const u32 __attribute__((aligned (CLIB_CACHE_LINE_BYTES))) +device_input_next_node_advance[((VNET_DEVICE_INPUT_N_NEXT_NODES / + CLIB_CACHE_LINE_BYTES) +1) * CLIB_CACHE_LINE_BYTES] = +{ + [VNET_DEVICE_INPUT_NEXT_IP4_INPUT] = sizeof (ethernet_header_t), + [VNET_DEVICE_INPUT_NEXT_IP6_INPUT] = sizeof (ethernet_header_t), + [VNET_DEVICE_INPUT_NEXT_MPLS_INPUT] = sizeof (ethernet_header_t), +}; + VNET_FEATURE_ARC_INIT (device_input, static) = { .arc_name = "device-input", |