Project

General

Profile

Actions

Bug #6009

closed

dpdk: incorrect final stats

Added by Lukas Sismis over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

In more performant deployments (on live networks) where Suricata has more cores/allocated bigger chunks of memory, it takes some time between getting out of the loop and getting into deinit phase of the DPDK module. During this, the NIC is still enabled and the NIC account the undelivered packets as missed (dropped). As a result, the final stats that are e.g. printed in ExitStats function are not valid and they propose worse result than what Suricata actually reached. (e.g. not dropping packets at all when running and during the deinit phase it can increase to 10% of dropped packets)

I can see two solutions:
- do not rely on the device stats after jumping out of the Loop function
- stop the device immediately as the loop is discontinued

Actions #1

Updated by Victor Julien over 1 year ago

I think this is a generic issue that also affects other capture methods potentially. It can also happen during init. IIRC af-packet has some special logic for the init side.

Actions #2

Updated by Lukas Sismis over 1 year ago

Does it make sense to "fix" it (at least on the DPDK side)?
I can imagine I would be able to fix it but that would possibly change the logic a bit by moving starting/shutting process of the init/deinit stage to the loop directly to minimize the gap between the start/shutdown of the device and actual reading.

Actions #3

Updated by Victor Julien over 1 year ago

  • Priority changed from Normal to Low
Actions #4

Updated by Juliana Fajardini Reichow over 1 year ago

  • Status changed from New to Assigned
Actions #5

Updated by Juliana Fajardini Reichow over 1 year ago

  • Target version changed from 7.0.0-rc2 to 7.0.0
Actions #6

Updated by Victor Julien over 1 year ago

  • Target version changed from 7.0.0 to 7.0.1
Actions #7

Updated by Victor Julien over 1 year ago

  • Priority changed from Low to Normal
Actions #8

Updated by Victor Julien about 1 year ago

  • Target version changed from 7.0.1 to 7.0.2
Actions #10

Updated by Lukas Sismis about 1 year ago

  • Status changed from Assigned to In Progress
Actions #11

Updated by Lukas Sismis about 1 year ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF