aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/af_packet.h
diff options
context:
space:
mode:
authorMohsin KAZMI <sykazmi@cisco.com>2017-01-18 11:59:45 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-19 11:00:11 +0000
commitcf751ec70df21affb19c77b2c51e3c231b8202ad (patch)
treee880e3fa0f7147ce609c0c3592596d120c2ab57f /src/vnet/devices/af_packet/af_packet.h
parent07c39da547141f59b37a320cde5616ca652e7cff (diff)
af_packet: multithreading support
This patch adds multithreading support for af_packet interfaces. Change-Id: Ief5d1117e7ffeaa59dbc2831e583d5d8e8d4fa7a Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/af_packet/af_packet.h')
-rw-r--r--src/vnet/devices/af_packet/af_packet.h7
1 files changed, 7 insertions, 0 deletions
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;