|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
36 #include <bier/bier.api_enum.h>
37 #include <bier/bier.api_types.h>
39 #define REPLY_MSG_ID_BASE bier_main.msg_id_base
52 vl_api_bier_table_add_del_reply_t *rmp;
61 rv = VNET_API_ERROR_BIER_BSL_UNSUP;
67 .bti_sub_domain = mp->
bt_tbl_id.bt_sub_domain,
68 .bti_hdr_len = mp->
bt_tbl_id.bt_hdr_len_id,
145 vl_api_bier_route_add_del_reply_t *rmp;
159 rv = VNET_API_ERROR_BIER_BSL_UNSUP;
170 .bti_sub_domain = mp->
br_route.br_tbl_id.bt_sub_domain,
171 .bti_hdr_len = mp->
br_route.br_tbl_id.bt_hdr_len_id,
180 brpath = &brpaths[ii];
233 vl_api_fib_path_t *fp;
237 m_size =
sizeof(*mp) + (
n_paths *
sizeof(vl_api_fib_path_t));
279 .bti_sub_domain = mp->
br_tbl_id.bt_sub_domain,
280 .bti_hdr_len = mp->
br_tbl_id.bt_hdr_len_id,
308 rv = VNET_API_ERROR_BIER_BSL_UNSUP;
314 .bti_sub_domain = mp->
bi_tbl_id.bt_sub_domain,
315 .bti_hdr_len = mp->
bi_tbl_id.bt_hdr_len_id,
336 vl_api_bier_imp_del_reply_t *rmp;
399 vl_api_bier_disp_table_add_del_reply_t *rmp;
419 REPLY_MACRO (VL_API_BIER_DISP_TABLE_ADD_DEL_REPLY);
461 vl_api_bier_disp_entry_add_del_reply_t *rmp;
488 brp->frp_sw_if_index = ntohl(mp->
bde_paths[ii].sw_if_index);
490 if (~0 != ntohl(mp->
bde_paths[ii].rpf_id))
493 brp->frp_rpf_id = ntohl(mp->
bde_paths[ii].rpf_id);
500 sizeof (brp->frp_addr.ip4));
506 sizeof (brp->frp_addr.ip6));
521 rv = VNET_API_ERROR_UNSUPPORTED;
546 brp->frp_fib_index = fti;
550 rv = VNET_API_ERROR_NO_SUCH_FIB;
576 REPLY_MACRO (VL_API_BIER_DISP_ENTRY_ADD_DEL_REPLY);
594 vl_api_fib_path_t *fp;
609 m_size =
sizeof(*mp) + (
n_paths *
sizeof(vl_api_fib_path_t));
657 #include <bier/bier.api.c>
@ BIER_HDR_PROTO_MPLS_UP_STREAM
#define FOR_EACH_BIER_HDR_PROTO(_proto)
u32 frp_fib_index
The FIB index to lookup the nexthop Only valid for recursive paths.
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
fib_node_index_t bde_pl[BIER_HDR_N_PROTO]
The path-lists used by per-payload protocol parents.
vl_api_fib_path_t bde_paths[bde_n_paths]
static void vl_api_bier_disp_entry_dump_t_handler(vl_api_bier_disp_entry_dump_t *mp)
vl_api_bier_table_id_t bi_tbl_id
@ BIER_TABLE_MPLS_SPF
BIER over MPLS with SPF.
#define REPLY_MACRO2(t, body)
#define BIER_BP_MAX
The maximum BP that can be assigned.
#define clib_memcpy(d, s, n)
Path encode context to use when walking a path-list to encode paths.
static void send_bier_disp_entry_details(const bier_disp_table_t *bdt, const bier_disp_entry_t *bde, u16 bp, void *args)
index_t bier_table_add_or_lock(const bier_table_id_t *btid, mpls_label_t local_label)
static void vl_api_bier_disp_table_add_del_t_handler(vl_api_bier_disp_table_add_del_t *mp)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
vl_api_bier_table_id_t br_tbl_id
static void vl_api_bier_table_add_del_t_handler(vl_api_bier_table_add_del_t *mp)
VLIB_API_INIT_FUNCTION(bier_api_hookup)
@ BIER_HDR_PROTO_MPLS_DOWN_STREAM
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void send_bier_imp_details(vl_api_registration_t *reg, u32 context, const bier_imp_t *bi)
static void vl_api_bier_table_dump_t_handler(vl_api_bier_table_dump_t *mp)
void bier_imp_unlock(index_t bii)
index_t bier_disp_table_add_or_lock(u32 table_id)
u32 bier_bp_t
A bit positon as assigned to egress PEs.
BIER Table Add / del route.
void fib_api_path_encode(const fib_route_path_t *rpath, vl_api_fib_path_t *out)
Encode and decode functions from the API types to internal types.
static void vl_api_bier_route_add_del_t_handler(vl_api_bier_route_add_del_t *mp)
u32 fib_path_list_get_n_paths(fib_node_index_t path_list_index)
static void bier_hdr_ntoh(bier_hdr_t *bier_hdr)
fib_route_path_t * rpaths
u16 bbs_len
The length of the string in BYTES.
static void send_bier_route_details(const bier_table_t *bt, const bier_entry_t *be, void *args)
vl_api_bier_table_id_t bt_tbl_id
void bier_disp_table_entry_path_add(u32 table_id, bier_bp_t src, bier_hdr_proto_id_t payload_proto, const fib_route_path_t *rpaths)
void bier_disp_table_unlock_w_table_id(u32 table_id)
#define pool_foreach(VAR, POOL)
Iterate through pool.
@ FIB_API_PATH_NH_PROTO_IP4
bier_imposition : The BIER imposition object
bier_disposition : The BIER disposition object
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void bier_table_walk(const bier_table_id_t *bti, bier_table_walk_fn_t fn, void *ctx)
bier_table_sub_domain_id_t bti_sub_domain
The Sub-Domain-ID The control plane has the configuration option to specify multiple domains or topol...
int bier_table_is_main(const bier_table_t *bt)
#define BIER_ECMP_TABLE_ID_MAIN
Definition of the ID of the BIER main table.
vl_api_registration_t * reg
struct bier_route_details_walk_t_ bier_route_details_walk_t
bier_table_id_t bi_tbl
The BIER table into which to forward the post imposed packet.
vnet_main_t * vnet_get_main(void)
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
static void vl_api_bier_imp_del_t_handler(vl_api_bier_imp_del_t *mp)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
mpls_label_t bt_ll
Save the MPLS local label associated with the table.
static clib_error_t * bier_api_hookup(vlib_main_t *vm)
u32 fib_node_index_t
A typedef of a node index.
#define vec_foreach_index(var, v)
Iterate over vector indices.
void bier_table_route_path_update(const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps)
vl_api_bier_table_id_t bt_tbl_id
vl_api_bier_table_id_t bi_tbl_id
static bier_hdr_len_id_t bier_hdr_get_len_id(const bier_hdr_t *bier_hdr)
@ BIER_HDR_PROTO_ETHERNET
void bier_disp_table_entry_path_remove(u32 table_id, bier_bp_t src, bier_hdr_proto_id_t payload_proto, const fib_route_path_t *rpath)
void bier_table_route_path_remove(const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
@ FIB_ROUTE_PATH_RPF_ID
A local path with a RPF-ID => multicast traffic.
struct bier_disp_entry_details_walk_t_ bier_disp_entry_details_walk_t
vl_api_fib_path_t bde_paths[bde_n_paths]
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
static void vl_api_bier_disp_entry_add_del_t_handler(vl_api_bier_disp_entry_add_del_t *mp)
index_t bier_imp_add_or_lock(const bier_table_id_t *bti, bier_bp_t sender, const bier_bit_string_t *bs)
bier_hdr_len_id_t bti_hdr_len
The size of the bit string processed by this table.
static void send_bier_disp_table_details(vl_api_registration_t *reg, u32 context, const bier_disp_table_t *bdt)
bier_hdr_t bi_hdr
The Header to impose.
bier_disp_table_t * bier_disp_table_pool
memory pool for disposition tables
static void vl_api_bier_route_dump_t_handler(vl_api_bier_route_dump_t *mp)
vl_api_bier_route_t br_route
static u8 ip46_address_is_zero(const ip46_address_t *ip46)
vnet_api_error_t api_errno
void fib_path_list_walk_w_ext(fib_node_index_t path_list_index, const fib_path_ext_list_t *ext_list, fib_path_list_walk_w_ext_fn_t func, void *ctx)
enum bier_hdr_proto_id_t_ bier_hdr_proto_id_t
BIER header protocol payload types.
#define vec_free(V)
Free vector's memory (no header).
u8 bi_bits[BIER_HDR_BUCKETS_1024]
The bit string.
@ BIER_HDR_LEN_2048
Bit-string lengths greater than 1024 are not supported due to the limited about pf space available in...
u32 mfib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
void bier_table_route_path_add(const bier_table_id_t *btid, bier_bp_t bp, fib_route_path_t *brps)
static void vl_api_bier_imp_dump_t_handler(vl_api_bier_imp_dump_t *mp)
@ FIB_API_PATH_NH_PROTO_IP6
static void vl_api_bier_imp_add_t_handler(vl_api_bier_imp_add_t *mp)
A representation of a path as described by a route producer.
fib_path_list_walk_rc_t fib_path_encode(fib_node_index_t path_list_index, fib_node_index_t path_index, const fib_path_ext_t *path_ext, void *args)
#define vec_foreach(var, vec)
Vector iterator.
void bier_table_unlock(const bier_table_id_t *bti)
bier_table_id_t bt_id
The identity/key or the table.
void bier_table_route_delete(const bier_table_id_t *btid, bier_bp_t bp)
BIER Disposition Entry Add / del.
#define REPLY_MSG_ID_BASE
A protocol Independent IP multicast FIB table.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_bier_disp_table_dump_t_handler(vl_api_bier_disp_table_dump_t *mp)
bier_table_t * bier_table_pool
Memory pool of all the allocated tables.
void bier_disp_table_walk(u32 table_id, bier_disp_table_walk_fn_t fn, void *ctx)
static void send_bier_table_details(vl_api_registration_t *reg, u32 context, const bier_table_t *bt)
vl_api_registration_t * reg
A BIER header of variable length The encoding follows: https://tools.ietf.org/html/draft-ietf-bier-mp...
A BIER Table is the bit-indexed forwarding table.
u32 mpls_label_t
A label value only, i.e.
vl_api_bier_route_t br_route
Reply for BIER route add / del request.
u32 bier_hdr_len_id_to_num_bytes(bier_hdr_len_id_t id)
bier_table_set_id_t bti_set
The SET-ID The control plane divdies the bit-position space into sets in the case the max bit-positio...
bier_imp_t * bier_imp_pool
bier_imposition : The BIER imposition object
fib_node_index_t be_path_list
the FIB path-list this entry resolves through.
#define MPLS_LABEL_INVALID
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
BIER Disposition Table Add / del route.
int fib_api_path_decode(vl_api_fib_path_t *in, fib_route_path_t *out)
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
u32 bdt_table_id
Table ID (hash key) for this FIB.
A Variable length BitString.
static bier_hdr_src_id_t bier_hdr_get_src_id(const bier_hdr_t *bier_hdr)
bier_bp_t be_bp
the bit position this entry represents.
void * vl_msg_api_alloc(int nbytes)