FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
fib_test.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __FIB_TEST_H__
17 #define __FIB_TEST_H__
18 
19 #include <vnet/fib/fib_types.h>
20 #include <vnet/mpls/mpls_types.h>
21 #include <vnet/fib/fib_types.h>
22 #include <vnet/mpls/packet.h>
23 #include <vnet/dpo/load_balance.h>
24 #include <vnet/adj/adj_types.h>
25 #include <vnet/dpo/replicate_dpo.h>
26 
42 
43 typedef struct fib_test_lb_bucket_t_ {
45 
46  union
47  {
48  struct
49  {
55  } label_o_adj;
56  struct
57  {
62  u8 ttl;
65  struct
66  {
71  u8 ttl;
74  struct
75  {
79  u8 ttl;
81  } label_o_lb;
82  struct
83  {
85  } adj;
86  struct
87  {
88  index_t lb;
89  } lb;
90  struct
91  {
92  index_t adj;
93  } special;
94  struct
95  {
96  union {
99  };
100  } bier;
101  };
103 
109 
110 typedef struct fib_test_rep_bucket_t_ {
112 
113  union
114  {
115  struct
116  {
121  } label_o_adj;
122  struct
123  {
125  } adj;
126  };
128 
129 
130 extern int fib_test_validate_rep_v(const replicate_t *rep,
131  u16 n_buckets,
132  va_list *ap);
133 
134 extern int fib_test_validate_lb_v(const load_balance_t *lb,
135  int n_buckets,
136  va_list *ap);
137 
138 extern int fib_test_validate_lb(const dpo_id_t *dpo,
139  int n_buckets,
140  ...);
141 
144  int n_buckets,
145  ...);
146 
147 
148 #endif
load_balance.h
FT_REP_LABEL_O_ADJ
@ FT_REP_LABEL_O_ADJ
Definition: fib_test.h:105
adj_types.h
fib_test_lb_bucket_t_
Definition: fib_test.h:43
fib_test_lb_bucket_t_::label_chain
mpls_label_t label_chain[8]
Definition: fib_test.h:59
FT_LB_INTF
@ FT_LB_INTF
Definition: fib_test.h:34
fib_test_rep_bucket_t_
Definition: fib_test.h:110
FT_LB_LABEL_STACK_O_ADJ
@ FT_LB_LABEL_STACK_O_ADJ
Definition: fib_test.h:29
fib_test_lb_bucket_type_t
enum fib_test_lb_bucket_type_t_ fib_test_lb_bucket_type_t
FT_LB_BIER_TABLE
@ FT_LB_BIER_TABLE
Definition: fib_test.h:36
fib_test_lb_bucket_t_::label
mpls_label_t label
Definition: fib_test.h:51
u16
unsigned short u16
Definition: types.h:57
FT_LB_DROP
@ FT_LB_DROP
Definition: fib_test.h:38
fib_test_lb_bucket_t_::adj
adj_index_t adj
Definition: fib_test.h:54
replicate_t_
The FIB DPO provieds;.
Definition: replicate_dpo.h:63
packet.h
fib_test_rep_bucket_type_t
enum fib_test_rep_bucket_type_t_ fib_test_rep_bucket_type_t
fib_test_lb_bucket_t_::table
index_t table
Definition: fib_test.h:97
FT_LB_O_LB
@ FT_LB_O_LB
Definition: fib_test.h:32
replicate_dpo.h
fib_test_lb_bucket_t_::special
struct fib_test_lb_bucket_t_::@324::@332 special
fib_test_lb_bucket_t_::bier
struct fib_test_lb_bucket_t_::@324::@333 bier
fib_test_lb_bucket_t_::label_chain_o_adj
struct fib_test_lb_bucket_t_::@324::@327 label_chain_o_adj
fib_test_lb_bucket_t_::mode
fib_mpls_lsp_mode_t mode
Definition: fib_test.h:52
fib_forward_chain_type_t
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_test_rep_bucket_type_t_
fib_test_rep_bucket_type_t_
Definition: fib_test.h:104
fib_types.h
fib_test_validate_rep_v
int fib_test_validate_rep_v(const replicate_t *rep, u16 n_buckets, va_list *ap)
fib_test_rep_bucket_t_::label
mpls_label_t label
Definition: fib_test.h:118
index_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:43
fib_test_lb_bucket_t_::adj
index_t adj
Definition: fib_test.h:84
fib_node_index_t
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
fib_test_lb_bucket_type_t_
fib_test_lb_bucket_type_t_
Definition: fib_test.h:27
fib_test_rep_bucket_t_::eos
mpls_eos_bit_t eos
Definition: fib_test.h:117
fib_test_lb_bucket_t_::label_o_adj
struct fib_test_lb_bucket_t_::@324::@326 label_o_adj
fib_mpls_lsp_mode_t
enum fib_mpls_lsp_mode_t_ fib_mpls_lsp_mode_t
MPLS LSP mode - only valid at the head and tail.
fib_test_lb_bucket_t_::label_stack_o_adj
struct fib_test_lb_bucket_t_::@324::@328 label_stack_o_adj
FT_LB_MPLS_DISP_PIPE_O_ADJ
@ FT_LB_MPLS_DISP_PIPE_O_ADJ
Definition: fib_test.h:33
fib_test_lb_bucket_t_::type
fib_test_lb_bucket_type_t type
Definition: fib_test.h:44
FT_REP_DISP_MFIB_LOOKUP
@ FT_REP_DISP_MFIB_LOOKUP
Definition: fib_test.h:106
fib_test_rep_bucket_t_::ttl
u8 ttl
Definition: fib_test.h:119
fib_test_validate_entry
int fib_test_validate_entry(fib_node_index_t fei, fib_forward_chain_type_t fct, int n_buckets,...)
FT_REP_INTF
@ FT_REP_INTF
Definition: fib_test.h:107
fib_test_lb_bucket_t_::label_stack_size
u8 label_stack_size
Definition: fib_test.h:70
FT_LB_PUNT
@ FT_LB_PUNT
Definition: fib_test.h:39
mpls_types.h
FT_LB_BIER_FMASK
@ FT_LB_BIER_FMASK
Definition: fib_test.h:37
fib_test_rep_bucket_t_::adj
adj_index_t adj
Definition: fib_test.h:120
FT_LB_LABEL_O_ADJ
@ FT_LB_LABEL_O_ADJ
Definition: fib_test.h:28
fib_test_lb_bucket_t_::fmask
index_t fmask
Definition: fib_test.h:98
FT_LB_LABEL_O_LB
@ FT_LB_LABEL_O_LB
Definition: fib_test.h:31
fib_test_lb_bucket_t_::lb
index_t lb
Definition: fib_test.h:80
fib_test_rep_bucket_t_::type
fib_test_rep_bucket_type_t type
Definition: fib_test.h:111
fib_test_lb_bucket_t_::ttl
u8 ttl
Definition: fib_test.h:53
adj_index_t
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
fib_test_lb_bucket_t_::label_chain_size
u8 label_chain_size
Definition: fib_test.h:61
fib_test_validate_lb_v
int fib_test_validate_lb_v(const load_balance_t *lb, int n_buckets, va_list *ap)
u8
unsigned char u8
Definition: types.h:56
fib_test_lb_bucket_t
struct fib_test_lb_bucket_t_ fib_test_lb_bucket_t
FT_LB_LABEL_CHAIN_O_ADJ
@ FT_LB_LABEL_CHAIN_O_ADJ
Definition: fib_test.h:30
fib_test_lb_bucket_t_::eos
mpls_eos_bit_t eos
Definition: fib_test.h:50
FT_LB_L2
@ FT_LB_L2
Definition: fib_test.h:35
dpo_id_t_
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:172
mpls_label_t
u32 mpls_label_t
A label value only, i.e.
Definition: packet.h:26
fib_test_validate_lb
int fib_test_validate_lb(const dpo_id_t *dpo, int n_buckets,...)
load_balance_t_
The FIB DPO provieds;.
Definition: load_balance.h:106
mpls_eos_bit_t
enum mpls_eos_bit_t_ mpls_eos_bit_t
fib_test_lb_bucket_t_::label_o_lb
struct fib_test_lb_bucket_t_::@324::@329 label_o_lb
fib_test_lb_bucket_t_::label_stack
mpls_label_t label_stack[8]
Definition: fib_test.h:68
fib_test_rep_bucket_t
struct fib_test_rep_bucket_t_ fib_test_rep_bucket_t
fib_test_rep_bucket_t_::label_o_adj
struct fib_test_rep_bucket_t_::@336::@338 label_o_adj
FT_LB_ADJ
@ FT_LB_ADJ
Definition: fib_test.h:40