pfring: improve profiling

Reset packet profiling after pfring_recv. The packet was taken from
the packet pool before this call. The packet will already have it's
start ticks initialized. To avoid including ticks while pfring_recv
waits for traffic, reset the ticks right after it.
pull/2124/head
Victor Julien 9 years ago
parent c9159892c7
commit 6f7740807d

@ -48,6 +48,7 @@
#include "util-device.h"
#include "util-host-info.h"
#include "runmodes.h"
#include "util-profiling.h"
#ifdef __SC_CUDA_SUPPORT__
@ -355,6 +356,10 @@ TmEcode ReceivePfringLoop(ThreadVars *tv, void *data, void *slot)
}
if (likely(r == 1)) {
/* profiling started before blocking pfring_recv call, so
* reset it here */
PACKET_PROFILING_RESTART(p);
//printf("RecievePfring src %" PRIu32 " sport %" PRIu32 " dst %" PRIu32 " dstport %" PRIu32 "\n",
// hdr.parsed_pkt.ipv4_src,hdr.parsed_pkt.l4_src_port, hdr.parsed_pkt.ipv4_dst,hdr.parsed_pkt.l4_dst_port);

Loading…
Cancel
Save