OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EvpnAgentRouteTable Class Reference

#include <evpn_route.h>

Inheritance diagram for EvpnAgentRouteTable:
Collaboration diagram for EvpnAgentRouteTable:

Public Member Functions

 EvpnAgentRouteTable (DB *db, const std::string &name)
 
virtual ~EvpnAgentRouteTable ()
 
virtual std::string GetTableName () const
 
virtual Agent::RouteTableType GetTableType () const
 
virtual AgentSandeshPtr GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context)
 
void AddOvsPeerMulticastRouteReq (const Peer *peer, uint32_t vxlan_id, const std::string &vn_name, Ip4Address vtep, Ip4Address tor_ip)
 
void AddOvsPeerMulticastRoute (const Peer *peer, uint32_t vxlan_id, const std::string &vn_name, Ip4Address vtep, Ip4Address tor_ip, bool ha_stale)
 
void AddReceiveRouteReq (const Peer *peer, const std::string &vrf_name, uint32_t label, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, const std::string &vn_name, const PathPreference &pref)
 
void AddReceiveRoute (const Peer *peer, const std::string &vrf_name, uint32_t label, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, const std::string &vn_name, const PathPreference &pref)
 
void AddControllerReceiveRouteReq (const Peer *peer, const std::string &vrf_name, uint32_t label, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, const std::string &vn_name, const PathPreference &pref, uint64_t sequence_number)
 
void AddLocalVmRouteReq (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, LocalVmRoute *data)
 
void AddLocalVmRoute (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *intf, const IpAddress &ip, uint32_t label, const std::string &vn_name, const SecurityGroupList &sg_id_list, const TagList &tag_id_list, const PathPreference &path_pref, uint32_t ethernet_tag, bool etree_leaf, const std::string &interface_name)
 
void AddLocalVmRouteReq (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *intf, const IpAddress &ip, uint32_t label, const std::string &vn_name, const SecurityGroupList &sg_id_list, const TagList &tag_id_list, const PathPreference &path_pref, uint32_t ethernet_tag, bool etree_leaf)
 
void AddClonedLocalPathReq (const Peer *peer, const string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, ClonedLocalPath *data)
 
void AddType5Route (const Peer *peer, const std::string &vrf_name, const IpAddress &ip_addr, uint32_t ethernet_tag, EvpnRoutingData *data, uint8_t plen=0)
 
void DeleteOvsPeerMulticastRouteReq (const Peer *peer, uint32_t vxlan_id, const Ip4Address &tor_ip)
 
void DeleteOvsPeerMulticastRoute (const Peer *peer, uint32_t vxlan_id, const Ip4Address &tor_ip)
 
void DelLocalVmRoute (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *intf, const IpAddress &ip, uint32_t ethernet_tag)
 
EvpnRouteEntryFindRoute (const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
 
EvpnRouteEntryFindRouteNoLock (const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
 
- Public Member Functions inherited from AgentRouteTable
 AgentRouteTable (DB *db, const std::string &name)
 
virtual ~AgentRouteTable ()
 
virtual int PartitionCount () const
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *k) const
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) const
 
virtual void ProcessDelete (AgentRoute *rt)
 
virtual void ProcessAdd (AgentRoute *rt)
 
virtual void NotifyEntry (AgentRoute *entry)
 
virtual SandeshTraceBufferPtr GetOperDBTraceBuf () const
 
UnresolvedRouteTree::const_iterator unresolved_route_begin () const
 
UnresolvedRouteTree::const_iterator unresolved_route_end () const
 
int unresolved_route_size () const
 
void AddUnresolvedNH (const NextHop *)
 
void RemoveUnresolvedNH (const NextHop *)
 
void EvaluateUnresolvedNH (void)
 
UnresolvedNHTree::const_iterator unresolved_nh_begin () const
 
UnresolvedNHTree::const_iterator unresolved_nh_end () const
 
void EvaluateUnresolvedRoutes (void)
 
void AddUnresolvedRoute (const AgentRoute *rt)
 
void RemoveUnresolvedRoute (const AgentRoute *rt)
 
Agentagent () const
 
const std::string & vrf_name () const
 
uint32_t vrf_id () const
 
VrfEntryvrf_entry () const
 
AgentRouteFindActiveEntry (const AgentRouteKey *key)
 
AgentRouteFindActiveEntryNoLock (const AgentRouteKey *key)
 
AgentRouteFindActiveEntry (const AgentRoute *key)
 
AgentRouteFindActiveEntryNoLock (const AgentRoute *key)
 
void SetVrf (VrfEntry *vrf)
 
bool DelExplicitRouteWalkerCb (DBTablePartBase *part, DBEntryBase *entry)
 
LifetimeActordeleter ()
 
void ManagedDelete ()
 
virtual void RetryDelete ()
 
void Process (DBRequest &req)
 
void AddChangeInput (DBTablePartition *part, VrfEntry *vrf, AgentRoute *rt, AgentRouteKey *key, AgentRouteData *data)
 
AgentRouteLocateRoute (DBTablePartition *part, VrfEntry *vrf, AgentRoute *rt, AgentRouteKey *key, AgentRouteData *data, bool *notify)
 
- Public Member Functions inherited from RouteTable
 RouteTable (DB *db, const std::string &name)
 
- Public Member Functions inherited from DBTable
 DBTable (DB *db, const std::string &name)
 
virtual ~DBTable ()
 
void Init ()
 
virtual DBTablePartitionAllocPartition (int index)
 
virtual DBEntryAdd (const DBRequest *req)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool Delete (DBEntry *entry, const DBRequest *req)
 
void NotifyAllEntries ()
 
DBEntryFind (const DBEntry *entry)
 
const DBEntryFind (const DBEntry *entry) const
 
DBEntryFind (const DBRequestKey *key, int id=-1)
 
const DBEntryFind (const DBRequestKey *key, int id=-1) const
 
DBEntryFindNoLock (const DBEntry *entry)
 
DBEntryFindNoLock (const DBRequestKey *key)
 
virtual DBTablePartBaseGetTablePartition (const DBRequestKey *key)
 
virtual const DBTablePartBaseGetTablePartition (const DBRequestKey *key) const
 
virtual DBTablePartBaseGetTablePartition (const DBEntryBase *entry)
 
virtual const DBTablePartBaseGetTablePartition (const DBEntryBase *entry) const
 
virtual DBTablePartBaseGetTablePartition (const int index)
 
virtual const DBTablePartBaseGetTablePartition (const int index) const
 
virtual void Change (DBEntryBase *entry)
 
virtual size_t Size () const
 
DBTableWalkRef AllocWalker (WalkFn walk_fn, WalkCompleteFn walk_complete)
 
void ReleaseWalker (DBTableWalkRef &walk)
 
void WalkTable (DBTableWalkRef walk)
 
void WalkAgain (DBTableWalkRef walk)
 
void SetWalkIterationToYield (int count)
 
int GetWalkIterationToYield ()
 
void SetWalkTaskId (int task_id)
 
int GetWalkerTaskId ()
 
- Public Member Functions inherited from DBTableBase
 DBTableBase (DB *db, const std::string &name)
 
virtual ~DBTableBase ()
 
bool Enqueue (DBRequest *req)
 
void EnqueueRemove (DBEntryBase *db_entry)
 
virtual void AddRemoveCallback (const DBEntryBase *entry, bool add) const
 
ListenerId Register (ChangeCallback callback, const std::string &name="unspecified")
 
void Unregister (ListenerId listener)
 
void RunNotify (DBTablePartBase *tpart, DBEntryBase *entry)
 
void AddToDBStateCount (ListenerId listener, int count)
 
uint64_t GetDBStateCount (ListenerId listener)
 
bool empty () const
 
virtual bool MayDelete () const
 
DBdatabase ()
 
const DBdatabase () const
 
const std::string & name () const
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void FillListeners (std::vector< ShowTableListener > *listeners) const
 
uint64_t enqueue_count () const
 
void incr_enqueue_count ()
 
void reset_enqueue_count ()
 
uint64_t input_count () const
 
void incr_input_count ()
 
void reset_input_count ()
 
uint64_t notify_count () const
 
void incr_notify_count ()
 
void reset_notify_count ()
 
bool HasWalkers () const
 
uint64_t walker_count () const
 
void incr_walker_count ()
 
uint64_t decr_walker_count ()
 
uint64_t walk_request_count () const
 
uint64_t walk_complete_count () const
 
uint64_t walk_cancel_count () const
 
uint64_t walk_again_count () const
 
uint64_t walk_count () const
 
void incr_walk_request_count ()
 
void incr_walk_complete_count ()
 
void incr_walk_cancel_count ()
 
void incr_walk_again_count ()
 
void incr_walk_count ()
 

Static Public Member Functions

static uint32_t ComputeHostIpPlen (const IpAddress &addr)
 
static DBTableBaseCreateTable (DB *db, const std::string &name)
 
static void ResyncVmRoute (const Peer *peer, const string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, AgentRouteData *data)
 
static void AddRemoteVmRouteReq (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag, AgentRouteData *data)
 
static void AddRemoteVmRoute (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag, AgentRouteData *data)
 
static void DeleteReq (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag, AgentRouteData *data)
 
static void Delete (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag)
 
static void DeleteType5Req (const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
 
static EvpnRouteEntryFindRoute (const Agent *agent, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
 
- Static Public Member Functions inherited from AgentRouteTable
static bool PathSelection (const Path &path1, const Path &path2)
 
static const std::string & GetSuffix (Agent::RouteTableType type)
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (EvpnAgentRouteTable)
 
void AddOvsPeerMulticastRouteInternal (const Peer *peer, uint32_t vxlan_id, const std::string &vn_name, Ip4Address vtep, Ip4Address tor_ip, bool enqueue, bool ha_stale)
 
void DeleteOvsPeerMulticastRouteInternal (const Peer *peer, uint32_t vxlan_id, const Ip4Address &tor_ip, bool enqueue)
 

Additional Inherited Members

- Public Types inherited from AgentRouteTable
typedef std::set< const
AgentRoute *, RouteComparator
UnresolvedRouteTree
 
typedef std::set< const
NextHop *, NHComparator
UnresolvedNHTree
 
- Public Types inherited from DBTable
typedef boost::intrusive_ptr
< DBTableWalk
DBTableWalkRef
 
typedef boost::function< bool(DBTablePartBase
*, DBEntryBase *)> 
WalkFn
 
typedef boost::function< void(DBTableWalkRef,
DBTableBase *)> 
WalkCompleteFn
 
- Public Types inherited from DBTableBase
typedef boost::function< void(DBTablePartBase
*, DBEntryBase *)> 
ChangeCallback
 
typedef int ListenerId
 
- Static Public Attributes inherited from AgentRouteTable
static const int kPartitionCount = 1
 
- Static Public Attributes inherited from DBTable
static const int kIterationToYield = 256
 
- Static Public Attributes inherited from DBTableBase
static const int kInvalidId = -1
 

Detailed Description

Definition at line 13 of file vnsw/agent/oper/evpn_route.h.

Constructor & Destructor Documentation

EvpnAgentRouteTable::EvpnAgentRouteTable ( DB db,
const std::string &  name 
)
inline

Definition at line 15 of file vnsw/agent/oper/evpn_route.h.

virtual EvpnAgentRouteTable::~EvpnAgentRouteTable ( )
inlinevirtual

Definition at line 18 of file vnsw/agent/oper/evpn_route.h.

Member Function Documentation

void EvpnAgentRouteTable::AddClonedLocalPathReq ( const Peer peer,
const string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  ethernet_tag,
ClonedLocalPath data 
)

Definition at line 462 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddControllerReceiveRouteReq ( const Peer peer,
const std::string &  vrf_name,
uint32_t  label,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  ethernet_tag,
const std::string &  vn_name,
const PathPreference pref,
uint64_t  sequence_number 
)

Definition at line 170 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddLocalVmRoute ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const VmInterface intf,
const IpAddress ip,
uint32_t  label,
const std::string &  vn_name,
const SecurityGroupList sg_id_list,
const TagList tag_id_list,
const PathPreference path_pref,
uint32_t  ethernet_tag,
bool  etree_leaf,
const std::string &  interface_name 
)

Definition at line 243 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddLocalVmRouteReq ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  ethernet_tag,
LocalVmRoute data 
)
void EvpnAgentRouteTable::AddLocalVmRouteReq ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const VmInterface intf,
const IpAddress ip,
uint32_t  label,
const std::string &  vn_name,
const SecurityGroupList sg_id_list,
const TagList tag_id_list,
const PathPreference path_pref,
uint32_t  ethernet_tag,
bool  etree_leaf 
)
void EvpnAgentRouteTable::AddOvsPeerMulticastRoute ( const Peer peer,
uint32_t  vxlan_id,
const std::string &  vn_name,
Ip4Address  vtep,
Ip4Address  tor_ip,
bool  ha_stale 
)

Definition at line 151 of file vnsw/agent/oper/evpn_route.cc.

void EvpnAgentRouteTable::AddOvsPeerMulticastRouteInternal ( const Peer peer,
uint32_t  vxlan_id,
const std::string &  vn_name,
Ip4Address  vtep,
Ip4Address  tor_ip,
bool  enqueue,
bool  ha_stale 
)
private

Definition at line 119 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddOvsPeerMulticastRouteReq ( const Peer peer,
uint32_t  vxlan_id,
const std::string &  vn_name,
Ip4Address  vtep,
Ip4Address  tor_ip 
)

Definition at line 161 of file vnsw/agent/oper/evpn_route.cc.

void EvpnAgentRouteTable::AddReceiveRoute ( const Peer peer,
const std::string &  vrf_name,
uint32_t  label,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  ethernet_tag,
const std::string &  vn_name,
const PathPreference pref 
)

Definition at line 209 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddReceiveRouteReq ( const Peer peer,
const std::string &  vrf_name,
uint32_t  label,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  ethernet_tag,
const std::string &  vn_name,
const PathPreference pref 
)

Definition at line 192 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddRemoteVmRoute ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  plen,
uint32_t  ethernet_tag,
AgentRouteData data 
)
static

Definition at line 402 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddRemoteVmRouteReq ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  plen,
uint32_t  ethernet_tag,
AgentRouteData data 
)
static

Definition at line 387 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::AddType5Route ( const Peer peer,
const std::string &  vrf_name,
const IpAddress ip_addr,
uint32_t  ethernet_tag,
EvpnRoutingData data,
uint8_t  plen = 0 
)

Definition at line 417 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

uint32_t EvpnAgentRouteTable::ComputeHostIpPlen ( const IpAddress addr)
static

Definition at line 476 of file vnsw/agent/oper/evpn_route.cc.

DBTableBase * EvpnAgentRouteTable::CreateTable ( DB db,
const std::string &  name 
)
static

Definition at line 74 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::Delete ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  ethernet_tag 
)
static

Definition at line 450 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::DeleteOvsPeerMulticastRoute ( const Peer peer,
uint32_t  vxlan_id,
const Ip4Address tor_ip 
)

Definition at line 348 of file vnsw/agent/oper/evpn_route.cc.

void EvpnAgentRouteTable::DeleteOvsPeerMulticastRouteInternal ( const Peer peer,
uint32_t  vxlan_id,
const Ip4Address tor_ip,
bool  enqueue 
)
private

Definition at line 322 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

void EvpnAgentRouteTable::DeleteOvsPeerMulticastRouteReq ( const Peer peer,
uint32_t  vxlan_id,
const Ip4Address tor_ip 
)

Definition at line 342 of file vnsw/agent/oper/evpn_route.cc.

void EvpnAgentRouteTable::DeleteReq ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  plen,
uint32_t  ethernet_tag,
AgentRouteData data 
)
static

Definition at line 437 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

static void EvpnAgentRouteTable::DeleteType5Req ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  plen,
uint32_t  ethernet_tag 
)
static
void EvpnAgentRouteTable::DelLocalVmRoute ( const Peer peer,
const std::string &  vrf_name,
const MacAddress mac,
const VmInterface intf,
const IpAddress ip,
uint32_t  ethernet_tag 
)

Definition at line 354 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:

EvpnAgentRouteTable::DISALLOW_COPY_AND_ASSIGN ( EvpnAgentRouteTable  )
private
EvpnRouteEntry * EvpnAgentRouteTable::FindRoute ( const MacAddress mac,
const IpAddress ip_addr,
uint32_t  plen,
uint32_t  ethernet_tag 
)

Definition at line 81 of file vnsw/agent/oper/evpn_route.cc.

static EvpnRouteEntry* EvpnAgentRouteTable::FindRoute ( const Agent agent,
const std::string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  plen,
uint32_t  ethernet_tag 
)
static
EvpnRouteEntry * EvpnAgentRouteTable::FindRouteNoLock ( const MacAddress mac,
const IpAddress ip_addr,
uint32_t  plen,
uint32_t  ethernet_tag 
)

Definition at line 91 of file vnsw/agent/oper/evpn_route.cc.

AgentSandeshPtr EvpnAgentRouteTable::GetAgentSandesh ( const AgentSandeshArguments args,
const std::string &  context 
)
virtual

Reimplemented from AgentRouteTable.

Definition at line 647 of file vnsw/agent/oper/evpn_route.cc.

virtual std::string EvpnAgentRouteTable::GetTableName ( ) const
inlinevirtual

Implements AgentRouteTable.

Definition at line 20 of file vnsw/agent/oper/evpn_route.h.

virtual Agent::RouteTableType EvpnAgentRouteTable::GetTableType ( ) const
inlinevirtual

Implements AgentRouteTable.

Definition at line 21 of file vnsw/agent/oper/evpn_route.h.

void EvpnAgentRouteTable::ResyncVmRoute ( const Peer peer,
const string &  vrf_name,
const MacAddress mac,
const IpAddress ip_addr,
uint32_t  ethernet_tag,
AgentRouteData data 
)
static

Definition at line 370 of file vnsw/agent/oper/evpn_route.cc.

Here is the call graph for this function:


The documentation for this class was generated from the following files: