DPDK  24.11.0-rc3
rte_lpm6.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4 #ifndef _RTE_LPM6_H_
5 #define _RTE_LPM6_H_
6 
12 #include <stdint.h>
13 
14 #include <rte_common.h>
15 #include <rte_ip6.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 
22 #define RTE_LPM6_MAX_DEPTH (RTE_DEPRECATED(RTE_LPM6_MAX_DEPTH) RTE_IPV6_MAX_DEPTH)
23 #define RTE_LPM6_IPV6_ADDR_SIZE (RTE_DEPRECATED(RTE_LPM6_IPV6_ADDR_SIZE) RTE_IPV6_ADDR_SIZE)
24 
25 #define RTE_LPM6_NAMESIZE 32
26 
28 struct rte_lpm6;
29 
32  uint32_t max_rules;
33  uint32_t number_tbl8s;
34  int flags;
35 };
36 
56 struct rte_lpm6 *
57 rte_lpm6_create(const char *name, int socket_id,
58  const struct rte_lpm6_config *config);
59 
70 struct rte_lpm6 *
71 rte_lpm6_find_existing(const char *name);
72 
80 void
81 rte_lpm6_free(struct rte_lpm6 *lpm);
82 
97 int
98 rte_lpm6_add(struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint8_t depth,
99  uint32_t next_hop);
100 
116 int
117 rte_lpm6_is_rule_present(struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint8_t depth,
118  uint32_t *next_hop);
119 
132 int
133 rte_lpm6_delete(struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint8_t depth);
134 
149 int
150 rte_lpm6_delete_bulk_func(struct rte_lpm6 *lpm,
151  struct rte_ipv6_addr *ips, uint8_t *depths, unsigned int n);
152 
159 void
160 rte_lpm6_delete_all(struct rte_lpm6 *lpm);
161 
174 int
175 rte_lpm6_lookup(const struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint32_t *next_hop);
176 
193 int
194 rte_lpm6_lookup_bulk_func(const struct rte_lpm6 *lpm,
195  struct rte_ipv6_addr *ips,
196  int32_t *next_hops, unsigned int n);
197 
198 #ifdef __cplusplus
199 }
200 #endif
201 
202 #endif
uint32_t number_tbl8s
Definition: rte_lpm6.h:33
int rte_lpm6_add(struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint8_t depth, uint32_t next_hop)
int rte_lpm6_is_rule_present(struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint8_t depth, uint32_t *next_hop)
int rte_lpm6_delete(struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint8_t depth)
int rte_lpm6_lookup(const struct rte_lpm6 *lpm, const struct rte_ipv6_addr *ip, uint32_t *next_hop)
int rte_lpm6_delete_bulk_func(struct rte_lpm6 *lpm, struct rte_ipv6_addr *ips, uint8_t *depths, unsigned int n)
struct rte_lpm6 * rte_lpm6_create(const char *name, int socket_id, const struct rte_lpm6_config *config)
int rte_lpm6_lookup_bulk_func(const struct rte_lpm6 *lpm, struct rte_ipv6_addr *ips, int32_t *next_hops, unsigned int n)
struct rte_lpm6 * rte_lpm6_find_existing(const char *name)
void rte_lpm6_delete_all(struct rte_lpm6 *lpm)
void rte_lpm6_free(struct rte_lpm6 *lpm)
uint32_t max_rules
Definition: rte_lpm6.h:32