DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] lpm: fix tlb8 only not freed for depth=24
@ 2016-08-01  7:03 Wei Dai
  2016-08-02 15:49 ` Bruce Richardson
  2016-08-03  7:02 ` [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete Wei Dai
  0 siblings, 2 replies; 6+ messages in thread
From: Wei Dai @ 2016-08-01  7:03 UTC (permalink / raw)
  To: dev; +Cc: Wei Dai

When all rules with depth > 24 are deleted in a same tlb8 group
and only leave a rule with depth <= 24 in this group, the tlb8
group should be recycled.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 lib/librte_lpm/rte_lpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 6f65d1c..24fec4b 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -1533,7 +1533,7 @@ tbl8_recycle_check_v20(struct rte_lpm_tbl_entry_v20 *tbl8,
 		 * and if so check the rest of the entries to verify that they
 		 * are all of this depth.
 		 */
-		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
+		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
 			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
 					i++) {
 
@@ -1580,7 +1580,7 @@ tbl8_recycle_check_v1604(struct rte_lpm_tbl_entry *tbl8,
 		 * and if so check the rest of the entries to verify that they
 		 * are all of this depth.
 		 */
-		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
+		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
 			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
 					i++) {
 
-- 
2.5.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] lpm: fix tlb8 only not freed for depth=24
  2016-08-01  7:03 [dpdk-dev] [PATCH 1/2] lpm: fix tlb8 only not freed for depth=24 Wei Dai
@ 2016-08-02 15:49 ` Bruce Richardson
  2016-08-03  7:02 ` [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete Wei Dai
  1 sibling, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2016-08-02 15:49 UTC (permalink / raw)
  To: Wei Dai; +Cc: dev

On Mon, Aug 01, 2016 at 03:03:20PM +0800, Wei Dai wrote:
> When all rules with depth > 24 are deleted in a same tlb8 group
> and only leave a rule with depth <= 24 in this group, the tlb8
> group should be recycled.
> 

The title needs a bit of rewording, I think e.g. 
lpm: fix freeing unused sub-table on rule delete

Otherwise:
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete
  2016-08-01  7:03 [dpdk-dev] [PATCH 1/2] lpm: fix tlb8 only not freed for depth=24 Wei Dai
  2016-08-02 15:49 ` Bruce Richardson
@ 2016-08-03  7:02 ` Wei Dai
  2016-08-03  7:13   ` Dai, Wei
  2016-08-08  6:39   ` [dpdk-dev] [PATCH v4 " Wei Dai
  1 sibling, 2 replies; 6+ messages in thread
From: Wei Dai @ 2016-08-03  7:02 UTC (permalink / raw)
  To: dev; +Cc: Wei Dai

When all rules with depth > 24 are deleted in a same sub-table
(tlb8 group) and only a rule with depth <=24 is left in it,
this sub-table (tlb8 group) should be recycled.

Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 lib/librte_lpm/rte_lpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 6f65d1c..24fec4b 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -1533,7 +1533,7 @@ tbl8_recycle_check_v20(struct rte_lpm_tbl_entry_v20 *tbl8,
 		 * and if so check the rest of the entries to verify that they
 		 * are all of this depth.
 		 */
-		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
+		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
 			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
 					i++) {
 
@@ -1580,7 +1580,7 @@ tbl8_recycle_check_v1604(struct rte_lpm_tbl_entry *tbl8,
 		 * and if so check the rest of the entries to verify that they
 		 * are all of this depth.
 		 */
-		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
+		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
 			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
 					i++) {
 
-- 
2.5.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete
  2016-08-03  7:02 ` [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete Wei Dai
@ 2016-08-03  7:13   ` Dai, Wei
  2016-08-03  8:58     ` Ferruh Yigit
  2016-08-08  6:39   ` [dpdk-dev] [PATCH v4 " Wei Dai
  1 sibling, 1 reply; 6+ messages in thread
From: Dai, Wei @ 2016-08-03  7:13 UTC (permalink / raw)
  To: dev, Richardson, Bruce

This patch is same as patch 15063 which has been acked by Bruce Richardson.
Only title and message body of git log has been revised according to Bruce's
advice.

> -----Original Message-----
> From: Dai, Wei
> Sent: Wednesday, August 3, 2016 3:02 PM
> To: dev@dpdk.org
> Cc: Dai, Wei <wei.dai@intel.com>
> Subject: [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete
> 
> When all rules with depth > 24 are deleted in a same sub-table
> (tlb8 group) and only a rule with depth <=24 is left in it, this sub-table (tlb8
> group) should be recycled.
> 
> Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
> Fixes: af75078fece3 ("first public release")
> 
> Signed-off-by: Wei Dai <wei.dai@intel.com>
> ---
>  lib/librte_lpm/rte_lpm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index
> 6f65d1c..24fec4b 100644
> --- a/lib/librte_lpm/rte_lpm.c
> +++ b/lib/librte_lpm/rte_lpm.c
> @@ -1533,7 +1533,7 @@ tbl8_recycle_check_v20(struct
> rte_lpm_tbl_entry_v20 *tbl8,
>  		 * and if so check the rest of the entries to verify that they
>  		 * are all of this depth.
>  		 */
> -		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
> +		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
>  			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
>  					i++) {
> 
> @@ -1580,7 +1580,7 @@ tbl8_recycle_check_v1604(struct rte_lpm_tbl_entry
> *tbl8,
>  		 * and if so check the rest of the entries to verify that they
>  		 * are all of this depth.
>  		 */
> -		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
> +		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
>  			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
>  					i++) {
> 
> --
> 2.5.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete
  2016-08-03  7:13   ` Dai, Wei
@ 2016-08-03  8:58     ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2016-08-03  8:58 UTC (permalink / raw)
  To: Dai, Wei, dev, Richardson, Bruce

On 8/3/2016 8:13 AM, Dai, Wei wrote:
> This patch is same as patch 15063 which has been acked by Bruce Richardson.
> Only title and message body of git log has been revised according to Bruce's
> advice.

For future, you can carry Ac with new version of the patch for these
kind of cases.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v4 1/3] lpm: fix freeing unused sub-table on rule delete
  2016-08-03  7:02 ` [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete Wei Dai
  2016-08-03  7:13   ` Dai, Wei
@ 2016-08-08  6:39   ` Wei Dai
  1 sibling, 0 replies; 6+ messages in thread
From: Wei Dai @ 2016-08-08  6:39 UTC (permalink / raw)
  To: dev; +Cc: Wei Dai

When all rules with depth > 24 are deleted in a same sub-table
(tlb8 group) and only a rule with depth <=24 is left in it,
this sub-table (tlb8 group) should be recycled.

Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_lpm/rte_lpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 6f65d1c..24fec4b 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -1533,7 +1533,7 @@ tbl8_recycle_check_v20(struct rte_lpm_tbl_entry_v20 *tbl8,
 		 * and if so check the rest of the entries to verify that they
 		 * are all of this depth.
 		 */
-		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
+		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
 			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
 					i++) {
 
@@ -1580,7 +1580,7 @@ tbl8_recycle_check_v1604(struct rte_lpm_tbl_entry *tbl8,
 		 * and if so check the rest of the entries to verify that they
 		 * are all of this depth.
 		 */
-		if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) {
+		if (tbl8[tbl8_group_start].depth <= MAX_DEPTH_TBL24) {
 			for (i = (tbl8_group_start + 1); i < tbl8_group_end;
 					i++) {
 
-- 
2.5.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-08  6:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-01  7:03 [dpdk-dev] [PATCH 1/2] lpm: fix tlb8 only not freed for depth=24 Wei Dai
2016-08-02 15:49 ` Bruce Richardson
2016-08-03  7:02 ` [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete Wei Dai
2016-08-03  7:13   ` Dai, Wei
2016-08-03  8:58     ` Ferruh Yigit
2016-08-08  6:39   ` [dpdk-dev] [PATCH v4 " Wei Dai

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).