OpenSDN source code
BgpSenderPartition Class Reference

#include <bgp_update_sender.h>

Collaboration diagram for BgpSenderPartition:

Classes

struct  PeerRibState
 
class  PeerState
 
class  RibState
 
struct  WorkBase
 
class  Worker
 
struct  WorkPeer
 
struct  WorkRibOut
 

Public Member Functions

 BgpSenderPartition (BgpUpdateSender *sender, int index)
 
 ~BgpSenderPartition ()
 
void Add (RibOut *ribout, IPeerUpdate *peer)
 
void Remove (RibOut *ribout, IPeerUpdate *peer)
 
void RibOutActive (RibOut *ribout, int queue_id)
 
void PeerSendReady (IPeerUpdate *peer)
 
bool PeerIsSendReady (IPeerUpdate *peer) const
 
bool PeerIsRegistered (IPeerUpdate *peer) const
 
bool PeerInSync (IPeerUpdate *peer) const
 
bool CheckInvariants () const
 
int task_id () const
 
int index () const
 
void set_disabled (bool disabled)
 

Private Types

typedef boost::ptr_list< WorkBaseWorkQueue
 
typedef IndexMap< IPeerUpdate *, PeerStatePeerStateMap
 
typedef IndexMap< RibOut *, RibStateRibStateMap
 

Private Member Functions

void MaybeStartWorker ()
 
std::unique_ptr< WorkBaseWorkDequeue ()
 
void WorkEnqueue (WorkBase *wentry)
 
void WorkPeerEnqueue (IPeerUpdate *peer)
 
void WorkPeerInvalidate (IPeerUpdate *peer)
 
void WorkRibOutEnqueue (RibOut *ribout, int queue_id)
 
void WorkRibOutInvalidate (RibOut *ribout)
 
void UpdateRibOut (RibOut *ribout, int queue_id)
 
void UpdatePeer (IPeerUpdate *peer)
 
bool UpdatePeerQueue (IPeerUpdate *peer, PeerState *ps, int queue_id)
 
void BuildSyncBitSet (const RibOut *ribout, RibState *rs, RibPeerSet *msync)
 
void SetQueueActive (const RibOut *ribout, RibState *rs, int queue_id, const RibPeerSet &munsync)
 
void SetQueueActive (RibOut *ribout, int queue_id, IPeerUpdate *peer)
 
bool IsQueueActive (RibOut *ribout, int queue_id, IPeerUpdate *peer)
 
void SetSendBlocked (RibOut *ribout, int queue_id, const RibPeerSet &blocked)
 
void SetSendBlocked (const RibOut *ribout, RibState *rs, int queue_id, const RibPeerSet &blocked)
 
void SetQueueSync (PeerState *ps, int queue_id)
 
 DISALLOW_COPY_AND_ASSIGN (BgpSenderPartition)
 

Private Attributes

BgpUpdateSendersender_
 
int index_
 
bool running_
 
bool disabled_
 
WorkQueue work_queue_
 
Workerworker_task_
 
PeerStateMap peer_state_imap_
 
RibStateMap rib_state_imap_
 

Friends

class BgpUpdateSenderTest
 
class RibOutUpdatesTest
 

Detailed Description

Definition at line 48 of file bgp_update_sender.h.

Member Typedef Documentation

◆ PeerStateMap

Definition at line 108 of file bgp_update_sender.h.

◆ RibStateMap

Definition at line 109 of file bgp_update_sender.h.

◆ WorkQueue

typedef boost::ptr_list<WorkBase> BgpSenderPartition::WorkQueue
private

Definition at line 107 of file bgp_update_sender.h.

Constructor & Destructor Documentation

◆ BgpSenderPartition()

BgpSenderPartition::BgpSenderPartition ( BgpUpdateSender sender,
int  index 
)

Definition at line 413 of file bgp_update_sender.cc.

◆ ~BgpSenderPartition()

BgpSenderPartition::~BgpSenderPartition ( )

Definition at line 421 of file bgp_update_sender.cc.

Here is the call graph for this function:

Member Function Documentation

◆ Add()

void BgpSenderPartition::Add ( RibOut ribout,
IPeerUpdate peer 
)

Definition at line 439 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ BuildSyncBitSet()

void BgpSenderPartition::BuildSyncBitSet ( const RibOut ribout,
RibState rs,
RibPeerSet msync 
)
private

Definition at line 648 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ CheckInvariants()

bool BgpSenderPartition::CheckInvariants ( ) const

Definition at line 913 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

BgpSenderPartition::DISALLOW_COPY_AND_ASSIGN ( BgpSenderPartition  )
private

◆ index()

int BgpSenderPartition::index ( ) const
inline

Definition at line 66 of file bgp_update_sender.h.

◆ IsQueueActive()

bool BgpSenderPartition::IsQueueActive ( RibOut ribout,
int  queue_id,
IPeerUpdate peer 
)
private

Definition at line 746 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ MaybeStartWorker()

void BgpSenderPartition::MaybeStartWorker ( )
private

Definition at line 537 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ PeerInSync()

bool BgpSenderPartition::PeerInSync ( IPeerUpdate peer) const

Definition at line 526 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ PeerIsRegistered()

bool BgpSenderPartition::PeerIsRegistered ( IPeerUpdate peer) const

Definition at line 517 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ PeerIsSendReady()

bool BgpSenderPartition::PeerIsSendReady ( IPeerUpdate peer) const

Definition at line 507 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ PeerSendReady()

void BgpSenderPartition::PeerSendReady ( IPeerUpdate peer)

Definition at line 485 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ Remove()

void BgpSenderPartition::Remove ( RibOut ribout,
IPeerUpdate peer 
)

Definition at line 453 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ RibOutActive()

void BgpSenderPartition::RibOutActive ( RibOut ribout,
int  queue_id 
)

Definition at line 476 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ set_disabled()

void BgpSenderPartition::set_disabled ( bool  disabled)

Definition at line 580 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ SetQueueActive() [1/2]

void BgpSenderPartition::SetQueueActive ( const RibOut ribout,
RibState rs,
int  queue_id,
const RibPeerSet munsync 
)
private

Definition at line 709 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ SetQueueActive() [2/2]

void BgpSenderPartition::SetQueueActive ( RibOut ribout,
int  queue_id,
IPeerUpdate peer 
)
private

Definition at line 729 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ SetQueueSync()

void BgpSenderPartition::SetQueueSync ( PeerState ps,
int  queue_id 
)
private

Definition at line 761 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ SetSendBlocked() [1/2]

void BgpSenderPartition::SetSendBlocked ( const RibOut ribout,
RibState rs,
int  queue_id,
const RibPeerSet blocked 
)
private

Definition at line 676 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ SetSendBlocked() [2/2]

void BgpSenderPartition::SetSendBlocked ( RibOut ribout,
int  queue_id,
const RibPeerSet blocked 
)
private

Definition at line 694 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ task_id()

int BgpSenderPartition::task_id ( ) const

Definition at line 430 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ UpdatePeer()

void BgpSenderPartition::UpdatePeer ( IPeerUpdate peer)
private

Definition at line 862 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ UpdatePeerQueue()

bool BgpSenderPartition::UpdatePeerQueue ( IPeerUpdate peer,
PeerState ps,
int  queue_id 
)
private

Definition at line 818 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ UpdateRibOut()

void BgpSenderPartition::UpdateRibOut ( RibOut ribout,
int  queue_id 
)
private

Definition at line 779 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ WorkDequeue()

unique_ptr< BgpSenderPartition::WorkBase > BgpSenderPartition::WorkDequeue ( )
private

Definition at line 551 of file bgp_update_sender.cc.

◆ WorkEnqueue()

void BgpSenderPartition::WorkEnqueue ( WorkBase wentry)
private

Definition at line 568 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ WorkPeerEnqueue()

void BgpSenderPartition::WorkPeerEnqueue ( IPeerUpdate peer)
private

Definition at line 588 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ WorkPeerInvalidate()

void BgpSenderPartition::WorkPeerInvalidate ( IPeerUpdate peer)
private

Definition at line 599 of file bgp_update_sender.cc.

◆ WorkRibOutEnqueue()

void BgpSenderPartition::WorkRibOutEnqueue ( RibOut ribout,
int  queue_id 
)
private

Definition at line 617 of file bgp_update_sender.cc.

Here is the call graph for this function:

◆ WorkRibOutInvalidate()

void BgpSenderPartition::WorkRibOutInvalidate ( RibOut ribout)
private

Definition at line 628 of file bgp_update_sender.cc.

Friends And Related Function Documentation

◆ BgpUpdateSenderTest

friend class BgpUpdateSenderTest
friend

Definition at line 72 of file bgp_update_sender.h.

◆ RibOutUpdatesTest

friend class RibOutUpdatesTest
friend

Definition at line 73 of file bgp_update_sender.h.

Member Data Documentation

◆ disabled_

bool BgpSenderPartition::disabled_
private

Definition at line 139 of file bgp_update_sender.h.

◆ index_

int BgpSenderPartition::index_
private

Definition at line 137 of file bgp_update_sender.h.

◆ peer_state_imap_

PeerStateMap BgpSenderPartition::peer_state_imap_
private

Definition at line 142 of file bgp_update_sender.h.

◆ rib_state_imap_

RibStateMap BgpSenderPartition::rib_state_imap_
private

Definition at line 143 of file bgp_update_sender.h.

◆ running_

bool BgpSenderPartition::running_
private

Definition at line 138 of file bgp_update_sender.h.

◆ sender_

BgpUpdateSender* BgpSenderPartition::sender_
private

Definition at line 136 of file bgp_update_sender.h.

◆ work_queue_

WorkQueue BgpSenderPartition::work_queue_
private

Definition at line 140 of file bgp_update_sender.h.

◆ worker_task_

Worker* BgpSenderPartition::worker_task_
private

Definition at line 141 of file bgp_update_sender.h.


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