* [dpdk-dev] [PATCH] pipeline: fix table stats
@ 2021-08-02 4:35 Churchill Khangar
2021-08-02 5:32 ` [dpdk-dev] [PATCH] [v2] " Churchill Khangar
0 siblings, 1 reply; 3+ messages in thread
From: Churchill Khangar @ 2021-08-02 4:35 UTC (permalink / raw)
To: dev
Cc: cristian.dumitrescu, churchill.khangar, yogesh.jangra,
venkata.suresh.kumar.p
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH] [v2] pipeline: fix table stats
2021-08-02 4:35 [dpdk-dev] [PATCH] pipeline: fix table stats Churchill Khangar
@ 2021-08-02 5:32 ` Churchill Khangar
2021-08-04 12:45 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Churchill Khangar @ 2021-08-02 5:32 UTC (permalink / raw)
To: dev
Cc: cristian.dumitrescu, churchill.khangar, yogesh.jangra,
venkata.suresh.kumar.p, stable
This patch fixes the memcpy function call which was incorrect and led
to memory corruption for tables with more that just a few actions.
Fixes: 742b0a57f50e4 ("pipeline: add table statistics to SWX")
Cc: stable@dpdk.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] [v2] pipeline: fix table stats
2021-08-02 5:32 ` [dpdk-dev] [PATCH] [v2] " Churchill Khangar
@ 2021-08-04 12:45 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-08-04 12:45 UTC (permalink / raw)
To: Churchill Khangar
Cc: dev, cristian.dumitrescu, churchill.khangar, yogesh.jangra,
venkata.suresh.kumar.p, stable
02/08/2021 07:32, Churchill Khangar:
> This patch fixes the memcpy function call which was incorrect and led
> to memory corruption for tables with more that just a few actions.
>
> Fixes: 742b0a57f50e4 ("pipeline: add table statistics to SWX")
> Cc: stable@dpdk.org
>
> Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-04 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 4:35 [dpdk-dev] [PATCH] pipeline: fix table stats Churchill Khangar
2021-08-02 5:32 ` [dpdk-dev] [PATCH] [v2] " Churchill Khangar
2021-08-04 12:45 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
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).