Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
gtpu: Track the dst FIB entry instead of RR sourcing that
[vpp.git]
/
src
/
plugins
/
gtpu
/
gtpu.c
diff --git
a/src/plugins/gtpu/gtpu.c
b/src/plugins/gtpu/gtpu.c
index
4cb3fa8
..
48ac8a7
100644
(file)
--- a/
src/plugins/gtpu/gtpu.c
+++ b/
src/plugins/gtpu/gtpu.c
@@
-24,6
+24,7
@@
#include <vnet/ethernet/ethernet.h>
#include <vnet/fib/fib_entry.h>
#include <vnet/fib/fib_table.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/fib/fib_entry.h>
#include <vnet/fib/fib_table.h>
+#include <vnet/fib/fib_entry_track.h>
#include <vnet/mfib/mfib_table.h>
#include <vnet/adj/adj_mcast.h>
#include <vnet/dpo/dpo.h>
#include <vnet/mfib/mfib_table.h>
#include <vnet/adj/adj_mcast.h>
#include <vnet/dpo/dpo.h>
@@
-489,17
+490,17
@@
int vnet_gtpu_add_del_tunnel
if (!ip46_address_is_multicast (&t->dst))
{
/* Unicast tunnel -
if (!ip46_address_is_multicast (&t->dst))
{
/* Unicast tunnel -
- *
source the FIB entry for the tunnel's destination
- *
and become a child thereof.
The tunnel will then get poked
+ *
Track the FIB entry for the tunnel's destination.
+ * The tunnel will then get poked
* when the forwarding for the entry updates, and the tunnel can
* re-stack accordingly
*/
vtep_addr_ref (&t->src);
* when the forwarding for the entry updates, and the tunnel can
* re-stack accordingly
*/
vtep_addr_ref (&t->src);
- t->fib_entry_index = fib_
table_entry_special_add
-
(t->encap_fib_index, &tun_dst_pfx, FIB_SOURCE_RR
,
- FIB_ENTRY_FLAG_NONE);
- t->sibling_index = fib_entry_child_add
-
(t->fib_entry_index, gtm->fib_node_type, t - gtm->tunnels
);
+ t->fib_entry_index = fib_
entry_track (t->encap_fib_index,
+
&tun_dst_pfx
,
+ gtm->fib_node_type,
+ t - gtm->tunnels,
+
&t->sibling_index
);
gtpu_tunnel_restack_dpo (t);
}
else
gtpu_tunnel_restack_dpo (t);
}
else
@@
-602,8
+603,7
@@
int vnet_gtpu_add_del_tunnel
if (!ip46_address_is_multicast (&t->dst))
{
vtep_addr_unref (&t->src);
if (!ip46_address_is_multicast (&t->dst))
{
vtep_addr_unref (&t->src);
- fib_entry_child_remove (t->fib_entry_index, t->sibling_index);
- fib_table_entry_delete_index (t->fib_entry_index, FIB_SOURCE_RR);
+ fib_entry_untrack (t->fib_entry_index, t->sibling_index);
}
else if (vtep_addr_unref (&t->dst) == 0)
{
}
else if (vtep_addr_unref (&t->dst) == 0)
{