DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] fib: fix adding a default route
@ 2023-06-30 17:10 Vladimir Medvedkin
  2023-06-30 17:47 ` Stephen Hemminger
  2023-07-03 15:43 ` Vladimir Medvedkin
  0 siblings, 2 replies; 4+ messages in thread
From: Vladimir Medvedkin @ 2023-06-30 17:10 UTC (permalink / raw)
  To: dev; +Cc: stable

Fixed an issue that occurs when
adding a default route as the first route.

Bugzilla ID: 1160
Fixes: 7dc7868b200d ("fib: add DIR24-8 dataplane algorithm")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/fib/dir24_8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index a8ba4f64ca..e77575d62c 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -390,7 +390,7 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
 				(uint32_t)(1ULL << (32 - tmp_depth));
 		} else {
 			redge = ip + (uint32_t)(1ULL << (32 - depth));
-			if (ledge == redge)
+			if ((ledge == redge) && (ledge != 0))
 				break;
 			ret = install_to_fib(dp, ledge, redge,
 				next_hop);
-- 
2.25.1


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

* Re: [PATCH] fib: fix adding a default route
  2023-06-30 17:10 [PATCH] fib: fix adding a default route Vladimir Medvedkin
@ 2023-06-30 17:47 ` Stephen Hemminger
  2023-07-03 15:43 ` Vladimir Medvedkin
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2023-06-30 17:47 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dev, stable

On Fri, 30 Jun 2023 17:10:35 +0000
Vladimir Medvedkin <vladimir.medvedkin@intel.com> wrote:

>  			redge = ip + (uint32_t)(1ULL << (32 - depth));
> -			if (ledge == redge)
> +			if ((ledge == redge) && (ledge != 0))

Extra parenthesis are not necessary here.

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

* [PATCH] fib: fix adding a default route
  2023-06-30 17:10 [PATCH] fib: fix adding a default route Vladimir Medvedkin
  2023-06-30 17:47 ` Stephen Hemminger
@ 2023-07-03 15:43 ` Vladimir Medvedkin
  2023-07-06 14:01   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Vladimir Medvedkin @ 2023-07-03 15:43 UTC (permalink / raw)
  To: dev; +Cc: stephen, stable

Fixed an issue that occurs when
adding a default route as the first route.

Bugzilla ID: 1160
Fixes: 7dc7868b200d ("fib: add DIR24-8 dataplane algorithm")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---

v2:
 - remove unnecessary parenthesis

---
 lib/fib/dir24_8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index a8ba4f64ca..3efdcb533c 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -390,7 +390,7 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
 				(uint32_t)(1ULL << (32 - tmp_depth));
 		} else {
 			redge = ip + (uint32_t)(1ULL << (32 - depth));
-			if (ledge == redge)
+			if (ledge == redge && ledge != 0)
 				break;
 			ret = install_to_fib(dp, ledge, redge,
 				next_hop);
-- 
2.25.1


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

* Re: [PATCH] fib: fix adding a default route
  2023-07-03 15:43 ` Vladimir Medvedkin
@ 2023-07-06 14:01   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2023-07-06 14:01 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dev, stephen, stable

03/07/2023 17:43, Vladimir Medvedkin:
> Fixed an issue that occurs when
> adding a default route as the first route.
> 
> Bugzilla ID: 1160
> Fixes: 7dc7868b200d ("fib: add DIR24-8 dataplane algorithm")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

Applied, thanks.




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

end of thread, other threads:[~2023-07-06 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-30 17:10 [PATCH] fib: fix adding a default route Vladimir Medvedkin
2023-06-30 17:47 ` Stephen Hemminger
2023-07-03 15:43 ` Vladimir Medvedkin
2023-07-06 14:01   ` 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).