X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_lpm%2Frte_lpm6.c;h=d515600f1ffe13a5464864c31638d490270adee7;hb=9135705bb81df0b529821a121004c41f176995ff;hp=c46e557e2389ed9ac3edced35c120b0f39798f85;hpb=c381a8d554b70f7108ce7a87e0c7bc15e1c99c02;p=dpdk.git diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c index c46e557e23..d515600f1f 100644 --- a/lib/librte_lpm/rte_lpm6.c +++ b/lib/librte_lpm/rte_lpm6.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "rte_lpm6.h" @@ -854,8 +853,8 @@ simulate_add(struct rte_lpm6 *lpm, const uint8_t *masked_ip, uint8_t depth) * Add a route */ int -rte_lpm6_add(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth, - uint32_t next_hop) +rte_lpm6_add(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth, + uint32_t next_hop) { struct rte_lpm6_tbl_entry *tbl; struct rte_lpm6_tbl_entry *tbl_next = NULL; @@ -913,7 +912,7 @@ rte_lpm6_add(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth, */ static inline int lookup_step(const struct rte_lpm6 *lpm, const struct rte_lpm6_tbl_entry *tbl, - const struct rte_lpm6_tbl_entry **tbl_next, uint8_t *ip, + const struct rte_lpm6_tbl_entry **tbl_next, const uint8_t *ip, uint8_t first_byte, uint32_t *next_hop) { uint32_t tbl8_index, tbl_entry; @@ -943,7 +942,7 @@ lookup_step(const struct rte_lpm6 *lpm, const struct rte_lpm6_tbl_entry *tbl, * Looks up an IP */ int -rte_lpm6_lookup(const struct rte_lpm6 *lpm, uint8_t *ip, +rte_lpm6_lookup(const struct rte_lpm6 *lpm, const uint8_t *ip, uint32_t *next_hop) { const struct rte_lpm6_tbl_entry *tbl;