summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/af_packet.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-03-27 17:08:20 +0200
committerDave Barach <openvpp@barachs.net>2017-03-30 14:14:26 +0000
commit1927da29ccbe1d4cc8e59ccfa197eb41c257814f (patch)
tree226487b33921b9a45f78016d078548a6815c3431 /src/vnet/devices/af_packet/af_packet.c
parentb18e0de1f9630fab8b3d6ffe85c7a6ee35a6fdac (diff)
vppinfra: add spinlock inline functions
Change-Id: I86089e9bb604adfc260a111685001be1c897ce53 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/af_packet/af_packet.c')
-rw-r--r--src/vnet/devices/af_packet/af_packet.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c
index 5fdc59f2a20..2028510716e 100644
--- a/src/vnet/devices/af_packet/af_packet.c
+++ b/src/vnet/devices/af_packet/af_packet.c
@@ -229,11 +229,7 @@ af_packet_create_if (vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set,
apif->next_rx_frame = 0;
if (tm->n_vlib_mains > 1)
- {
- apif->lockp = clib_mem_alloc_aligned (CLIB_CACHE_LINE_BYTES,
- CLIB_CACHE_LINE_BYTES);
- memset ((void *) apif->lockp, 0, CLIB_CACHE_LINE_BYTES);
- }
+ clib_spinlock_init (&apif->lockp);
{
unix_file_t template = { 0 };