>From e3ebfc026f7871d3014a0b9f8881579623b6592b Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Sat, 27 Jun 2015 22:55:20 +0000 Subject: [PATCH 5/8] librte_table: use uint32_t for next hops from librte_lpm Signed-off-by: Matthew Hall --- lib/librte_table/rte_table_lpm.c | 6 +++--- lib/librte_table/rte_table_lpm_ipv6.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/librte_table/rte_table_lpm.c b/lib/librte_table/rte_table_lpm.c index 849d899..2af2eee 100644 --- a/lib/librte_table/rte_table_lpm.c +++ b/lib/librte_table/rte_table_lpm.c @@ -202,7 +202,7 @@ rte_table_lpm_entry_add( struct rte_table_lpm_key *ip_prefix = (struct rte_table_lpm_key *) key; uint32_t nht_pos, nht_pos0_valid; int status; - uint8_t nht_pos0 = 0; + uint32_t nht_pos0 = 0; /* Check input parameters */ if (lpm == NULL) { @@ -268,7 +268,7 @@ rte_table_lpm_entry_delete( { struct rte_table_lpm *lpm = (struct rte_table_lpm *) table; struct rte_table_lpm_key *ip_prefix = (struct rte_table_lpm_key *) key; - uint8_t nht_pos; + uint32_t nht_pos; int status; /* Check input parameters */ @@ -342,7 +342,7 @@ rte_table_lpm_lookup( uint32_t ip = rte_bswap32( RTE_MBUF_METADATA_UINT32(pkt, lpm->offset)); int status; - uint8_t nht_pos; + uint32_t nht_pos; status = rte_lpm_lookup(lpm->lpm, ip, &nht_pos); if (status == 0) { diff --git a/lib/librte_table/rte_table_lpm_ipv6.c b/lib/librte_table/rte_table_lpm_ipv6.c index e9bc6a7..81a948e 100644 --- a/lib/librte_table/rte_table_lpm_ipv6.c +++ b/lib/librte_table/rte_table_lpm_ipv6.c @@ -213,7 +213,7 @@ rte_table_lpm_ipv6_entry_add( (struct rte_table_lpm_ipv6_key *) key; uint32_t nht_pos, nht_pos0_valid; int status; - uint8_t nht_pos0; + uint32_t nht_pos0; /* Check input parameters */ if (lpm == NULL) { @@ -280,7 +280,7 @@ rte_table_lpm_ipv6_entry_delete( struct rte_table_lpm_ipv6 *lpm = (struct rte_table_lpm_ipv6 *) table; struct rte_table_lpm_ipv6_key *ip_prefix = (struct rte_table_lpm_ipv6_key *) key; - uint8_t nht_pos; + uint32_t nht_pos; int status; /* Check input parameters */ @@ -356,7 +356,7 @@ rte_table_lpm_ipv6_lookup( uint8_t *ip = RTE_MBUF_METADATA_UINT8_PTR(pkt, lpm->offset); int status; - uint8_t nht_pos; + uint32_t nht_pos; status = rte_lpm6_lookup(lpm->lpm, ip, &nht_pos); if (status == 0) { -- 1.9.1