|
OpenSDN source code
|
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge, EVPN (Type2/Type5). This base class contains common code for all types of route tables. More...
#include <agent_route.h>


Classes | |
| class | DeleteActor |
Public Types | |
| 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 |
Public Member Functions | |
| AgentRouteTable (DB *db, const std::string &name) | |
| virtual | ~AgentRouteTable () |
| virtual int | PartitionCount () const |
| virtual std::unique_ptr< DBEntry > | AllocEntry (const DBRequestKey *k) const |
| virtual size_t | Hash (const DBEntry *entry) const |
| virtual size_t | Hash (const DBRequestKey *key) const |
| virtual Agent::RouteTableType | GetTableType () const =0 |
| virtual std::string | GetTableName () const =0 |
| virtual void | ProcessDelete (AgentRoute *rt) |
| virtual void | ProcessAdd (AgentRoute *rt) |
| virtual void | NotifyEntry (AgentRoute *entry) |
| virtual AgentSandeshPtr | GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context) |
| 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) |
| Agent * | agent () const |
| const std::string & | vrf_name () const |
| uint32_t | vrf_id () const |
| VrfEntry * | vrf_entry () const |
| AgentRoute * | FindActiveEntry (const AgentRouteKey *key) |
| AgentRoute * | FindActiveEntryNoLock (const AgentRouteKey *key) |
| AgentRoute * | FindActiveEntry (const AgentRoute *key) |
| AgentRoute * | FindActiveEntryNoLock (const AgentRoute *key) |
| void | SetVrf (VrfEntry *vrf) |
| bool | DelExplicitRouteWalkerCb (DBTablePartBase *part, DBEntryBase *entry) |
| LifetimeActor * | deleter () |
| void | ManagedDelete () |
| virtual void | RetryDelete () |
| void | Process (DBRequest &req) |
| void | AddChangeInput (DBTablePartition *part, VrfEntry *vrf, AgentRoute *rt, AgentRouteKey *key, AgentRouteData *data) |
| AgentRoute * | LocateRoute (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 DBTablePartition * | AllocPartition (int index) |
| virtual DBEntry * | Add (const DBRequest *req) |
| virtual bool | OnChange (DBEntry *entry, const DBRequest *req) |
| virtual bool | Delete (DBEntry *entry, const DBRequest *req) |
| void | NotifyAllEntries () |
| DBEntry * | Find (const DBEntry *entry) |
| const DBEntry * | Find (const DBEntry *entry) const |
| DBEntry * | Find (const DBRequestKey *key, int id=-1) |
| const DBEntry * | Find (const DBRequestKey *key, int id=-1) const |
| DBEntry * | FindNoLock (const DBEntry *entry) |
| DBEntry * | FindNoLock (const DBRequestKey *key) |
| virtual DBTablePartBase * | GetTablePartition (const DBRequestKey *key) |
| virtual const DBTablePartBase * | GetTablePartition (const DBRequestKey *key) const |
| virtual DBTablePartBase * | GetTablePartition (const DBEntryBase *entry) |
| virtual const DBTablePartBase * | GetTablePartition (const DBEntryBase *entry) const |
| virtual DBTablePartBase * | GetTablePartition (const int index) |
| virtual const DBTablePartBase * | GetTablePartition (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 |
| DB * | database () |
| const DB * | database () 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 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) |
Static Public Attributes | |
| 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 |
Private Member Functions | |
| void | DeleteRouteDone (DBTable::DBTableWalkRef walk_ref, DBTableBase *base, RouteTableWalkerState *state) |
| void | Input (DBTablePartition *part, DBClient *client, DBRequest *req) |
| DISALLOW_COPY_AND_ASSIGN (AgentRouteTable) | |
Private Attributes | |
| Agent * | agent_ |
| uint32_t | vrf_id_ |
| VrfEntryRef | vrf_entry_ |
| boost::scoped_ptr< DeleteActor > | deleter_ |
| LifetimeRef< AgentRouteTable > | vrf_delete_ref_ |
| UnresolvedRouteTree | unresolved_rt_tree_ |
| UnresolvedNHTree | unresolved_nh_tree_ |
| SandeshTraceBufferPtr | OperDBTraceBuf |
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge, EVPN (Type2/Type5). This base class contains common code for all types of route tables.
Definition at line 109 of file agent_route.h.
| typedef std::set<const NextHop *, NHComparator> AgentRouteTable::UnresolvedNHTree |
Definition at line 113 of file agent_route.h.
| typedef std::set<const AgentRoute *, RouteComparator> AgentRouteTable::UnresolvedRouteTree |
Definition at line 112 of file agent_route.h.
| AgentRouteTable::AgentRouteTable | ( | DB * | db, |
| const std::string & | name | ||
| ) |
|
virtual |
Definition at line 78 of file agent_route.cc.
| void AgentRouteTable::AddChangeInput | ( | DBTablePartition * | part, |
| VrfEntry * | vrf, | ||
| AgentRoute * | rt, | ||
| AgentRouteKey * | key, | ||
| AgentRouteData * | data | ||
| ) |
| void AgentRouteTable::AddUnresolvedNH | ( | const NextHop * | nh | ) |
Definition at line 389 of file agent_route.cc.
| void AgentRouteTable::AddUnresolvedRoute | ( | const AgentRoute * | rt | ) |
Definition at line 408 of file agent_route.cc.
|
inline |
Definition at line 159 of file agent_route.h.
|
virtual |
Implements DBTable.
Definition at line 82 of file agent_route.cc.

| LifetimeActor * AgentRouteTable::deleter | ( | ) |
Definition at line 451 of file agent_route.cc.
|
private |
| bool AgentRouteTable::DelExplicitRouteWalkerCb | ( | DBTablePartBase * | part, |
| DBEntryBase * | entry | ||
| ) |
|
private |
| void AgentRouteTable::EvaluateUnresolvedNH | ( | void | ) |
| void AgentRouteTable::EvaluateUnresolvedRoutes | ( | void | ) |
Definition at line 399 of file agent_route.cc.
| AgentRoute * AgentRouteTable::FindActiveEntry | ( | const AgentRoute * | key | ) |
| AgentRoute * AgentRouteTable::FindActiveEntry | ( | const AgentRouteKey * | key | ) |
| AgentRoute * AgentRouteTable::FindActiveEntryNoLock | ( | const AgentRoute * | key | ) |
| AgentRoute * AgentRouteTable::FindActiveEntryNoLock | ( | const AgentRouteKey * | key | ) |
|
inlinevirtual |
Reimplemented in InetUnicastAgentRouteTable, Inet4MulticastAgentRouteTable, EvpnAgentRouteTable, and BridgeAgentRouteTable.
Definition at line 130 of file agent_route.h.
|
inlinevirtual |
Definition at line 134 of file agent_route.h.
|
static |
|
pure virtual |
Implemented in InetUnicastAgentRouteTable, Inet4MulticastAgentRouteTable, EvpnAgentRouteTable, and BridgeAgentRouteTable.
|
pure virtual |
Implemented in InetUnicastAgentRouteTable, Inet4MulticastAgentRouteTable, EvpnAgentRouteTable, and BridgeAgentRouteTable.
|
inlinevirtual |
Reimplemented from DBTable.
Definition at line 120 of file agent_route.h.
|
inlinevirtual |
Reimplemented from DBTable.
Definition at line 121 of file agent_route.h.
|
privatevirtual |
Reimplemented from DBTable.
Definition at line 199 of file agent_route.cc.

| AgentRoute * AgentRouteTable::LocateRoute | ( | DBTablePartition * | part, |
| VrfEntry * | vrf, | ||
| AgentRoute * | rt, | ||
| AgentRouteKey * | key, | ||
| AgentRouteData * | data, | ||
| bool * | notify | ||
| ) |
| void AgentRouteTable::ManagedDelete | ( | ) |
|
virtual |
|
inlinevirtual |
Reimplemented from DBTable.
Definition at line 118 of file agent_route.h.
| void AgentRouteTable::Process | ( | DBRequest & | req | ) |
|
inlinevirtual |
Reimplemented in InetUnicastAgentRouteTable.
Definition at line 127 of file agent_route.h.
|
inlinevirtual |
Reimplemented in InetUnicastAgentRouteTable.
Definition at line 126 of file agent_route.h.
| void AgentRouteTable::RemoveUnresolvedNH | ( | const NextHop * | nh | ) |
Definition at line 393 of file agent_route.cc.
| void AgentRouteTable::RemoveUnresolvedRoute | ( | const AgentRoute * | rt | ) |
Definition at line 412 of file agent_route.cc.
|
virtual |
Reimplemented from DBTableBase.
Definition at line 164 of file agent_route.cc.

| void AgentRouteTable::SetVrf | ( | VrfEntry * | vrf | ) |
|
inline |
Definition at line 149 of file agent_route.h.
|
inline |
Definition at line 152 of file agent_route.h.
|
inline |
Definition at line 137 of file agent_route.h.
|
inline |
Definition at line 140 of file agent_route.h.
|
inline |
Definition at line 143 of file agent_route.h.
| VrfEntry * AgentRouteTable::vrf_entry | ( | ) | const |
Definition at line 459 of file agent_route.cc.
|
inline |
Definition at line 161 of file agent_route.h.
| const std::string & AgentRouteTable::vrf_name | ( | ) | const |
Definition at line 455 of file agent_route.cc.
|
private |
Definition at line 199 of file agent_route.h.
|
private |
Definition at line 202 of file agent_route.h.
|
static |
Definition at line 111 of file agent_route.h.
|
private |
Definition at line 208 of file agent_route.h.
|
private |
Definition at line 205 of file agent_route.h.
|
private |
Definition at line 204 of file agent_route.h.
|
private |
Definition at line 203 of file agent_route.h.
|
private |
Definition at line 201 of file agent_route.h.
|
private |
Definition at line 200 of file agent_route.h.