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

#include <nexthop.h>

Inheritance diagram for CompositeNH:
Collaboration diagram for CompositeNH:

Public Member Functions

 CompositeNH (COMPOSITETYPE type, bool policy, const ComponentNHKeyList &component_nh_key_list, VrfEntry *vrf)
 
 CompositeNH (COMPOSITETYPE type, bool validate_mcast_src, bool policy, const ComponentNHKeyList &component_nh_key_list, VrfEntry *vrf)
 
virtual ~CompositeNH ()
 
virtual std::string ToString () const
 
virtual bool NextHopIsLess (const DBEntry &rhs) const
 
virtual void SetKey (const DBRequestKey *key)
 
virtual bool ChangeEntry (const DBRequest *req)
 
virtual void Delete (const DBRequest *req)
 
virtual KeyPtr GetDBRequestKey () const
 
virtual bool CanAdd () const
 
virtual void SendObjectLog (const NextHopTable *table, AgentLogEvent::type event) const
 
ComponentNHList::const_iterator begin () const
 
ComponentNHList::const_iterator end () const
 
size_t ComponentNHCount () const
 
uint32_t ActiveComponentNHCount () const
 
uint32_t PickMember (uint32_t seed, uint32_t affinity_index, bool ingress) const
 
const NextHopGetNH (uint32_t idx) const
 
COMPOSITETYPE composite_nh_type () const
 
void set_validate_mcast_src (bool validate_mcast_src)
 
bool validate_mcast_src () const
 
bool GetOldNH (const CompositeNHData *data, ComponentNH &)
 
virtual bool DeleteOnZeroRefCount () const
 
virtual void OnZeroRefCount ()
 
ComponentNHKeyList AddComponentNHKey (ComponentNHKeyPtr component_nh_key, bool &comp_nh_policy) const
 
ComponentNHKeyList DeleteComponentNHKey (ComponentNHKeyPtr component_nh_key, bool &comp_nh_new_policy) const
 
bool UpdateComponentNHKey (uint32_t label, NextHopKey *nh_key, ComponentNHKeyList &component_nh_key_list, bool &comp_nh_policy) const
 
const ComponentNHListcomponent_nh_list () const
 
const ComponentNHKeyListcomponent_nh_key_list () const
 
const VrfEntryvrf () const
 
uint32_t hash (uint32_t seed, bool ingress) const
 
bool HasVmInterface (const VmInterface *vmi) const
 
bool GetIndex (ComponentNH &nh, uint32_t &idx) const
 
const ComponentNHGet (uint32_t idx) const
 
CompositeNHChangeTunnelType (Agent *agent, TunnelType::Type type) const
 
const NextHopGetLocalNextHop () const
 
virtual bool MatchEgressData (const NextHop *nh) const
 
virtual bool NeedMplsLabel ()
 
uint8_t EcmpHashFieldInUse () const
 
EcmpHashFieldsCompEcmpHashFields ()
 
void UpdateEcmpHashFieldsUponRouteDelete (Agent *agent, const string &vrf_name)
 
bool pbb_nh () const
 
bool layer2_control_word () const
 
const InterfaceGetFirstLocalEcmpMemberInterface () const
 
- Public Member Functions inherited from NextHop
 NextHop (Type type, bool policy)
 
 NextHop (Type type, bool valid, bool policy)
 
virtual ~NextHop ()
 
virtual void Add (Agent *agent, const DBRequest *req)
 
virtual void Change (const DBRequest *req)
 
virtual bool IsLess (const DBEntry &rhs) const
 
uint32_t GetRefCount () const
 
void ResetMplsRef ()
 
Type GetType () const
 
bool IsValid () const
 
bool PolicyEnabled () const
 
uint32_t id () const
 
void set_id (uint32_t index)
 
void set_etree_leaf (bool val)
 
bool etree_leaf () const
 
void set_learning_flag (bool val)
 
bool learning_enabled () const
 
bool DBEntrySandesh (Sandesh *sresp, std::string &name) const
 
void SetNHSandeshData (NhSandeshData &data) const
 
bool NexthopToInterfacePolicy () const
 
const MplsLabelmpls_label () const
 
MplsLabelAllocateLabel (Agent *agent, const NextHopKey *key)
 
void PostAdd ()
 
void EnqueueResync () const
 
- 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 kInvalidComponentNHIdx = 0xFFFFFFFF
 
- Static Public Attributes inherited from NextHop
static const uint32_t kInvalidIndex = 0xFFFFFFFF
 

Private Member Functions

void CreateComponentNH (Agent *agent, TunnelType::Type type) const
 
void ChangeComponentNHKeyTunnelType (ComponentNHKeyList &component_nh_list, TunnelType::Type type) const
 
 DISALLOW_COPY_AND_ASSIGN (CompositeNH)
 

Private Attributes

COMPOSITETYPE composite_nh_type_
 
bool validate_mcast_src_
 
ComponentNHKeyList component_nh_key_list_
 
ComponentNHList component_nh_list_
 
VrfEntryRef vrf_
 
EcmpHashFields comp_ecmp_hash_fields_
 
bool pbb_nh_
 
bool layer2_control_word_
 

Additional Inherited Members

- Public Types inherited from NextHop
enum  Type {
  INVALID, DISCARD, L2_RECEIVE, RECEIVE,
  RESOLVE, ARP, VRF, INTERFACE,
  TUNNEL, MIRROR, COMPOSITE, VLAN,
  PBB, NDP
}
 
- 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
 
- Static Public Member Functions inherited from NextHop
static void FillObjectLogIntf (const Interface *intf, NextHopObjectLogInfo &info)
 
static void FillObjectLogMac (const unsigned char *m, NextHopObjectLogInfo &info)
 
- Public Attributes inherited from DBEntryBase
boost::intrusive::list_member_hook chg_list_
 
- Protected Member Functions inherited from NextHop
void FillObjectLog (AgentLogEvent::type event, NextHopObjectLogInfo &info) const
 
- Protected Attributes inherited from NextHop
Type type_
 
bool valid_
 
bool policy_
 
uint32_t id_
 
MplsLabelRef mpls_label_
 
bool learning_enabled_
 
bool etree_leaf_
 

Detailed Description

Definition at line 1775 of file nexthop.h.

Constructor & Destructor Documentation

CompositeNH::CompositeNH ( COMPOSITETYPE  type,
bool  policy,
const ComponentNHKeyList component_nh_key_list,
VrfEntry vrf 
)
inline

Definition at line 1778 of file nexthop.h.

Here is the call graph for this function:

CompositeNH::CompositeNH ( COMPOSITETYPE  type,
bool  validate_mcast_src,
bool  policy,
const ComponentNHKeyList component_nh_key_list,
VrfEntry vrf 
)
inline

Definition at line 1787 of file nexthop.h.

Here is the call graph for this function:

virtual CompositeNH::~CompositeNH ( )
inlinevirtual

Definition at line 1796 of file nexthop.h.

Member Function Documentation

uint32_t CompositeNH::ActiveComponentNHCount ( ) const
inline

Definition at line 1818 of file nexthop.h.

ComponentNHKeyList CompositeNH::AddComponentNHKey ( ComponentNHKeyPtr  component_nh_key,
bool &  comp_nh_policy 
) const

Definition at line 2485 of file nexthop.cc.

Here is the call graph for this function:

ComponentNHList::const_iterator CompositeNH::begin ( ) const
inline

Definition at line 1807 of file nexthop.h.

bool CompositeNH::CanAdd ( ) const
virtual

Implements NextHop.

Definition at line 1790 of file nexthop.cc.

void CompositeNH::ChangeComponentNHKeyTunnelType ( ComponentNHKeyList component_nh_list,
TunnelType::Type  type 
) const
private

Definition at line 2257 of file nexthop.cc.

Here is the call graph for this function:

bool CompositeNH::ChangeEntry ( const DBRequest req)
virtual

Implements NextHop.

Definition at line 1932 of file nexthop.cc.

Here is the call graph for this function:

CompositeNH * CompositeNH::ChangeTunnelType ( Agent agent,
TunnelType::Type  type 
) const

Definition at line 2302 of file nexthop.cc.

Here is the call graph for this function:

EcmpHashFields& CompositeNH::CompEcmpHashFields ( )
inline

Definition at line 1912 of file nexthop.h.

const ComponentNHKeyList& CompositeNH::component_nh_key_list ( ) const
inline

Definition at line 1872 of file nexthop.h.

const ComponentNHList& CompositeNH::component_nh_list ( ) const
inline

Definition at line 1869 of file nexthop.h.

size_t CompositeNH::ComponentNHCount ( ) const
inline

Definition at line 1815 of file nexthop.h.

COMPOSITETYPE CompositeNH::composite_nh_type ( ) const
inline

Definition at line 1842 of file nexthop.h.

void CompositeNH::CreateComponentNH ( Agent agent,
TunnelType::Type  type 
) const
private

Definition at line 2197 of file nexthop.cc.

Here is the call graph for this function:

void CompositeNH::Delete ( const DBRequest req)
virtual

Reimplemented from NextHop.

Definition at line 2193 of file nexthop.cc.

ComponentNHKeyList CompositeNH::DeleteComponentNHKey ( ComponentNHKeyPtr  component_nh_key,
bool &  comp_nh_new_policy 
) const

Definition at line 2555 of file nexthop.cc.

Here is the call graph for this function:

virtual bool CompositeNH::DeleteOnZeroRefCount ( ) const
inlinevirtual

Reimplemented from NextHop.

Definition at line 1856 of file nexthop.h.

CompositeNH::DISALLOW_COPY_AND_ASSIGN ( CompositeNH  )
private
uint8_t CompositeNH::EcmpHashFieldInUse ( ) const
inline

Definition at line 1909 of file nexthop.h.

Here is the call graph for this function:

ComponentNHList::const_iterator CompositeNH::end ( ) const
inline

Definition at line 1811 of file nexthop.h.

const ComponentNH* CompositeNH::Get ( uint32_t  idx) const
inline

Definition at line 1899 of file nexthop.h.

CompositeNH::KeyPtr CompositeNH::GetDBRequestKey ( ) const
virtual

Implements DBEntryBase.

Definition at line 2183 of file nexthop.cc.

Here is the call graph for this function:

const Interface * CompositeNH::GetFirstLocalEcmpMemberInterface ( ) const

Definition at line 1837 of file nexthop.cc.

Here is the call graph for this function:

bool CompositeNH::GetIndex ( ComponentNH nh,
uint32_t &  idx 
) const

Definition at line 2335 of file nexthop.cc.

Here is the call graph for this function:

const NextHop * CompositeNH::GetLocalNextHop ( ) const

Definition at line 1798 of file nexthop.cc.

const NextHop* CompositeNH::GetNH ( uint32_t  idx) const
inline

Definition at line 1832 of file nexthop.h.

bool CompositeNH::GetOldNH ( const CompositeNHData data,
ComponentNH  
)
uint32_t CompositeNH::hash ( uint32_t  seed,
bool  ingress 
) const
inline

Definition at line 1878 of file nexthop.h.

Here is the call graph for this function:

bool CompositeNH::HasVmInterface ( const VmInterface vmi) const

Definition at line 1813 of file nexthop.cc.

Here is the call graph for this function:

bool CompositeNH::layer2_control_word ( ) const
inline

Definition at line 1918 of file nexthop.h.

virtual bool CompositeNH::MatchEgressData ( const NextHop nh) const
inlinevirtual

Implements NextHop.

Definition at line 1905 of file nexthop.h.

virtual bool CompositeNH::NeedMplsLabel ( )
inlinevirtual

Implements NextHop.

Definition at line 1908 of file nexthop.h.

bool CompositeNH::NextHopIsLess ( const DBEntry rhs) const
virtual

Implements NextHop.

Definition at line 2119 of file nexthop.cc.

Here is the call graph for this function:

virtual void CompositeNH::OnZeroRefCount ( )
inlinevirtual

Reimplemented from NextHop.

Definition at line 1859 of file nexthop.h.

bool CompositeNH::pbb_nh ( ) const
inline

Definition at line 1914 of file nexthop.h.

uint32_t CompositeNH::PickMember ( uint32_t  seed,
uint32_t  affinity_index,
bool  ingress 
) const

Definition at line 1861 of file nexthop.cc.

Here is the call graph for this function:

void CompositeNH::SendObjectLog ( const NextHopTable table,
AgentLogEvent::type  event 
) const
virtual

Reimplemented from NextHop.

Definition at line 2041 of file nexthop.cc.

Here is the call graph for this function:

void CompositeNH::set_validate_mcast_src ( bool  validate_mcast_src)
inline

Definition at line 1846 of file nexthop.h.

Here is the call graph for this function:

void CompositeNH::SetKey ( const DBRequestKey key)
virtual

Reimplemented from NextHop.

Definition at line 2112 of file nexthop.cc.

Here is the call graph for this function:

virtual std::string CompositeNH::ToString ( ) const
inlinevirtual

Reimplemented from NextHop.

Definition at line 1797 of file nexthop.h.

bool CompositeNH::UpdateComponentNHKey ( uint32_t  label,
NextHopKey nh_key,
ComponentNHKeyList component_nh_key_list,
bool &  comp_nh_policy 
) const

Definition at line 2454 of file nexthop.cc.

Here is the call graph for this function:

void CompositeNH::UpdateEcmpHashFieldsUponRouteDelete ( Agent agent,
const string &  vrf_name 
)

Definition at line 2355 of file nexthop.cc.

Here is the call graph for this function:

bool CompositeNH::validate_mcast_src ( ) const
inline

Definition at line 1850 of file nexthop.h.

const VrfEntry* CompositeNH::vrf ( ) const
inline

Definition at line 1875 of file nexthop.h.

Member Data Documentation

EcmpHashFields CompositeNH::comp_ecmp_hash_fields_
private

Definition at line 1935 of file nexthop.h.

ComponentNHKeyList CompositeNH::component_nh_key_list_
private

Definition at line 1932 of file nexthop.h.

ComponentNHList CompositeNH::component_nh_list_
private

Definition at line 1933 of file nexthop.h.

COMPOSITETYPE CompositeNH::composite_nh_type_
private

Definition at line 1928 of file nexthop.h.

const uint32_t CompositeNH::kInvalidComponentNHIdx = 0xFFFFFFFF
static

Definition at line 1777 of file nexthop.h.

bool CompositeNH::layer2_control_word_
private

Definition at line 1937 of file nexthop.h.

bool CompositeNH::pbb_nh_
private

Definition at line 1936 of file nexthop.h.

bool CompositeNH::validate_mcast_src_
private

Definition at line 1931 of file nexthop.h.

VrfEntryRef CompositeNH::vrf_
private

Definition at line 1934 of file nexthop.h.


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