From cf751ec70df21affb19c77b2c51e3c231b8202ad Mon Sep 17 00:00:00 2001 From: Mohsin KAZMI Date: Wed, 18 Jan 2017 11:59:45 +0100 Subject: af_packet: multithreading support This patch adds multithreading support for af_packet interfaces. Change-Id: Ief5d1117e7ffeaa59dbc2831e583d5d8e8d4fa7a Signed-off-by: Mohsin KAZMI --- src/vnet/devices/af_packet/af_packet.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vnet/devices/af_packet/af_packet.h') diff --git a/src/vnet/devices/af_packet/af_packet.h b/src/vnet/devices/af_packet/af_packet.h index 19e2523d6c9..e00e5cb415f 100644 --- a/src/vnet/devices/af_packet/af_packet.h +++ b/src/vnet/devices/af_packet/af_packet.h @@ -20,6 +20,7 @@ typedef struct { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); + volatile u32 *lockp; u8 *host_if_name; int fd; struct tpacket_req *rx_req; @@ -50,6 +51,12 @@ 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; -- cgit 1.2.3-korg