FD.io VPP  v18.01.1-37-g7ea3975
Vector Packet Processing
bier_disp_entry.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  * bier_dispositon : The BIER dispositon object
17  *
18  * A BIER dispositon object is used to pop the BIER header for for-us
19  * packets and steer the packet down the payload protocol specific graph
20  */
21 
22 #ifndef __BIER_DISP_ENTRY_H__
23 #define __BIER_DISP_ENTRY_H__
24 
25 #include <vnet/bier/bier_types.h>
26 #include <vnet/fib/fib_types.h>
27 #include <vnet/dpo/dpo.h>
28 
29 /**
30  * The BIER dispositon object
31  */
32 typedef struct bier_disp_entry_t_ {
33  /**
34  * The DPO contirubted from the per-payload protocol parents
35  * on cachline 1.
36  */
37  struct
38  {
42 
43  /**
44  * number of locks
45  */
47 
48  /**
49  * The path-lists used by per-payload protocol parents.
50  * We don't add the disp entry to the graph as a sibling
51  * since there is nothing we can do with the updates to
52  * forwarding.
53  */
56 
58 extern void bier_disp_entry_path_add(index_t bdei,
59  bier_hdr_proto_id_t pproto,
60  const fib_route_path_t *rpaths);
61 extern int bier_disp_entry_path_remove(index_t bdei,
62  bier_hdr_proto_id_t pproto,
63  const fib_route_path_t *rpaths);
64 
65 extern void bier_disp_entry_unlock(index_t bdi);
66 extern void bier_disp_entry_lock(index_t bdi);
67 
68 extern u8* format_bier_disp_entry(u8* s, va_list *ap);
69 
71  dpo_id_t *dpo);
72 
74 
77 {
78  return (pool_elt_at_index(bier_disp_entry_pool, bdi));
79 }
80 
81 #endif
u32 bde_locks
number of locks
void bier_disp_entry_path_add(index_t bdei, bier_hdr_proto_id_t pproto, const fib_route_path_t *rpaths)
fib_node_index_t bde_pl[BIER_HDR_N_PROTO]
The path-lists used by per-payload protocol parents.
A representation of a path as described by a route producer.
Definition: fib_types.h:377
u32 bde_rpf_id
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:41
bier_dispositon : The BIER dispositon object
#define always_inline
Definition: clib.h:92
#define BIER_HDR_N_PROTO
Definition: bier_types.h:187
void bier_disp_entry_contribute_forwarding(index_t bdi, dpo_id_t *dpo)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:166
u8 * format_bier_disp_entry(u8 *s, va_list *ap)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:459
bier_disp_entry_t * bier_disp_entry_pool
bier_dispositon : The BIER dispositon object
int bier_disp_entry_path_remove(index_t bdei, bier_hdr_proto_id_t pproto, const fib_route_path_t *rpaths)
static bier_disp_entry_t * bier_disp_entry_get(index_t bdi)
void bier_disp_entry_lock(index_t bdi)
void bier_disp_entry_unlock(index_t bdi)
dpo_id_t bde_dpo
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
enum bier_hdr_proto_id_t_ bier_hdr_proto_id_t
BIER header protocol payload types.
struct bier_disp_entry_t_ bier_disp_entry_t
bier_dispositon : The BIER dispositon object
unsigned int u32
Definition: types.h:88
struct bier_disp_entry_t_::@50 bde_fwd[BIER_HDR_N_PROTO]
The DPO contirubted from the per-payload protocol parents on cachline 1.
unsigned char u8
Definition: types.h:56
index_t bier_disp_entry_add_or_lock(void)