@ -90,6 +90,7 @@ TmEcode NoDPDKSupportExit(ThreadVars *tv, const void *initdata, void **data)
# include <numa.h>
# define BURST_SIZE 32
static struct timeval machine_start_time = { 0 , 0 } ;
/**
* \ brief Structure to hold thread specific variables .
@ -122,7 +123,6 @@ typedef struct DPDKThreadVars_ {
uint16_t queue_id ;
struct rte_mempool * pkt_mempool ;
struct rte_mbuf * received_mbufs [ BURST_SIZE ] ;
struct timeval machine_start_time ;
} DPDKThreadVars ;
static TmEcode ReceiveDPDKThreadInit ( ThreadVars * , const void * , void * * ) ;
@ -166,10 +166,10 @@ static void CyclesAddToTimeval(
new_tv - > tv_usec = ( usec % 1000000 ) ;
}
static void DPDKSetTimevalOfMachineStart ( struct timeval * tv )
void DPDKSetTimevalOfMachineStart ( void )
{
gettimeofday ( tv , NULL ) ;
tv- > tv_sec - = DPDKGetSeconds ( ) ;
gettimeofday ( & machine_start_time , NULL ) ;
machine_start_time. tv_sec - = DPDKGetSeconds ( ) ;
}
/**
@ -374,7 +374,7 @@ static TmEcode ReceiveDPDKLoop(ThreadVars *tv, void *data, void *slot)
p - > flags | = PKT_IGNORE_CHECKSUM ;
}
DPDKSetTimevalReal ( & ptv- > machine_start_time, & p - > ts ) ;
DPDKSetTimevalReal ( & machine_start_time, & p - > ts ) ;
p - > dpdk_v . mbuf = ptv - > received_mbufs [ i ] ;
p - > ReleasePacket = DPDKReleasePacket ;
p - > dpdk_v . copy_mode = ptv - > copy_mode ;
@ -432,7 +432,6 @@ static TmEcode ReceiveDPDKThreadInit(ThreadVars *tv, const void *initdata, void
ptv - > pkts = 0 ;
ptv - > bytes = 0 ;
ptv - > livedev = LiveGetDevice ( dpdk_config - > iface ) ;
DPDKSetTimevalOfMachineStart ( & ptv - > machine_start_time ) ;
ptv - > capture_dpdk_packets = StatsRegisterCounter ( " capture.packets " , ptv - > tv ) ;
ptv - > capture_dpdk_rx_errs = StatsRegisterCounter ( " capture.rx_errors " , ptv - > tv ) ;