aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/devices.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-02-28 21:55:28 +0100
committerNeale Ranns <nranns@cisco.com>2017-03-01 11:11:37 +0000
commitb3bb10101ceffec1df0624c785acbd40858870ec (patch)
tree9f4a8bc34be67373a372f800cd6eab86e85d556a /src/vnet/devices/devices.c
parentf7c379403a98cf060d28bac24916c51067c4ec90 (diff)
devices: vnet_get_aggregate_rx_packets should not be dpdk specific
Change-Id: I1152db4b7d1602653d7d8b2c6cb28cf5c526c4ca Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/devices.c')
-rw-r--r--src/vnet/devices/devices.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vnet/devices/devices.c b/src/vnet/devices/devices.c
index cd4386ebdca..c81043c6ac9 100644
--- a/src/vnet/devices/devices.c
+++ b/src/vnet/devices/devices.c
@@ -19,6 +19,8 @@
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
+vnet_device_main_t vnet_device_main;
+
static uword
device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame)
@@ -82,6 +84,18 @@ VNET_FEATURE_INIT (ethernet_input, static) = {
};
/* *INDENT-ON* */
+static clib_error_t *
+vnet_device_init (vlib_main_t * vm)
+{
+ vnet_device_main_t *vdm = &vnet_device_main;
+ vlib_thread_main_t *tm = vlib_get_thread_main ();
+
+ vec_validate_aligned (vdm->workers, tm->n_vlib_mains - 1,
+ CLIB_CACHE_LINE_BYTES);
+ return 0;
+}
+
+VLIB_INIT_FUNCTION (vnet_device_init);
/*
* fd.io coding-style-patch-verification: ON
*