DPDK 25.03.0-rc0
rte_fib6.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Vladimir Medvedkin <medvedkinv@gmail.com>
3 * Copyright(c) 2019 Intel Corporation
4 */
5
6#ifndef _RTE_FIB6_H_
7#define _RTE_FIB6_H_
8
18#include <stdint.h>
19
20#include <rte_common.h>
21#include <rte_ip6.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#define RTE_FIB6_IPV6_ADDR_SIZE (RTE_DEPRECATED(RTE_FIB6_IPV6_ADDR_SIZE) RTE_IPV6_ADDR_SIZE)
29#define RTE_FIB6_MAXDEPTH (RTE_DEPRECATED(RTE_FIB6_MAXDEPTH) RTE_IPV6_MAX_DEPTH)
30
31struct rte_fib6;
32struct rte_rib6;
33
38};
39
41typedef int (*rte_fib6_modify_fn_t)(struct rte_fib6 *fib,
42 const struct rte_ipv6_addr *ip, uint8_t depth,
43 uint64_t next_hop, int op);
45typedef void (*rte_fib6_lookup_fn_t)(void *fib,
46 const struct rte_ipv6_addr *ips,
47 uint64_t *next_hops, const unsigned int n);
48
49enum rte_fib6_op {
50 RTE_FIB6_ADD,
51 RTE_FIB6_DEL,
52};
53
56 RTE_FIB6_TRIE_2B = 1,
57 RTE_FIB6_TRIE_4B,
58 RTE_FIB6_TRIE_8B
59};
60
67};
68
73 uint64_t default_nh;
74 int max_routes;
76 unsigned int rib_ext_sz;
77 union {
78 struct {
79 enum rte_fib_trie_nh_sz nh_sz;
80 uint32_t num_tbl8;
81 } trie;
82 };
83};
84
98struct rte_fib6 *
99rte_fib6_create(const char *name, int socket_id, struct rte_fib6_conf *conf);
100
111struct rte_fib6 *
112rte_fib6_find_existing(const char *name);
113
121void
122rte_fib6_free(struct rte_fib6 *fib);
123
138int
139rte_fib6_add(struct rte_fib6 *fib, const struct rte_ipv6_addr *ip,
140 uint8_t depth, uint64_t next_hop);
141
154int
155rte_fib6_delete(struct rte_fib6 *fib,
156 const struct rte_ipv6_addr *ip, uint8_t depth);
157
175int
176rte_fib6_lookup_bulk(struct rte_fib6 *fib,
177 const struct rte_ipv6_addr *ips,
178 uint64_t *next_hops, int n);
179
189void *
190rte_fib6_get_dp(struct rte_fib6 *fib);
191
201struct rte_rib6 *
202rte_fib6_get_rib(struct rte_fib6 *fib);
203
216int
217rte_fib6_select_lookup(struct rte_fib6 *fib, enum rte_fib6_lookup_type type);
218
219#ifdef __cplusplus
220}
221#endif
222
223#endif /* _RTE_FIB6_H_ */
rte_fib6_lookup_type
Definition: rte_fib6.h:62
@ RTE_FIB6_LOOKUP_TRIE_VECTOR_AVX512
Definition: rte_fib6.h:66
@ RTE_FIB6_LOOKUP_DEFAULT
Definition: rte_fib6.h:63
@ RTE_FIB6_LOOKUP_TRIE_SCALAR
Definition: rte_fib6.h:65
int rte_fib6_lookup_bulk(struct rte_fib6 *fib, const struct rte_ipv6_addr *ips, uint64_t *next_hops, int n)
struct rte_rib6 * rte_fib6_get_rib(struct rte_fib6 *fib)
rte_fib6_type
Definition: rte_fib6.h:35
@ RTE_FIB6_TRIE
Definition: rte_fib6.h:37
@ RTE_FIB6_DUMMY
Definition: rte_fib6.h:36
int rte_fib6_delete(struct rte_fib6 *fib, const struct rte_ipv6_addr *ip, uint8_t depth)
void * rte_fib6_get_dp(struct rte_fib6 *fib)
int rte_fib6_select_lookup(struct rte_fib6 *fib, enum rte_fib6_lookup_type type)
rte_fib_trie_nh_sz
Definition: rte_fib6.h:55
void rte_fib6_free(struct rte_fib6 *fib)
int rte_fib6_add(struct rte_fib6 *fib, const struct rte_ipv6_addr *ip, uint8_t depth, uint64_t next_hop)
struct rte_fib6 * rte_fib6_create(const char *name, int socket_id, struct rte_fib6_conf *conf)
int(* rte_fib6_modify_fn_t)(struct rte_fib6 *fib, const struct rte_ipv6_addr *ip, uint8_t depth, uint64_t next_hop, int op)
Definition: rte_fib6.h:41
struct rte_fib6 * rte_fib6_find_existing(const char *name)
void(* rte_fib6_lookup_fn_t)(void *fib, const struct rte_ipv6_addr *ips, uint64_t *next_hops, const unsigned int n)
Definition: rte_fib6.h:45
enum rte_fib6_type type
Definition: rte_fib6.h:71
uint64_t default_nh
Definition: rte_fib6.h:73
unsigned int rib_ext_sz
Definition: rte_fib6.h:76