From: Churchill Khangar <churchill.khangar@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com, churchill.khangar@intel.com,
yogesh.jangra@intel.com, venkata.suresh.kumar.p@intel.com
Subject: [dpdk-dev] [PATCH] pipeline: fix table stats
Date: Mon, 2 Aug 2021 10:05:14 +0530 [thread overview]
Message-ID: <1627878914-246973-1-git-send-email-churchill.khangar@intel.com> (raw)
This patch fixes syntax of memcpy function to copy arrays which was
wrong typically leading to memory corruption for more than a few
actions involved.
Fixes: 742b0a57f50e4 ("pipeline: add table statistics to SWX")
Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/pipeline/rte_swx_pipeline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 84505e2..8eb978a 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -10940,8 +10940,8 @@ struct meter_profile meter_profile_default = {
table_stats = &p->table_stats[table->id];
- memcpy(&stats->n_pkts_action,
- &table_stats->n_pkts_action,
+ memcpy(stats->n_pkts_action,
+ table_stats->n_pkts_action,
p->n_actions * sizeof(uint64_t));
stats->n_pkts_hit = table_stats->n_pkts_hit[1];
--
1.8.3.1
next reply other threads:[~2021-08-02 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 4:35 Churchill Khangar [this message]
2021-08-02 5:32 ` [dpdk-dev] [PATCH] [v2] " Churchill Khangar
2021-08-04 12:45 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
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=1627878914-246973-1-git-send-email-churchill.khangar@intel.com \
--to=churchill.khangar@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=venkata.suresh.kumar.p@intel.com \
--cc=yogesh.jangra@intel.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;
as well as URLs for NNTP newsgroup(s).