aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2016-10-08 13:03:40 +0100
committerDave Barach <openvpp@barachs.net>2016-10-14 13:50:39 +0000
commitb80c536e34b610ca77cd84448754e4bd9c46cf68 (patch)
treed7a868cdd657a3a54ff9eef76bfe3e7e4678e6d3 /vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h
parent3ae1a91430a341cd9ca96023e4fb619efe7cac7e (diff)
FIB2.0: Adjacency complete pull model (VPP-487)
Change the adjacency completion model to pull not push. A complete adjacency has a rewirte string, an incomplete one does not. the re-write string for a peer comes either from a discovery protocol (i.e. ARP/ND) or can be directly derived from the link type (i.e. GRE tunnels). Which method it is, is interface type specific. For each packet type sent on a link to a peer there is a corresponding adjacency. For example, if there is a peer 10.0.0.1 on Eth0 and we need to send to it IPv4 and MPLS packets, there will be two adjacencies; one for the IPv4 and one for the MPLS packets. The adjacencies are thus distinguished by the packets the carry, this is known as the adjacency's 'link-type'. It is not an L3 packet type, since the adjacency can have a link type of Ethernet (for L2 over GRE). The discovery protocols are not aware of all the link types required - only the FIB is. the FIB will create adjacencies as and when they are required, and it is thus then desirable to 'pull' from the discovery protocol the re-write required. The alternative (that we have now) is that the discovery protocol pushes (i.e. creates) adjacencies for each link type - this creates more adjacencies than we need. To pull, FIB now requests from the interface-type to 'complete' the adjacency. The interface can then delegate to the discovery protocol (on ethernet links) or directly build the re-write (i.e on GRE). Change-Id: I61451789ae03f26b1012d8d6524007b769b6c6ee Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h')
-rw-r--r--vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h b/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h
index f6a66cddf0b..adc3acaee3c 100644
--- a/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h
+++ b/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h
@@ -80,12 +80,6 @@ typedef struct lisp_gpe_adjacency_t_
u32 tunnel_index;
/**
- * Per-link-type FIB adjacencies contributed.
- * These will be used as a result of a FIB lookup.
- */
- adj_index_t adjs[FIB_LINK_NUM];
-
- /**
* This adjacency is a child of the FIB entry to reach the RLOC.
* This is so when the reachability of that RLOC changes, we can restack
* the FIB adjacnecies.
@@ -112,6 +106,14 @@ extern void lisp_gpe_adjacency_unlock (index_t l3si);
extern const lisp_gpe_adjacency_t *lisp_gpe_adjacency_get (index_t l3si);
+extern void lisp_gpe_update_adjacency (vnet_main_t * vnm,
+ u32 sw_if_index, adj_index_t ai);
+extern u8 *lisp_gpe_build_rewrite (vnet_main_t * vnm,
+ u32 sw_if_index,
+ vnet_link_t link_type,
+ const void *dst_address);
+
+
/**
* @brief Flags for displaying the adjacency
*/