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

#include <vrf.h>

Inheritance diagram for VrfEntry:
Collaboration diagram for VrfEntry:

Classes

class  DeleteActor
 

Public Member Functions

 VrfEntry (const string &name, uint32_t flags, Agent *agent)
 
virtual ~VrfEntry ()
 
virtual bool IsLess (const DBEntry &rhs) const
 
virtual KeyPtr GetDBRequestKey () const
 
virtual void SetKey (const DBRequestKey *key)
 
virtual string ToString () const
 
const uint32_t vrf_id () const
 
const string & GetName () const
 
VnEntryvn () const
 
VnEntrysi_vn_ref () const
 
uint32_t GetRefCount () const
 
uint32_t flags () const
 
void set_flags (uint32_t flags)
 
bool are_flags_set (const VrfData::VrfEntryFlags &flags) const
 
void set_table_label (uint32_t label)
 
uint32_t table_label () const
 
const std::string & GetExportName ()
 
bool learning_enabled () const
 
bool ShouldExportRoute () const
 
bool layer2_control_word () const
 
const uint32_t hbf_rintf () const
 
const uint32_t hbf_lintf () const
 
bool DBEntrySandesh (Sandesh *sresp, std::string &name) const
 
InetUnicastRouteEntryGetUcRoute (const IpAddress &addr) const
 
InetUnicastRouteEntryGetUcRoute (const InetUnicastRouteEntry &rt_key) const
 
bool UpdateVxlanId (Agent *agent, uint32_t new_vxlan_id)
 
LifetimeActordeleter ()
 
virtual void RetryDelete ()
 
bool AllRouteTablesEmpty () const
 
void SendObjectLog (AgentLogEvent::type event) const
 
void StartDeleteTimer ()
 
bool DeleteTimeout ()
 
void CancelDeleteTimer ()
 
bool ResetVrfDelete ()
 
void PostAdd ()
 
void AddNH (Ip4Address ip, uint8_t plen, ComponentNHData *nh_data)
 
void DeleteNH (Ip4Address ip, uint8_t plen, ComponentNHData *nh_data)
 
uint32_t GetNHCount (Ip4Address ip, uint8_t plen)
 
void UpdateLabel (Ip4Address ip, uint8_t plen, uint32_t label)
 
uint32_t GetLabel (Ip4Address ip, uint8_t plen)
 
uint32_t vxlan_id () const
 
std::vector< ComponentNHData > * GetNHList (Ip4Address ip, uint8_t plen)
 
bool FindNH (const Ip4Address &ip, uint8_t plen, const ComponentNHData &nh_data)
 
InetUnicastAgentRouteTableGetInet4UnicastRouteTable () const
 
InetUnicastAgentRouteTableGetInet4MplsUnicastRouteTable () const
 
AgentRouteTableGetInet4MulticastRouteTable () const
 
AgentRouteTableGetEvpnRouteTable () const
 
AgentRouteTableGetBridgeRouteTable () const
 
InetUnicastAgentRouteTableGetInet6UnicastRouteTable () const
 
AgentRouteTableGetRouteTable (uint8_t table_type) const
 
void CreateTableLabel (bool learning_enabled, bool l2, bool flod_unknown_unicast, bool layer2_control_word)
 
const std::string GetTableTypeString (uint8_t table_type) const
 
bool AllRouteTableDeleted () const
 
bool RouteTableDeleted (uint8_t table_type) const
 
void SetRouteTableDeleted (uint8_t table_type)
 
void DeleteRouteTables ()
 
void ResyncRoutes ()
 
bool allow_route_add_on_deleted_vrf () const
 
void set_allow_route_add_on_deleted_vrf (bool val)
 
InetUnicastAgentRouteTableGetInetUnicastRouteTable (const IpAddress &addr) const
 
void ReleaseWalker ()
 
uint32_t isid () const
 
const std::string bmac_vrf_name () const
 
bool IsPbbVrf () const
 
uint32_t mac_aging_time () const
 
void set_mac_aging_time (uint32_t aging_time)
 
VrfEntryforwarding_vrf () const
 
int rd () const
 
void set_rd (int rd)
 
void set_routing_vrf (bool val)
 
bool routing_vrf () const
 
void set_hbf_rintf (uint32_t idx)
 
void set_hbf_lintf (uint32_t idx)
 
- Public Member Functions inherited from AgentOperDBEntry
 AgentOperDBEntry ()
 
virtual ~AgentOperDBEntry ()
 
IFMapNodeifmap_node () const
 
void SetIFMapNodeState (IFMapDependencyManager::IFMapNodePtr sref)
 
- Public Member Functions inherited from AgentDBEntry
 AgentDBEntry ()
 
virtual ~AgentDBEntry ()
 
void SetRefState () const
 
void ClearRefState () const
 
bool IsActive () const
 
DBStateGetAgentDBEntryState (int listener_id)
 
const DBStateGetAgentDBEntryState (int listener_id) const
 
virtual void AllocateResources (ResourceManager *resource_manager)
 
virtual void FreeResources (ResourceManager *resource_manager)
 
- Public Member Functions inherited from DBEntry
 DBEntry ()
 
virtual ~DBEntry ()
 
bool operator< (const DBEntry &rhs) const
 
- Public Member Functions inherited from DBEntryBase
 DBEntryBase ()
 
virtual ~DBEntryBase ()
 
virtual bool IsMoreSpecific (const std::string &match) const
 
virtual bool IsLessSpecific (const std::string &match) const
 
void SetState (DBTableBase *tbl_base, ListenerId listener, DBState *state)
 
void ClearState (DBTableBase *tbl_base, ListenerId listener)
 
DBStateGetState (DBTableBase *tbl_base, ListenerId listener) const
 
const DBStateGetState (const DBTableBase *tbl_base, ListenerId listener) const
 
bool is_state_empty (DBTablePartBase *tpart)
 
bool is_state_empty_unlocked (DBTablePartBase *tpart)
 
void Delete ()
 
void MarkDelete ()
 
void ClearDelete ()
 
bool IsDeleted () const
 
void set_onlist ()
 
void clear_onlist ()
 
bool is_onlist ()
 
void SetOnRemoveQ ()
 
bool IsOnRemoveQ ()
 
void ClearOnRemoveQ ()
 
void set_last_change_at (uint64_t time)
 
void set_last_change_at_to_now ()
 
const uint64_t last_change_at () const
 
const std::string last_change_at_str () const
 
void set_last_update_at (uint64_t time)
 
void set_last_update_at_to_now ()
 
const uint64_t last_update_at () const
 
DBTablePartBaseget_table_partition () const
 
void set_table_partition (DBTablePartBase *tpart)
 
DBTableBaseget_table () const
 
void Notify ()
 

Static Public Attributes

static const uint32_t kInvalidIndex = 0xFFFFFFFF
 
static const uint32_t kDeleteTimeout = 900 * 1000
 

Private Member Functions

void CreateRouteTables ()
 
void SetNotify ()
 
int RDInstanceId (bool tor_agent_enabled) const
 
 DISALLOW_COPY_AND_ASSIGN (VrfEntry)
 
- Private Member Functions inherited from AgentRefCount< VrfEntry >
uint32_t GetRefCount () const
 
 AgentRefCount ()
 
 AgentRefCount (const AgentRefCount &)
 
AgentRefCountoperator= (const AgentRefCount &)
 
virtual ~AgentRefCount ()
 
void swap (AgentRefCount &)
 

Private Attributes

string name_
 
uint32_t id_
 
uint32_t flags_
 
VnEntryRef vn_
 
VnEntryRef si_vn_ref_
 
NextHopRef nh_
 
DBTableWalker::WalkId walkid_
 
boost::scoped_ptr< DeleteActordeleter_
 
AgentRouteTablert_table_db_ [Agent::ROUTE_TABLE_MAX]
 
Timerdelete_timeout_timer_
 
uint32_t table_label_
 
uint32_t vxlan_id_
 
uint32_t rt_table_delete_bmap_
 
IFMapDependencyManager::IFMapNodePtr vrf_node_ptr_
 
AgentRouteWalkerPtr route_resync_walker_
 
bool allow_route_add_on_deleted_vrf_
 
string bmac_vrf_name_
 
uint32_t isid_
 
tbb::atomic< uint32_t > mac_aging_time_
 
tbb::mutex delete_reuse_mutex_
 
bool learning_enabled_
 
bool layer2_control_word_
 
bool l2_
 
VrfEntryRef forwarding_vrf_
 
int rd_
 
bool routing_vrf_
 
uint32_t retries_
 
uint32_t hbf_rintf_
 
uint32_t hbf_lintf_
 
bool deleted_
 
- Private Attributes inherited from AgentRefCount< VrfEntry >
tbb::mutex back_ref_mutex_
 
std::set< IntrusiveReferrerback_ref_set_
 

Friends

class VrfTable
 

Additional Inherited Members

- Public Types inherited from AgentDBEntry
typedef boost::intrusive_ptr
< AgentDBEntry
AgentDBEntyRef
 
- Public Types inherited from DBEntryBase
typedef DBTableBase::ListenerId ListenerId
 
typedef std::unique_ptr
< DBRequestKey
KeyPtr
 
- Public Attributes inherited from DBEntryBase
boost::intrusive::list_member_hook chg_list_
 

Detailed Description

Definition at line 86 of file vrf.h.

Constructor & Destructor Documentation

VrfEntry::VrfEntry ( const string &  name,
uint32_t  flags,
Agent agent 
)

Definition at line 64 of file vrf.cc.

VrfEntry::~VrfEntry ( )
virtual

Definition at line 79 of file vrf.cc.

Here is the call graph for this function:

Member Function Documentation

void VrfEntry::AddNH ( Ip4Address  ip,
uint8_t  plen,
ComponentNHData *  nh_data 
)
bool VrfEntry::allow_route_add_on_deleted_vrf ( ) const
inline

Definition at line 186 of file vrf.h.

bool VrfEntry::AllRouteTableDeleted ( ) const

Definition at line 268 of file vrf.cc.

bool VrfEntry::AllRouteTablesEmpty ( ) const

Definition at line 555 of file vrf.cc.

bool VrfEntry::are_flags_set ( const VrfData::VrfEntryFlags flags) const
inline

Definition at line 110 of file vrf.h.

const std::string VrfEntry::bmac_vrf_name ( ) const
inline

Definition at line 201 of file vrf.h.

void VrfEntry::CancelDeleteTimer ( )

Definition at line 461 of file vrf.cc.

Here is the call graph for this function:

void VrfEntry::CreateRouteTables ( )
private

Definition at line 141 of file vrf.cc.

Here is the call graph for this function:

void VrfEntry::CreateTableLabel ( bool  learning_enabled,
bool  l2,
bool  flod_unknown_unicast,
bool  layer2_control_word 
)

Definition at line 118 of file vrf.cc.

Here is the call graph for this function:

bool VrfEntry::DBEntrySandesh ( Sandesh sresp,
std::string &  name 
) const
virtual

Implements AgentDBEntry.

Definition at line 342 of file vrf.cc.

Here is the call graph for this function:

void VrfEntry::DeleteNH ( Ip4Address  ip,
uint8_t  plen,
ComponentNHData *  nh_data 
)
LifetimeActor * VrfEntry::deleter ( )

Definition at line 264 of file vrf.cc.

void VrfEntry::DeleteRouteTables ( )

Definition at line 154 of file vrf.cc.

Here is the call graph for this function:

bool VrfEntry::DeleteTimeout ( )

Definition at line 417 of file vrf.cc.

Here is the call graph for this function:

VrfEntry::DISALLOW_COPY_AND_ASSIGN ( VrfEntry  )
private
bool VrfEntry::FindNH ( const Ip4Address ip,
uint8_t  plen,
const ComponentNHData &  nh_data 
)
uint32_t VrfEntry::flags ( ) const
inline

Definition at line 108 of file vrf.h.

VrfEntry* VrfEntry::forwarding_vrf ( ) const
inline

Definition at line 217 of file vrf.h.

AgentRouteTable * VrfEntry::GetBridgeRouteTable ( ) const

Definition at line 334 of file vrf.cc.

Here is the call graph for this function:

DBEntryBase::KeyPtr VrfEntry::GetDBRequestKey ( ) const
virtual

Implements DBEntryBase.

Definition at line 227 of file vrf.cc.

AgentRouteTable * VrfEntry::GetEvpnRouteTable ( ) const

Definition at line 330 of file vrf.cc.

Here is the call graph for this function:

const std::string& VrfEntry::GetExportName ( )
inline

Definition at line 121 of file vrf.h.

Here is the call graph for this function:

InetUnicastAgentRouteTable * VrfEntry::GetInet4MplsUnicastRouteTable ( ) const

Definition at line 323 of file vrf.cc.

Here is the call graph for this function:

AgentRouteTable * VrfEntry::GetInet4MulticastRouteTable ( ) const

Definition at line 326 of file vrf.cc.

Here is the call graph for this function:

InetUnicastAgentRouteTable * VrfEntry::GetInet4UnicastRouteTable ( ) const

Definition at line 319 of file vrf.cc.

Here is the call graph for this function:

InetUnicastAgentRouteTable * VrfEntry::GetInet6UnicastRouteTable ( ) const

Definition at line 338 of file vrf.cc.

Here is the call graph for this function:

InetUnicastAgentRouteTable * VrfEntry::GetInetUnicastRouteTable ( const IpAddress addr) const

Definition at line 575 of file vrf.cc.

Here is the call graph for this function:

uint32_t VrfEntry::GetLabel ( Ip4Address  ip,
uint8_t  plen 
)
const string& VrfEntry::GetName ( ) const
inline

Definition at line 100 of file vrf.h.

uint32_t VrfEntry::GetNHCount ( Ip4Address  ip,
uint8_t  plen 
)
std::vector<ComponentNHData>* VrfEntry::GetNHList ( Ip4Address  ip,
uint8_t  plen 
)
uint32_t VrfEntry::GetRefCount ( ) const
inlinevirtual

Implements AgentDBEntry.

Definition at line 104 of file vrf.h.

Here is the call graph for this function:

AgentRouteTable * VrfEntry::GetRouteTable ( uint8_t  table_type) const

Definition at line 285 of file vrf.cc.

Here is the call graph for this function:

const std::string VrfEntry::GetTableTypeString ( uint8_t  table_type) const

Definition at line 289 of file vrf.cc.

InetUnicastRouteEntry * VrfEntry::GetUcRoute ( const IpAddress addr) const

Definition at line 237 of file vrf.cc.

Here is the call graph for this function:

InetUnicastRouteEntry * VrfEntry::GetUcRoute ( const InetUnicastRouteEntry rt_key) const

Definition at line 250 of file vrf.cc.

Here is the call graph for this function:

const uint32_t VrfEntry::hbf_lintf ( ) const
inline

Definition at line 144 of file vrf.h.

const uint32_t VrfEntry::hbf_rintf ( ) const
inline

Definition at line 143 of file vrf.h.

uint32_t VrfEntry::isid ( ) const
inline

Definition at line 197 of file vrf.h.

bool VrfEntry::IsLess ( const DBEntry rhs) const
virtual

Implements DBEntry.

Definition at line 99 of file vrf.cc.

bool VrfEntry::IsPbbVrf ( ) const
inline

Definition at line 205 of file vrf.h.

Here is the call graph for this function:

bool VrfEntry::layer2_control_word ( ) const
inline

Definition at line 139 of file vrf.h.

bool VrfEntry::learning_enabled ( ) const
inline

Definition at line 128 of file vrf.h.

uint32_t VrfEntry::mac_aging_time ( ) const
inline

Definition at line 209 of file vrf.h.

void VrfEntry::PostAdd ( )
virtual

Reimplemented from AgentDBEntry.

Definition at line 168 of file vrf.cc.

Here is the call graph for this function:

int VrfEntry::rd ( ) const
inline

Definition at line 220 of file vrf.h.

int VrfEntry::RDInstanceId ( bool  tor_agent_enabled) const
private

Definition at line 530 of file vrf.cc.

Here is the call graph for this function:

void VrfEntry::ReleaseWalker ( )

Definition at line 566 of file vrf.cc.

Here is the call graph for this function:

bool VrfEntry::ResetVrfDelete ( )

Definition at line 465 of file vrf.cc.

Here is the call graph for this function:

void VrfEntry::ResyncRoutes ( )

Definition at line 516 of file vrf.cc.

void VrfEntry::RetryDelete ( )
virtual

Definition at line 544 of file vrf.cc.

Here is the call graph for this function:

bool VrfEntry::RouteTableDeleted ( uint8_t  table_type) const

Definition at line 277 of file vrf.cc.

bool VrfEntry::routing_vrf ( ) const
inline

Definition at line 223 of file vrf.h.

void VrfEntry::SendObjectLog ( AgentLogEvent::type  event) const

Definition at line 391 of file vrf.cc.

void VrfEntry::set_allow_route_add_on_deleted_vrf ( bool  val)
inline

Definition at line 191 of file vrf.h.

void VrfEntry::set_flags ( uint32_t  flags)
inline

Definition at line 109 of file vrf.h.

Here is the call graph for this function:

void VrfEntry::set_hbf_lintf ( uint32_t  idx)
inline

Definition at line 225 of file vrf.h.

void VrfEntry::set_hbf_rintf ( uint32_t  idx)
inline

Definition at line 224 of file vrf.h.

void VrfEntry::set_mac_aging_time ( uint32_t  aging_time)
inline

Definition at line 213 of file vrf.h.

void VrfEntry::set_rd ( int  rd)
inline

Definition at line 221 of file vrf.h.

Here is the call graph for this function:

void VrfEntry::set_routing_vrf ( bool  val)
inline

Definition at line 222 of file vrf.h.

void VrfEntry::set_table_label ( uint32_t  label)
inline

Definition at line 114 of file vrf.h.

void VrfEntry::SetKey ( const DBRequestKey key)
virtual

Implements DBEntry.

Definition at line 232 of file vrf.cc.

void VrfEntry::SetNotify ( )
private

Definition at line 583 of file vrf.cc.

Here is the call graph for this function:

void VrfEntry::SetRouteTableDeleted ( uint8_t  table_type)

Definition at line 281 of file vrf.cc.

bool VrfEntry::ShouldExportRoute ( ) const
inline

Definition at line 132 of file vrf.h.

Here is the call graph for this function:

VnEntry* VrfEntry::si_vn_ref ( ) const
inline

Definition at line 102 of file vrf.h.

void VrfEntry::StartDeleteTimer ( )

Definition at line 451 of file vrf.cc.

Here is the call graph for this function:

uint32_t VrfEntry::table_label ( ) const
inline

Definition at line 117 of file vrf.h.

string VrfEntry::ToString ( ) const
virtual

Implements DBEntryBase.

Definition at line 104 of file vrf.cc.

void VrfEntry::UpdateLabel ( Ip4Address  ip,
uint8_t  plen,
uint32_t  label 
)
bool VrfEntry::UpdateVxlanId ( Agent agent,
uint32_t  new_vxlan_id 
)

Definition at line 108 of file vrf.cc.

VnEntry* VrfEntry::vn ( ) const
inline

Definition at line 101 of file vrf.h.

const uint32_t VrfEntry::vrf_id ( ) const
inline

Definition at line 99 of file vrf.h.

uint32_t VrfEntry::vxlan_id ( ) const
inline

Definition at line 165 of file vrf.h.

Friends And Related Function Documentation

friend class VrfTable
friend

Definition at line 228 of file vrf.h.

Member Data Documentation

bool VrfEntry::allow_route_add_on_deleted_vrf_
private

Definition at line 250 of file vrf.h.

string VrfEntry::bmac_vrf_name_
private

Definition at line 251 of file vrf.h.

tbb::mutex VrfEntry::delete_reuse_mutex_
private

Definition at line 254 of file vrf.h.

Timer* VrfEntry::delete_timeout_timer_
private

Definition at line 244 of file vrf.h.

bool VrfEntry::deleted_
private

Definition at line 264 of file vrf.h.

boost::scoped_ptr<DeleteActor> VrfEntry::deleter_
private

Definition at line 242 of file vrf.h.

uint32_t VrfEntry::flags_
private

Definition at line 236 of file vrf.h.

VrfEntryRef VrfEntry::forwarding_vrf_
private

Definition at line 258 of file vrf.h.

uint32_t VrfEntry::hbf_lintf_
private

Definition at line 263 of file vrf.h.

uint32_t VrfEntry::hbf_rintf_
private

Definition at line 262 of file vrf.h.

uint32_t VrfEntry::id_
private

Definition at line 235 of file vrf.h.

uint32_t VrfEntry::isid_
private

Definition at line 252 of file vrf.h.

const uint32_t VrfEntry::kDeleteTimeout = 900 * 1000
static

Definition at line 89 of file vrf.h.

const uint32_t VrfEntry::kInvalidIndex = 0xFFFFFFFF
static

Definition at line 88 of file vrf.h.

bool VrfEntry::l2_
private

Definition at line 257 of file vrf.h.

bool VrfEntry::layer2_control_word_
private

Definition at line 256 of file vrf.h.

bool VrfEntry::learning_enabled_
private

Definition at line 255 of file vrf.h.

tbb::atomic<uint32_t> VrfEntry::mac_aging_time_
private

Definition at line 253 of file vrf.h.

string VrfEntry::name_
private

Definition at line 233 of file vrf.h.

NextHopRef VrfEntry::nh_
private

Definition at line 240 of file vrf.h.

int VrfEntry::rd_
private

Definition at line 259 of file vrf.h.

uint32_t VrfEntry::retries_
private

Definition at line 261 of file vrf.h.

AgentRouteWalkerPtr VrfEntry::route_resync_walker_
private

Definition at line 249 of file vrf.h.

bool VrfEntry::routing_vrf_
private

Definition at line 260 of file vrf.h.

AgentRouteTable* VrfEntry::rt_table_db_[Agent::ROUTE_TABLE_MAX]
private

Definition at line 243 of file vrf.h.

uint32_t VrfEntry::rt_table_delete_bmap_
private

Definition at line 247 of file vrf.h.

VnEntryRef VrfEntry::si_vn_ref_
private

Definition at line 239 of file vrf.h.

uint32_t VrfEntry::table_label_
private

Definition at line 245 of file vrf.h.

VnEntryRef VrfEntry::vn_
private

Definition at line 237 of file vrf.h.

IFMapDependencyManager::IFMapNodePtr VrfEntry::vrf_node_ptr_
private

Definition at line 248 of file vrf.h.

uint32_t VrfEntry::vxlan_id_
private

Definition at line 246 of file vrf.h.

DBTableWalker::WalkId VrfEntry::walkid_
private

Definition at line 241 of file vrf.h.


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