Project

General

Profile

Actions

Bug #8251

open

dpdk: (x)stats are only accessible before port stop

Added by Lukas Sismis about 23 hours ago. Updated about 23 hours ago.

Status:
New
Priority:
Normal
Assignee:
Target version:

Description

When trying out BCM957504-P425G (NetXtreme-E Quad-port 25G SFP28 Ethernet PCIe4.0 x16 Adapter) with DPDK, I observed that Suricata errors out:

^CNotice: suricata: Signal Received.  Stopping engine. [SuricataMainLoop:suricata.c:2970]
Error: dpdk: 0000:e1:00.0: failed to get stats: Input/output error [DPDKDumpCounters:source-dpdk.c:290]
Info: suricata: time elapsed 135.877s [SCPrintElapsedTime:suricata.c:1238]
Perf: flow-manager: 0 flows processed [FlowRecycler:flow-manager.c:1187]
BNXT: bnxt_hwrm_ring_stats(): error 4:0:00000000:01d3
Error: dpdk: Error (No space left on device) getting rte_eth_xstats failed on port 0000:e1:00.0 [PrintDPDKPortXstats:source-dpdk.c:729]

The error lies in fetching the stats or xstats after the device is stopped (in ThreadExitPrintStats()). Prior calls pass. As a universal workaround, Suricata could obtain stats just before the device is stopped. This brings a little imprecision as the window between the worker not processing any more packets and actually stopping the device (port) widens to collect the last statistics, both regular and extended.
In real-world deployments, I would consider this a negligible issue.

I think backport to 8 makes sense, backport to 7 can be reconsidered but generally it should be an easy fix.
Backport to 8

The issue can be reproduced by testpmd too:

sudo dpdk-testpmd -a 0000:e1:00.0 -l 2,4 --file-prefix=tpmd -- -i --disable-device-start

> show port xstats 0


Subtasks 2 (2 open0 closed)

Bug #8252: dpdk: (x)stats are only accessible before port stop (8.0.x backport)AssignedLukas SismisActions
Bug #8253: dpdk: (x)stats are only accessible before port stop (7.0.x backport)AssignedLukas SismisActions
Actions #1

Updated by Lukas Sismis about 23 hours ago

  • Target version changed from TBD to 9.0.0-beta1
Actions #2

Updated by OISF Ticketbot about 23 hours ago

  • Subtask #8252 added
Actions #3

Updated by OISF Ticketbot about 23 hours ago

  • Label deleted (Needs backport to 8.0)
Actions #4

Updated by OISF Ticketbot about 23 hours ago

  • Subtask #8253 added
Actions #5

Updated by OISF Ticketbot about 23 hours ago

  • Label deleted (Needs backport to 7.0)
Actions

Also available in: Atom PDF