DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lpm: fix index of tbl8
@ 2017-06-19  4:14 Wei Dai
  2017-06-19 11:25 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Dai @ 2017-06-19  4:14 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev, jianwei.ma, Wei Dai, stable

>From v20 to v1604, number of tlb8 can be up to 1<<24,
(uint8_t) or (uint16_t) may truncate the number of
index of tlb8 in v1604 and cause wrong number.

Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Cc: stable@dpdk.org

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 8c15c4c..978ac60 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -1034,7 +1034,7 @@ add_depth_big_v1604(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth,
 		 */
 
 		struct rte_lpm_tbl_entry new_tbl24_entry = {
-			.group_idx = (uint8_t)tbl8_group_index,
+			.group_idx = tbl8_group_index,
 			.valid = VALID,
 			.valid_group = 1,
 			.depth = 0,
@@ -1080,7 +1080,7 @@ add_depth_big_v1604(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth,
 		 */
 
 		struct rte_lpm_tbl_entry new_tbl24_entry = {
-				.group_idx = (uint8_t)tbl8_group_index,
+				.group_idx = tbl8_group_index,
 				.valid = VALID,
 				.valid_group = 1,
 				.depth = 0,
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] lpm: fix index of tbl8
  2017-06-19  4:14 [dpdk-dev] [PATCH] lpm: fix index of tbl8 Wei Dai
@ 2017-06-19 11:25 ` Bruce Richardson
  2017-06-19 21:26   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2017-06-19 11:25 UTC (permalink / raw)
  To: Wei Dai; +Cc: dev, jianwei.ma, stable

On Mon, Jun 19, 2017 at 12:14:38PM +0800, Wei Dai wrote:
> From v20 to v1604, number of tlb8 can be up to 1<<24,
> (uint8_t) or (uint16_t) may truncate the number of
> index of tlb8 in v1604 and cause wrong number.
> 
> Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wei Dai <wei.dai@intel.com>

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

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

* Re: [dpdk-dev] [PATCH] lpm: fix index of tbl8
  2017-06-19 11:25 ` Bruce Richardson
@ 2017-06-19 21:26   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-06-19 21:26 UTC (permalink / raw)
  To: Wei Dai; +Cc: dev, Bruce Richardson, jianwei.ma, stable

19/06/2017 13:25, Bruce Richardson:
> On Mon, Jun 19, 2017 at 12:14:38PM +0800, Wei Dai wrote:
> > From v20 to v1604, number of tlb8 can be up to 1<<24,
> > (uint8_t) or (uint16_t) may truncate the number of
> > index of tlb8 in v1604 and cause wrong number.
> > 
> > Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Wei Dai <wei.dai@intel.com>
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks

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

end of thread, other threads:[~2017-06-19 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-19  4:14 [dpdk-dev] [PATCH] lpm: fix index of tbl8 Wei Dai
2017-06-19 11:25 ` Bruce Richardson
2017-06-19 21:26   ` 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).