DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK/other Bug 1604] Issues with packet capture counting in dpdk-dumpcap
@ 2024-12-17  8:06 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2024-12-17  8:06 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1604

            Bug ID: 1604
           Summary: Issues with packet capture counting in dpdk-dumpcap
           Product: DPDK
           Version: 23.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: other
          Assignee: dev@dpdk.org
          Reporter: junwang01@cestc.cn
  Target Milestone: ---

Is the final count returned during packet capture with DPDK Dumpcap a
cumulative value, and could there be any issues with it?

[root@dpdk04 /]# /dpdk/app/dpdk-dumpcap -i 0000:1b:00.0
File: /tmp/dpdk-dumpcap_0_0000:1b:00.0_20241217074027.pcapng
Capturing on '0000:1b:00.0'
Packets captured: 20 ^C
Packets received/dropped on interface '0000:1b:00.0': 20/0 (100.0)

[root@dpdk04 /]# /dpdk/app/dpdk-dumpcap -i 0000:1b:00.0
File: /tmp/dpdk-dumpcap_0_0000:1b:00.0_20241217074045.pcapng
Capturing on '0000:1b:00.0'
Packets captured: 13 ^C
Packets received/dropped on interface '0000:1b:00.0': 33/0 (100.0)

[root@dpdk04 /]# /dpdk/app/dpdk-dumpcap -i 0000:1b:00.0
File: /tmp/dpdk-dumpcap_0_0000:1b:00.0_20241217074055.pcapng
Capturing on '0000:1b:00.0'
Packets captured: 40 ^C
Packets received/dropped on interface '0000:1b:00.0': 73/0 (100.0)

I noticed that the final statistics of dpdk-dumpcap for packet capture show
that received is a cumulative value. Wouldn't it be more appropriate to have
the correct value for each execution instead? After analyzing the code, I
confirmed that this cumulative design applies to both received and dropped
statistics.

static void
pdump_sum_stats(uint16_t port, uint16_t nq,
                struct rte_pdump_stats
stats[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT],
                struct rte_pdump_stats *total)
{
        uint64_t *sum = (uint64_t *)total;
        unsigned int i;
        uint64_t val;
        uint16_t qid;

        for (qid = 0; qid < nq; qid++) {
                const RTE_ATOMIC(uint64_t) *perq = (const uint64_t __rte_atomic
*)&stats[port][qid];

                for (i = 0; i < sizeof(*total) / sizeof(uint64_t); i++) {
                        val = rte_atomic_load_explicit(&perq[i],
rte_memory_order_relaxed);
                        sum[i] += val;
                }
        }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 4335 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-17  8:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-17  8:06 [DPDK/other Bug 1604] Issues with packet capture counting in dpdk-dumpcap bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).