vppinfra: add spinlock inline functions
[vpp.git] / src / vnet / devices / af_packet / af_packet.h
index e00e5cb..77a2c7a 100644 (file)
  *------------------------------------------------------------------
  */
 
+#include <vppinfra/lock.h>
+
 typedef struct
 {
   CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
-  volatile u32 *lockp;
+  clib_spinlock_t lockp;
   u8 *host_if_name;
   int fd;
   struct tpacket_req *rx_req;
@@ -51,12 +53,6 @@ typedef struct
 
   /* hash of host interface names */
   mhash_t if_index_by_host_if_name;
-
-  /* first cpu index */
-  u32 input_cpu_first_index;
-
-  /* total cpu count */
-  u32 input_cpu_count;
 } af_packet_main_t;
 
 af_packet_main_t af_packet_main;