From: Stephen Hemminger <stephen@networkplumber.org>
To: Harsh raj Singh <singhharshraj215@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] examples/l2fwd: fix port statistics reset inside loop
Date: Fri, 1 May 2026 15:57:03 -0700 [thread overview]
Message-ID: <20260501155703.4614956a@phoenix.local> (raw)
In-Reply-To: <CAN33txFohZzwnKJ2uTDyMuQ9fWpMvJQ=6BCr-TURU19RV9EY8Q@mail.gmail.com>
On Tue, 31 Mar 2026 10:15:32 +0530
Harsh raj Singh <singhharshraj215@gmail.com> wrote:
> Hi,
>
> Please find attached my patch for fix port statistics reset inside
> loop in l2fwd example
>
> Thanks,
> Harsh Raj Singh
What is the problem here. That loop only happens during initialization.
The memset() is redundant and not needed but that is a different reason
to remove it. In current code the port_statistics will start out at all zeros.
If you want, the right fix is to pull the memset entirely.
While your at it look for the same pattern in other variants of l2fwd and l3fwd.
There is a lot of copy/paste here.
next prev parent reply other threads:[~2026-05-01 22:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 4:45 [PATCH] examples/l2fwd: fix port statistics reset inside loop Harsh raj Singh
2026-05-01 22:57 ` Stephen Hemminger [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-24 4:23 Harsh raj Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260501155703.4614956a@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=singhharshraj215@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox