patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] [v2] pipeline: fix table stats
       [not found] <1627878914-246973-1-git-send-email-churchill.khangar@intel.com>
@ 2021-08-02  5:32 ` Churchill Khangar
  2021-08-04 12:45   ` Thomas Monjalon
  0 siblings, 1 reply; 2+ 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] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] [v2] pipeline: fix table stats
  2021-08-02  5:32 ` [dpdk-stable] [PATCH] [v2] pipeline: fix table stats Churchill Khangar
@ 2021-08-04 12:45   ` Thomas Monjalon
  0 siblings, 0 replies; 2+ 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] 2+ messages in thread

end of thread, other threads:[~2021-08-04 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1627878914-246973-1-git-send-email-churchill.khangar@intel.com>
2021-08-02  5:32 ` [dpdk-stable] [PATCH] [v2] pipeline: fix table stats Churchill Khangar
2021-08-04 12:45   ` 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).