FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
fib_attached_export.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  * FIB attached export
17  *
18  * what's it all about?
19  * say one does this:
20  * set int ip table Gig0 2
21  * set int ip addr Gig0 10.0.0.1/24
22  * Ggi0 is in table 2 with a connected address.
23  * Now we add a routing matching said connected in a different table
24  * ip route add table 3 10.0.0.0/24 via Gig0
25  * How do we expect traffic in table 3 to be forwarded? Clearly out of
26  * Ggi0. It's an attached route, hence we are saying that we can ARP for
27  * hosts in the attached subnet. and we can. but any ARP entries we send
28  * we be received on Gig0, but since Gig0 is in table 2, it will install
29  * the adj-fins in table 2. So traffic in table 3 will never hit an adj-fib
30  * and hence always the glean, and so thus be effectively dropped.
31  * How do we fix this? Attached Export !! All more specfiic entries in table 2
32  * that track and are covered by the connected are automatically exported into
33  * table 3. Now table 3 also has adj-fibs (and the local) so traffic to hosts
34  * is restored.
35  */
36 
37 #ifndef __FIB_ATTACHED_EXPORT_H__
38 #define __FIB_ATTACHED_EXPORT_H__
39 
40 #include <vnet/fib/fib_types.h>
41 
42 extern void fib_attached_export_import(fib_entry_t *fib_entry,
43  fib_node_index_t export_fib);
44 
45 extern void fib_attached_export_purge(fib_entry_t *fib_entry);
46 
48  fib_node_index_t covered);
50  fib_node_index_t covered);
51 extern void fib_attached_export_cover_change(fib_entry_t *fib_entry);
52 extern void fib_attached_export_cover_update(fib_entry_t *fib_entry);
53 
56 
57 #endif
An entry in a FIB table.
Definition: fib_entry.h:468
void fib_attached_export_cover_change(fib_entry_t *fib_entry)
If this entry is tracking a cover (in another table) then that cover has changed. ...
u8 * fib_ae_import_format(fib_node_index_t impi, u8 *s)
unsigned char u8
Definition: types.h:56
void fib_attached_export_covered_removed(fib_entry_t *cover, fib_node_index_t covered)
void fib_attached_export_cover_update(fib_entry_t *fib_entry)
If this entry is tracking a cover (in another table) then that cover has been updated.
void fib_attached_export_covered_added(fib_entry_t *cover, fib_node_index_t covered)
void fib_attached_export_import(fib_entry_t *fib_entry, fib_node_index_t export_fib)
FIB attached export.
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
u8 * fib_ae_export_format(fib_node_index_t expi, u8 *s)
void fib_attached_export_purge(fib_entry_t *fib_entry)
All the imported entries need to be purged.