patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ruifeng Wang <ruifeng.wang@arm.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Ray Kinsella <mdr@ashroe.eu>
Cc: dev@dpdk.org, nd@arm.com, stable@dpdk.org,
	Phil Yang <phil.yang@arm.com>,
	Kevin Traynor <ktraynor@redhat.com>
Subject: [dpdk-stable] [PATCH v2 1/2] lpm: fix free of data structure
Date: Wed, 21 Oct 2020 11:02:10 +0800	[thread overview]
Message-ID: <20201021030211.36381-2-ruifeng.wang@arm.com> (raw)
In-Reply-To: <20201021030211.36381-1-ruifeng.wang@arm.com>

The container structure should be freed instead of rte_lpm structure
after wrapping rte_lpm into internal structure __rte_lpm.

Fixes: 8a9f8564e9f9 ("lpm: implement RCU rule reclamation")
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/librte_lpm/rte_lpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 757436f49..51a0ae578 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -268,7 +268,7 @@ rte_lpm_free(struct rte_lpm *lpm)
 		rte_rcu_qsbr_dq_delete(internal_lpm->dq);
 	rte_free(lpm->tbl8);
 	rte_free(lpm->rules_tbl);
-	rte_free(lpm);
+	rte_free(internal_lpm);
 	rte_free(te);
 }
 
-- 
2.20.1


      parent reply	other threads:[~2020-10-21  3:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200907081518.46350-1-ruifeng.wang@arm.com>
2020-09-07  8:15 ` [dpdk-stable] [PATCH " Ruifeng Wang
2020-09-15 15:55   ` Bruce Richardson
2020-09-15 16:25   ` Medvedkin, Vladimir
     [not found] ` <20201021030211.36381-1-ruifeng.wang@arm.com>
2020-10-21  3:02   ` Ruifeng Wang [this message]

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=20201021030211.36381-2-ruifeng.wang@arm.com \
    --to=ruifeng.wang@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=ktraynor@redhat.com \
    --cc=mdr@ashroe.eu \
    --cc=nd@arm.com \
    --cc=phil.yang@arm.com \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@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).