gtpu: Track the dst FIB entry instead of RR sourcing that
RR sourcing the destination FIB entry limits the number of tunnels to 255 for a particular destination. This change removes this limit. Type: fix The patch is based on 1f50bf8fc57ebf78f9056185a342493be460a847 that introduced the FIB entry tracking but did not update the gtpu plugin. Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com> Change-Id: I8a4a87382a6eb5120e2bb65b9bc3c446bbfdbd3b (cherry picked from commit 75c72369186f6341a13374d2dd6e60ce3c7a88a6)
This commit is contained in:
Miklos Tirpak
committed by
Andrew Yourtchenko
parent
c9563e60fe
commit
5381da1dc6
@ -24,6 +24,7 @@
|
|||||||
#include <vnet/ethernet/ethernet.h>
|
#include <vnet/ethernet/ethernet.h>
|
||||||
#include <vnet/fib/fib_entry.h>
|
#include <vnet/fib/fib_entry.h>
|
||||||
#include <vnet/fib/fib_table.h>
|
#include <vnet/fib/fib_table.h>
|
||||||
|
#include <vnet/fib/fib_entry_track.h>
|
||||||
#include <vnet/mfib/mfib_table.h>
|
#include <vnet/mfib/mfib_table.h>
|
||||||
#include <vnet/adj/adj_mcast.h>
|
#include <vnet/adj/adj_mcast.h>
|
||||||
#include <vnet/dpo/dpo.h>
|
#include <vnet/dpo/dpo.h>
|
||||||
@ -489,17 +490,17 @@ int vnet_gtpu_add_del_tunnel
|
|||||||
if (!ip46_address_is_multicast (&t->dst))
|
if (!ip46_address_is_multicast (&t->dst))
|
||||||
{
|
{
|
||||||
/* Unicast tunnel -
|
/* Unicast tunnel -
|
||||||
* source the FIB entry for the tunnel's destination
|
* Track the FIB entry for the tunnel's destination.
|
||||||
* and become a child thereof. The tunnel will then get poked
|
* The tunnel will then get poked
|
||||||
* when the forwarding for the entry updates, and the tunnel can
|
* when the forwarding for the entry updates, and the tunnel can
|
||||||
* re-stack accordingly
|
* re-stack accordingly
|
||||||
*/
|
*/
|
||||||
vtep_addr_ref (&t->src);
|
vtep_addr_ref (&t->src);
|
||||||
t->fib_entry_index = fib_table_entry_special_add
|
t->fib_entry_index = fib_entry_track (t->encap_fib_index,
|
||||||
(t->encap_fib_index, &tun_dst_pfx, FIB_SOURCE_RR,
|
&tun_dst_pfx,
|
||||||
FIB_ENTRY_FLAG_NONE);
|
gtm->fib_node_type,
|
||||||
t->sibling_index = fib_entry_child_add
|
t - gtm->tunnels,
|
||||||
(t->fib_entry_index, gtm->fib_node_type, t - gtm->tunnels);
|
&t->sibling_index);
|
||||||
gtpu_tunnel_restack_dpo (t);
|
gtpu_tunnel_restack_dpo (t);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -602,8 +603,7 @@ int vnet_gtpu_add_del_tunnel
|
|||||||
if (!ip46_address_is_multicast (&t->dst))
|
if (!ip46_address_is_multicast (&t->dst))
|
||||||
{
|
{
|
||||||
vtep_addr_unref (&t->src);
|
vtep_addr_unref (&t->src);
|
||||||
fib_entry_child_remove (t->fib_entry_index, t->sibling_index);
|
fib_entry_untrack (t->fib_entry_index, t->sibling_index);
|
||||||
fib_table_entry_delete_index (t->fib_entry_index, FIB_SOURCE_RR);
|
|
||||||
}
|
}
|
||||||
else if (vtep_addr_unref (&t->dst) == 0)
|
else if (vtep_addr_unref (&t->dst) == 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user