|
Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
|


Go to the source code of this file.
Functions | |
| int | hicn_route_get_dpo (const fib_prefix_t *prefix, const dpo_id_t **hicn_dpo, u32 *fib_index) |
| int | hicn_route_set_strategy (fib_prefix_t *prefix, u32 strategy_id) |
| int | ip_nh_add_helper (fib_protocol_t fib_proto, const fib_prefix_t *pfx, ip46_address_t *nh, u32 sw_if) |
| int | ip_nh_del_helper (fib_protocol_t fib_proto, const fib_prefix_t *rpfx, ip46_address_t *nh, u32 sw_if) |
| int | hicn_route_enable (fib_prefix_t *prefix) |
| int | hicn_route_disable (fib_prefix_t *prefix) |
| void | hicn_route_init () |
Variables | |
| fib_source_t | hicn_fib_src |
| dpo_type_t | udp_encap_dpo_types [FIB_PROTOCOL_MAX] |
hICN uses a specific vrf to install the routes for a prefix has been enabled to be hicn. It considers the vrf 0 (the default vrf) as the dominating vrf on which every route is stored. Enabling a prefix to be hICN will copy all the routes in the vrf 0 for the given prefi, in the vrf HICN. Every modification made on the vrf 0 on an hICN enabled prefix is reflected in the vrf hICN (through the use of the fib entry tracking functionality). Moreover, we use the lookup in the vrf hICN as a way for punting packet that must be processed as hICN. The implementation will install a special dpo as a single next hop for the vpp load balancer for each entry in the vrf hICN that we enabled. Such dpo will have two purposes: 1) to punt packets to the hICN forwarding pipeline, 2) to point to the righe strategy (the dpoi_index will be an index to the strategy context while the dpoi_type will be an index to the strategy vft).
Additionally, hICN assign each interface to the vrf hICN; this is required for the interest lookup. Vpp performs a lookup in the vrf assigned to the interface, therefore if an interface is not assigned to the hICN vrf, the lookup will be done on the vrf 0 and the packet won't be processed through the hicn forwarding pipeline.
| int hicn_route_disable | ( | fib_prefix_t * | prefix | ) |
@Brief Disable an hICN for an ip prefix. If hICN wasn't enable on the prefix nothing happens and it returns HICN_ERROR_ROUTE_NOT_FOUND
| prefix | Prefix for which we disable hICN |
| int hicn_route_enable | ( | fib_prefix_t * | prefix | ) |
@Brief Enable an hICN for an ip prefix
| prefix | Prefix for which we enable hICN |
| int hicn_route_get_dpo | ( | const fib_prefix_t * | prefix, |
| const dpo_id_t ** | hicn_dpo, | ||
| u32 * | fib_index | ||
| ) |
@Brief Return the hicn_dpo corresponding to the prefix in teh vrf HICN
| prefix | Prefix for which we want to retrieve the hICN dpo |
| hicn_dpo | return value with the hicn_dpo |
| fib_index | return value with the fib index corresponding to the prefix |
| int hicn_route_set_strategy | ( | fib_prefix_t * | prefix, |
| u32 | strategy_id | ||
| ) |
@Brief Set the strategy for a given prefix
| prefix | Prefix for which we set the strategy |
| stretegy_id | Index of the strategy to set |
| int ip_nh_add_helper | ( | fib_protocol_t | fib_proto, |
| const fib_prefix_t * | pfx, | ||
| ip46_address_t * | nh, | ||
| u32 | sw_if | ||
| ) |
@Brief Helper to add a nex hop in the vrf 0. If there are no entries in the vrf 0 that matches with the prefix (epm), a new one is created.
| fib_proto | FIB_PROTOCOL_IP6 or FIB_PROTOCOL_IP4 (mpls not supported) |
| pfx | Prefix for which to add a next hop |
| nh | Next hop to add |
| sw_if | Software interface index to add in the next hop |
| int ip_nh_del_helper | ( | fib_protocol_t | fib_proto, |
| const fib_prefix_t * | rpfx, | ||
| ip46_address_t * | nh, | ||
| u32 | sw_if | ||
| ) |
@Brief Helper to remove a nex hop in the vrf 0. If there are no entries in the vrf 0 nothing happens.
| fib_proto | FIB_PROTOCOL_IP6 or FIB_PROTOCOL_IP4 (mpls not supported) |
| pfx | Prefix for which to remove a next hop |
| nh | Next hop to remove |
| sw_if | Software interface index in the next hop definition |
1.8.17