|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __BIER_TYPES_H__
17 #define __BIER_TYPES_H__
45 #define BIER_TABLE_TYPES { \
46 [BIER_TABLE_MPLS_SPF] = "mpls-spf", \
47 [BIER_TABLE_MPLS_TE] = "mpls-te", \
69 #define BIER_HDR_LEN_IDS { \
70 [BIER_HDR_LEN_INVALID] = "invalid",\
71 [BIER_HDR_LEN_64] = "64", \
72 [BIER_HDR_LEN_128] = "128", \
73 [BIER_HDR_LEN_256] = "256", \
74 [BIER_HDR_LEN_512] = "512", \
75 [BIER_HDR_LEN_1024] = "1024", \
76 [BIER_HDR_LEN_2048] = "2048", \
77 [BIER_HDR_LEN_4096] = "4096", \
80 #define FOR_EACH_BIER_HDR_LEN(_len) \
81 for (_item = BIER_HDR_LEN_64; \
82 _item <= BIER_HDR_LEN_4096; \
192 #define BIER_HDR_N_PROTO (BIER_HDR_PROTO_OAM + 1)
194 #define BIER_HDR_PROTO_ID_NAMES { \
195 [BIER_HDR_PROTO_INVALID] = "invalid", \
196 [BIER_HDR_PROTO_MPLS_DOWN_STREAM] = "mpls-down-stream", \
197 [BIER_HDR_PROTO_MPLS_UP_STREAM] = "mpls-up-stream", \
198 [BIER_HDR_PROTO_ETHERNET] = "ethernet", \
199 [BIER_HDR_PROTO_IPV4] = "ipv4", \
200 [BIER_HDR_PROTO_IPV6] = "ipv6", \
201 [BIER_HDR_PROTO_VXLAN] = "vxlan", \
202 [BIER_HDR_PROTO_CTRL] = "control-plane", \
203 [BIER_HDR_PROTO_OAM] = "oam", \
206 #define FOR_EACH_BIER_HDR_PROTO(_proto) \
207 for (_proto = BIER_HDR_PROTO_MPLS_DOWN_STREAM; \
208 _proto <= BIER_HDR_PROTO_OAM; \
262 #define BIER_BIT_MASK_NUM_BUCKETS 32
263 #define BIER_BIT_MASK_MAX_BUCKET (BIER_BIT_MASK_NUM_BUCKETS - 1)
268 #define BIER_BIT_MASK_BITS_PER_BUCKET 8
273 #define BIER_BIT_MASK_MIN_POS (1)
296 #define BIER_BP_TO_INDEX(bp) (bp - 1)
301 #define BIER_BP_MAX 0x10000
314 #define BIER_BP_INVALID 0
372 #define BIER_TABLE_SET_INVALID_ID 0xffffffff
379 #define BIER_TABLE_SUB_DOMAIN_INVALID_ID 0xffffffff
389 #define BIER_ECMP_TABLE_ID_MAIN 0xFFFF
450 #define BIER_ERR_NO_TABLE 1
451 #define BIER_ERR_DUPLICATE_TABLE 2
452 #define BIER_ERR_PANIC 3
464 #define BIER_BIFT_ID_INVALID (~0)
@ BIER_HDR_PROTO_MPLS_UP_STREAM
u32 bier_hdr_len_id_to_num_buckets(bier_hdr_len_id_t id)
Conversion functions for the enumerated bit-string length values, to bit and bytes.
@ BIER_HDR_SUB_CODE_OAM_PING_RESP
int bier_table_id_cmp(const bier_table_id_t *btid1, const bier_table_id_t *btid2)
Compare to BIER table IDs for equality.
@ BIER_TABLE_MPLS_SPF
BIER over MPLS with SPF.
u16 bh_oam_dscp_proto
The second word comprises: 2 bits of OAM for passive perf measurement 2 reserved bits; 6 bits of DSCP...
u16 bier_bfit_id_get_set(bier_bift_id_t bift_id)
bier_show_flags_t_
Flags to control show output.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
dpo_proto_t bier_hdr_proto_to_dpo(bier_hdr_proto_id_t bproto)
Convert from BIER next-hop proto to DPO proto.
enum bier_hdr_ctrl_sub_code_t_ bier_hdr_ctrl_sub_code_t
bier_hdr_ctrl_sub_code_t enumerator
bier_hdr_proto_id_t bier_bift_id_get_bit_string_length(bier_bift_id_t bift_id)
bier_hdr_oam_sub_code_t_
bier_hdr_oam_sub_code_t enumerator
u16 bier_hdr_src_id_t
An identifier of the sender of BIER packets this is the source of the 'tree' - the BFIR.
struct bier_table_id_t_ bier_table_id_t
The ID of a table.
bier_hdr_code_t_
bier_hdr_code_t enumerator
bier_hdr_len_id_t_
bier_hdr_len_id_t enumerator
@ BIER_HDR_PROTO_MPLS_DOWN_STREAM
u32 bier_hdr_len_id_to_num_bits(bier_hdr_len_id_t id)
enum bier_hdr_oam_sub_code_t_ bier_hdr_oam_sub_code_t
bier_hdr_oam_sub_code_t enumerator
u32 bier_bp_t
A bit positon as assigned to egress PEs.
bier_hdr_len_num_buckets_t_
bier_hdr_len_num_buckets_t enumerator
bier_table_type_t bti_type
The type of the table; SPF or TE, MPLS or IPv6.
u16 bbs_len
The length of the string in BYTES.
@ BIER_HDR_SUB_CODE_CTRL_MEMBER_REQ
@ BIER_HDR_CODE_CTRL_IPV4
u8 * format_bier_hdr_len_id(u8 *s, va_list *ap)
Format the header length field.
bier_bift_id_t bier_bift_id_encode(bier_table_set_id_t set, bier_table_sub_domain_id_t sd, bier_hdr_len_id_t bsl)
Encode a BIFT-ID as per draft-wijnandsxu-bier-non-mpls-bift-encoding-00.txt.
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...
u32 bier_hdr_len_id_to_num_bytes(bier_hdr_len_id_t id)
u8 bier_bit_mask_bucket_t
A bucket is a byte.
bier_hdr_version_t_
BIER header versions.
enum bier_hdr_len_num_buckets_t_ bier_hdr_len_num_buckets_t
bier_hdr_len_num_buckets_t enumerator
@ BIER_HDR_SUB_CODE_OAM_PING_REQ
u32 bier_table_sub_domain_id_t
The BIER Sub-domain ID assigned to a BIER table.
bier_table_type_t_
Types of BIER tables.
void bier_bift_id_decode(bier_bift_id_t id, bier_table_set_id_t *set, bier_table_sub_domain_id_t *sd, bier_hdr_len_id_t *bsl)
u32 bier_hdr_len_id_to_max_bucket(bier_hdr_len_id_t id)
@ BIER_HDR_PROTO_ETHERNET
struct bier_hdr_t_ bier_hdr_t
A BIER header of variable length The encoding follows: https://tools.ietf.org/html/draft-ietf-bier-mp...
enum bier_table_type_t_ bier_table_type_t
Types of BIER tables.
enum bier_show_flags_t_ bier_show_flags_t
Flags to control show output.
u32 bier_hdr_len_id_to_prefix_len(bier_hdr_len_id_t id)
u8 * format_bier_hdr(u8 *s, va_list *ap)
Format a BIER header.
bier_hdr_len_id_t bti_hdr_len
The size of the bit string processed by this table.
static bier_hdr_len_id_t bier_hdr_byte_len_to_id(u32 bytes)
u16 bier_bfit_id_get_sub_domain(bier_bift_id_t bift_id)
enum bier_hdr_proto_id_t_ bier_hdr_proto_id_t
BIER header protocol payload types.
enum bier_hdr_len_id_t_ bier_hdr_len_id_t
bier_hdr_len_id_t enumerator
@ BIER_TABLE_MPLS_TE
BIER over MPLS for TE.
enum bier_hdr_version_t_ bier_hdr_version_t
BIER header versions.
@ BIER_HDR_LEN_2048
Bit-string lengths greater than 1024 are not supported due to the limited about pf space available in...
u32 bier_table_ecmp_id_t
An ID or instance number of a BIER sub-table.
static bier_hdr_len_id_t bier_prefix_len_to_hdr_id(u16 prfx_len)
@ BIER_HDR_SUB_CODE_CTRL_ATTACHED_NET
@ BIER_HDR_CODE_CTRL_IPV6
u32 bier_hdr_len_id_to_max_bit(bier_hdr_len_id_t id)
u8 * format_bier_hdr_proto(u8 *s, va_list *ap)
Format the header length field.
bier_table_ecmp_id_t bti_ecmp
The SUB/ECMP-ID Constructed by FIB to achieve ECMP between BFR-NBRs.
u32 bier_hdr_entropy_t
An entropy value in a BIER header.
static bier_hdr_len_id_t bier_hdr_bit_len_to_id(u32 bytes)
u32 bier_bift_id_t
The BIER universal 'label'.
bier_bit_mask_bucket_t * bbs_buckets
The buckets in the string.
struct bier_bit_string_t_ bier_bit_string_t
A Variable length BitString.
bier_hdr_proto_id_t_
BIER header protocol payload types.
bier_hdr_ctrl_sub_code_t_
bier_hdr_ctrl_sub_code_t enumerator
A BIER header of variable length The encoding follows: https://tools.ietf.org/html/draft-ietf-bier-mp...
bier_bit_mask_bucket_t bh_bit_string[0]
The variable length bit-string.
u32 bh_first_word
The first nibble is always set to 0101 to ensure that when carried over MPLS, the BIER packet is not ...
u8 * format_bier_table_id(u8 *s, va_list *ap)
Format a BIER table ID.
u32 bier_table_set_id_t
The BIER Set ID assigned to a BIER table.
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...
u16 bh_bfr_id
The BFR-ID of the sender.
A Variable length BitString.
enum bier_hdr_code_t_ bier_hdr_code_t
bier_hdr_code_t enumerator
u8 * format_bier_bift_id(u8 *s, va_list *ap)