FIB2.0: Adjacency complete pull model (VPP-487) 99/3399/4
authorNeale Ranns <nranns@cisco.com>
Sat, 8 Oct 2016 12:03:40 +0000 (13:03 +0100)
committerDave Barach <openvpp@barachs.net>
Fri, 14 Oct 2016 13:50:39 +0000 (13:50 +0000)
commitb80c536e34b610ca77cd84448754e4bd9c46cf68
treed7a868cdd657a3a54ff9eef76bfe3e7e4678e6d3
parent3ae1a91430a341cd9ca96023e4fb619efe7cac7e
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>
54 files changed:
vnet/vnet/adj/adj.c
vnet/vnet/adj/adj.h
vnet/vnet/adj/adj_glean.c
vnet/vnet/adj/adj_glean.h
vnet/vnet/adj/adj_internal.h
vnet/vnet/adj/adj_l2.c
vnet/vnet/adj/adj_midchain.c
vnet/vnet/adj/adj_nbr.c
vnet/vnet/adj/adj_nbr.h
vnet/vnet/adj/adj_rewrite.c
vnet/vnet/adj/adj_types.h
vnet/vnet/dhcp/client.c
vnet/vnet/ethernet/arp.c
vnet/vnet/ethernet/ethernet.h
vnet/vnet/ethernet/interface.c
vnet/vnet/fib/fib_entry.c
vnet/vnet/fib/fib_path.c
vnet/vnet/fib/fib_test.c
vnet/vnet/fib/fib_types.h
vnet/vnet/gre/gre.c
vnet/vnet/gre/gre.h
vnet/vnet/gre/interface.c
vnet/vnet/hdlc/hdlc.c
vnet/vnet/interface.c
vnet/vnet/interface.h
vnet/vnet/interface_funcs.h
vnet/vnet/ip/format.h
vnet/vnet/ip/ip4_forward.c
vnet/vnet/ip/ip6.h
vnet/vnet/ip/ip6_forward.c
vnet/vnet/ip/ip6_neighbor.c
vnet/vnet/ipsec/ipsec_if.c
vnet/vnet/l2tp/l2tp.c
vnet/vnet/lisp-cp/lisp_types.c
vnet/vnet/lisp-cp/lisp_types.h
vnet/vnet/lisp-gpe/interface.c
vnet/vnet/lisp-gpe/lisp_gpe_adjacency.c
vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h
vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
vnet/vnet/llc/llc.c
vnet/vnet/mpls/interface.c
vnet/vnet/mpls/mpls.h
vnet/vnet/mpls/mpls_output.c
vnet/vnet/pg/stream.c
vnet/vnet/ppp/ppp.c
vnet/vnet/replication.c
vnet/vnet/rewrite.c
vnet/vnet/rewrite.h
vnet/vnet/srp/interface.c
vnet/vnet/unix/tapcli.c
vnet/vnet/unix/tuntap.c
vnet/vnet/vxlan-gpe/vxlan_gpe.c
vnet/vnet/vxlan/vxlan.c
vpp/vpp-api/api.c