|
|
|
@ -198,10 +198,8 @@ static inline void PfringDumpCounters(PfringThreadVars *ptv)
|
|
|
|
|
* So to get the number of packet on the interface we can add
|
|
|
|
|
* the newly seen packets and drops for this thread and add it
|
|
|
|
|
* to the interface counter */
|
|
|
|
|
uint64_t th_pkts = SCPerfGetLocalCounterValue(ptv->capture_kernel_packets,
|
|
|
|
|
ptv->tv->perf_private_ctx);
|
|
|
|
|
uint64_t th_drops = SCPerfGetLocalCounterValue(ptv->capture_kernel_drops,
|
|
|
|
|
ptv->tv->perf_private_ctx);
|
|
|
|
|
uint64_t th_pkts = SCPerfGetLocalCounterValue(ptv->tv, ptv->capture_kernel_packets);
|
|
|
|
|
uint64_t th_drops = SCPerfGetLocalCounterValue(ptv->tv, ptv->capture_kernel_drops);
|
|
|
|
|
SC_ATOMIC_ADD(ptv->livedev->pkts, pfring_s.recv - th_pkts);
|
|
|
|
|
SC_ATOMIC_ADD(ptv->livedev->drop, pfring_s.drop - th_drops);
|
|
|
|
|
SCPerfCounterSetUI64(ptv->tv, ptv->capture_kernel_packets, pfring_s.recv);
|
|
|
|
@ -554,8 +552,8 @@ void ReceivePfringThreadExitStats(ThreadVars *tv, void *data)
|
|
|
|
|
PfringDumpCounters(ptv);
|
|
|
|
|
SCLogInfo("(%s) Kernel: Packets %" PRIu64 ", dropped %" PRIu64 "",
|
|
|
|
|
tv->name,
|
|
|
|
|
(uint64_t) SCPerfGetLocalCounterValue(ptv->capture_kernel_packets, tv->perf_private_ctx),
|
|
|
|
|
(uint64_t) SCPerfGetLocalCounterValue(ptv->capture_kernel_drops, tv->perf_private_ctx));
|
|
|
|
|
SCPerfGetLocalCounterValue(tv, ptv->capture_kernel_packets),
|
|
|
|
|
SCPerfGetLocalCounterValue(tv, ptv->capture_kernel_drops));
|
|
|
|
|
SCLogInfo("(%s) Packets %" PRIu64 ", bytes %" PRIu64 "", tv->name, ptv->pkts, ptv->bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|