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

#include <ovsdb_client_idl.h>

Collaboration diagram for OVSDB::OvsdbClientIdl:

Classes

struct  OvsdbMsg
 
struct  TxnStats
 

Public Types

enum  OvsdbSessionState { OvsdbSessionActive = 0, OvsdbSessionRcvWait, OvsdbSessionEchoWait }
 
enum  Op { OVSDB_DEL = 0, OVSDB_ADD, OVSDB_INVALID_OP }
 
enum  EntryType {
  OVSDB_PHYSICAL_SWITCH = 0, OVSDB_LOGICAL_SWITCH, OVSDB_PHYSICAL_PORT, OVSDB_PHYSICAL_LOCATOR,
  OVSDB_UCAST_MAC_LOCAL, OVSDB_UCAST_MAC_REMOTE, OVSDB_PHYSICAL_LOCATOR_SET, OVSDB_MCAST_MAC_LOCAL,
  OVSDB_MCAST_MAC_REMOTE, OVSDB_TYPE_COUNT
}
 
typedef boost::function< void(OvsdbClientIdl::Op,
struct ovsdb_idl_row *)> 
NotifyCB
 
typedef std::map< struct
ovsdb_idl_txn
*, OvsdbEntryList
PendingTxnMap
 
typedef std::queue< struct
jsonrpc_msg * > 
ThrottledTxnMsgs
 

Public Member Functions

 OvsdbClientIdl (OvsdbClientSession *session, Agent *agent, OvsPeerManager *manager)
 
virtual ~OvsdbClientIdl ()
 
bool ProcessMessage (OvsdbMsg *msg)
 
void OnEstablish ()
 
void TxnScheduleJsonRpc (struct jsonrpc_msg *msg)
 
void MessageProcess (const u_int8_t *buf, std::size_t len)
 
struct ovsdb_idl_txn * CreateTxn (OvsdbEntryBase *entry, KSyncEntry::KSyncEvent ack_event=KSyncEntry::ADD_ACK)
 
struct ovsdb_idl_txn * CreateBulkTxn (OvsdbEntryBase *entry, KSyncEntry::KSyncEvent ack_event=KSyncEntry::ADD_ACK)
 
bool EncodeSendTxn (struct ovsdb_idl_txn *txn, OvsdbEntryBase *skip_entry)
 
void DeleteTxn (struct ovsdb_idl_txn *txn)
 
void Register (EntryType type, NotifyCB cb)
 
void UnRegister (EntryType type)
 
void NotifyDelAdd (struct ovsdb_idl_row *row)
 
Ip4Address tsn_ip ()
 
void MessageProcess (struct jsonrpc_msg *msg)
 
Ip4Address remote_ip () const
 
uint16_t remote_port () const
 
ConnectionStateTableconnection_table ()
 
KSyncObjectManagerksync_obj_manager ()
 
OvsPeerroute_peer ()
 
bool deleted ()
 
Agentagent () const
 
VMInterfaceKSyncObjectvm_interface_table ()
 
PhysicalSwitchTablephysical_switch_table ()
 
LogicalSwitchTablelogical_switch_table ()
 
PhysicalPortTablephysical_port_table ()
 
PhysicalLocatorTablephysical_locator_table ()
 
VlanPortBindingTablevlan_port_table ()
 
UnicastMacLocalOvsdbunicast_mac_local_ovsdb ()
 
MulticastMacLocalOvsdbmulticast_mac_local_ovsdb ()
 
VrfOvsdbObjectvrf_ovsdb ()
 
VnOvsdbObjectvn_ovsdb ()
 
OvsdbResourceVxLanIdTablevxlan_table ()
 
bool IsKeepAliveTimerActive ()
 
bool IsMonitorInProcess ()
 
bool KeepAliveTimerCb ()
 
void TriggerDeletion ()
 
bool IsDeleted () const
 
int refcount () const
 
const TxnStatsstats () const
 
uint64_t pending_txn_count () const
 
uint64_t pending_send_msg_count () const
 
bool ConcurrencyCheck () const
 

Static Public Attributes

static const std::size_t OVSDBMaxInFlightPendingTxn = 25
 
static const std::size_t OVSDBEntriesInBulkTxn = 4
 

Private Member Functions

void ConnectOperDB ()
 
 DISALLOW_COPY_AND_ASSIGN (OvsdbClientIdl)
 

Private Attributes

struct ovsdb_idl * idl_
 
struct vteprec_global * vtep_global_
 
OvsdbClientSessionsession_
 
Agentagent_
 
NotifyCB callback_ [OVSDB_TYPE_COUNT]
 
PendingTxnMap pending_txn_
 
ThrottledTxnMsgs pending_send_msgs_
 
bool deleted_
 
WorkQueue< OvsdbMsg * > * receive_queue_
 
OvsPeerManagermanager_
 
OvsdbSessionState connection_state_
 
Timerkeepalive_timer_
 
struct json * monitor_request_id_
 
struct ovsdb_idl_txn * bulk_txn_
 
OvsdbEntryList bulk_entries_
 
TxnStats stats_
 
tbb::atomic< int > refcount_
 
std::unique_ptr< OvsPeerroute_peer_
 
std::unique_ptr
< VMInterfaceKSyncObject
vm_interface_table_
 
std::unique_ptr
< PhysicalSwitchTable
physical_switch_table_
 
std::unique_ptr
< LogicalSwitchTable
logical_switch_table_
 
std::unique_ptr
< PhysicalPortTable
physical_port_table_
 
std::unique_ptr
< PhysicalLocatorTable
physical_locator_table_
 
std::unique_ptr
< VlanPortBindingTable
vlan_port_table_
 
std::unique_ptr
< UnicastMacLocalOvsdb
unicast_mac_local_ovsdb_
 
std::unique_ptr
< MulticastMacLocalOvsdb
multicast_mac_local_ovsdb_
 
std::unique_ptr< VrfOvsdbObjectvrf_ovsdb_
 
std::unique_ptr< VnOvsdbObjectvn_ovsdb_
 
std::unique_ptr
< OvsdbResourceVxLanIdTable
vxlan_table_
 

Friends

void ovsdb_wrapper_idl_callback (void *, int, struct ovsdb_idl_row *)
 
void ovsdb_wrapper_idl_txn_ack (void *, struct ovsdb_idl_txn *)
 
void intrusive_ptr_add_ref (OvsdbClientIdl *p)
 
void intrusive_ptr_release (OvsdbClientIdl *p)
 

Detailed Description

Definition at line 58 of file ovsdb_client_idl.h.

Member Typedef Documentation

typedef boost::function<void(OvsdbClientIdl::Op, struct ovsdb_idl_row *)> OVSDB::OvsdbClientIdl::NotifyCB

Definition at line 109 of file ovsdb_client_idl.h.

typedef std::map<struct ovsdb_idl_txn *, OvsdbEntryList> OVSDB::OvsdbClientIdl::PendingTxnMap

Definition at line 110 of file ovsdb_client_idl.h.

typedef std::queue<struct jsonrpc_msg *> OVSDB::OvsdbClientIdl::ThrottledTxnMsgs

Definition at line 111 of file ovsdb_client_idl.h.

Member Enumeration Documentation

Enumerator
OVSDB_PHYSICAL_SWITCH 
OVSDB_LOGICAL_SWITCH 
OVSDB_PHYSICAL_PORT 
OVSDB_PHYSICAL_LOCATOR 
OVSDB_UCAST_MAC_LOCAL 
OVSDB_UCAST_MAC_REMOTE 
OVSDB_PHYSICAL_LOCATOR_SET 
OVSDB_MCAST_MAC_LOCAL 
OVSDB_MCAST_MAC_REMOTE 
OVSDB_TYPE_COUNT 

Definition at line 83 of file ovsdb_client_idl.h.

Enumerator
OVSDB_DEL 
OVSDB_ADD 
OVSDB_INVALID_OP 

Definition at line 77 of file ovsdb_client_idl.h.

Enumerator
OvsdbSessionActive 
OvsdbSessionRcvWait 
OvsdbSessionEchoWait 

Definition at line 68 of file ovsdb_client_idl.h.

Constructor & Destructor Documentation

OvsdbClientIdl::OvsdbClientIdl ( OvsdbClientSession session,
Agent agent,
OvsPeerManager manager 
)

Definition at line 143 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

OvsdbClientIdl::~OvsdbClientIdl ( )
virtual

Definition at line 180 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

Member Function Documentation

Agent* OVSDB::OvsdbClientIdl::agent ( ) const
inline

Definition at line 158 of file ovsdb_client_idl.h.

bool OvsdbClientIdl::ConcurrencyCheck ( ) const

Definition at line 587 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

ConnectionStateTable * OvsdbClientIdl::connection_table ( )

Definition at line 427 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

void OvsdbClientIdl::ConnectOperDB ( )
private

Definition at line 613 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

struct ovsdb_idl_txn * OvsdbClientIdl::CreateBulkTxn ( OvsdbEntryBase entry,
KSyncEntry::KSyncEvent  ack_event = KSyncEntry::ADD_ACK 
)

Definition at line 319 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

struct ovsdb_idl_txn * OvsdbClientIdl::CreateTxn ( OvsdbEntryBase entry,
KSyncEntry::KSyncEvent  ack_event = KSyncEntry::ADD_ACK 
)

Definition at line 288 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

bool OVSDB::OvsdbClientIdl::deleted ( )
inline

Definition at line 157 of file ovsdb_client_idl.h.

void OvsdbClientIdl::DeleteTxn ( struct ovsdb_idl_txn *  txn)

Definition at line 379 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

OVSDB::OvsdbClientIdl::DISALLOW_COPY_AND_ASSIGN ( OvsdbClientIdl  )
private
bool OvsdbClientIdl::EncodeSendTxn ( struct ovsdb_idl_txn *  txn,
OvsdbEntryBase skip_entry 
)

Definition at line 350 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

bool OVSDB::OvsdbClientIdl::IsDeleted ( ) const
inline

Definition at line 177 of file ovsdb_client_idl.h.

bool OvsdbClientIdl::IsKeepAliveTimerActive ( )

Definition at line 483 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

bool OvsdbClientIdl::IsMonitorInProcess ( )

Definition at line 487 of file ovsdb_client_idl.cc.

bool OvsdbClientIdl::KeepAliveTimerCb ( )

Definition at line 491 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

KSyncObjectManager * OvsdbClientIdl::ksync_obj_manager ( )

Definition at line 431 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

LogicalSwitchTable * OvsdbClientIdl::logical_switch_table ( )

Definition at line 447 of file ovsdb_client_idl.cc.

void OVSDB::OvsdbClientIdl::MessageProcess ( const u_int8_t *  buf,
std::size_t  len 
)
void OvsdbClientIdl::MessageProcess ( struct jsonrpc_msg *  msg)

Definition at line 412 of file ovsdb_client_idl.cc.

MulticastMacLocalOvsdb * OvsdbClientIdl::multicast_mac_local_ovsdb ( )

Definition at line 467 of file ovsdb_client_idl.cc.

void OvsdbClientIdl::NotifyDelAdd ( struct ovsdb_idl_row *  row)

Definition at line 398 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

void OvsdbClientIdl::OnEstablish ( )

Definition at line 207 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

uint64_t OvsdbClientIdl::pending_send_msg_count ( ) const

Definition at line 583 of file ovsdb_client_idl.cc.

uint64_t OvsdbClientIdl::pending_txn_count ( ) const

Definition at line 579 of file ovsdb_client_idl.cc.

PhysicalLocatorTable * OvsdbClientIdl::physical_locator_table ( )

Definition at line 455 of file ovsdb_client_idl.cc.

PhysicalPortTable * OvsdbClientIdl::physical_port_table ( )

Definition at line 451 of file ovsdb_client_idl.cc.

PhysicalSwitchTable * OvsdbClientIdl::physical_switch_table ( )

Definition at line 443 of file ovsdb_client_idl.cc.

bool OvsdbClientIdl::ProcessMessage ( OvsdbMsg msg)

Definition at line 249 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

int OVSDB::OvsdbClientIdl::refcount ( ) const
inline

Definition at line 178 of file ovsdb_client_idl.h.

void OVSDB::OvsdbClientIdl::Register ( EntryType  type,
NotifyCB  cb 
)
inline

Definition at line 140 of file ovsdb_client_idl.h.

Ip4Address OvsdbClientIdl::remote_ip ( ) const

Definition at line 419 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

uint16_t OvsdbClientIdl::remote_port ( ) const

Definition at line 423 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

OvsPeer * OvsdbClientIdl::route_peer ( )

Definition at line 435 of file ovsdb_client_idl.cc.

const OvsdbClientIdl::TxnStats & OvsdbClientIdl::stats ( ) const

Definition at line 575 of file ovsdb_client_idl.cc.

void OvsdbClientIdl::TriggerDeletion ( )

Definition at line 518 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

Ip4Address OvsdbClientIdl::tsn_ip ( )

Definition at line 408 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

void OvsdbClientIdl::TxnScheduleJsonRpc ( struct jsonrpc_msg *  msg)

Definition at line 235 of file ovsdb_client_idl.cc.

Here is the call graph for this function:

UnicastMacLocalOvsdb * OvsdbClientIdl::unicast_mac_local_ovsdb ( )

Definition at line 463 of file ovsdb_client_idl.cc.

void OVSDB::OvsdbClientIdl::UnRegister ( EntryType  type)
inline

Definition at line 141 of file ovsdb_client_idl.h.

VlanPortBindingTable * OvsdbClientIdl::vlan_port_table ( )

Definition at line 459 of file ovsdb_client_idl.cc.

VMInterfaceKSyncObject * OvsdbClientIdl::vm_interface_table ( )

Definition at line 439 of file ovsdb_client_idl.cc.

VnOvsdbObject * OvsdbClientIdl::vn_ovsdb ( )

Definition at line 475 of file ovsdb_client_idl.cc.

VrfOvsdbObject * OvsdbClientIdl::vrf_ovsdb ( )

Definition at line 471 of file ovsdb_client_idl.cc.

OvsdbResourceVxLanIdTable * OvsdbClientIdl::vxlan_table ( )

Definition at line 479 of file ovsdb_client_idl.cc.

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( OvsdbClientIdl p)
friend

Definition at line 102 of file ovsdb_client_idl.cc.

void intrusive_ptr_release ( OvsdbClientIdl p)
friend

Definition at line 107 of file ovsdb_client_idl.cc.

void ovsdb_wrapper_idl_callback ( void *  idl_base,
int  op,
struct ovsdb_idl_row *  row 
)
friend

Definition at line 58 of file ovsdb_client_idl.cc.

void ovsdb_wrapper_idl_txn_ack ( void *  idl_base,
struct ovsdb_idl_txn *  txn 
)
friend

Definition at line 68 of file ovsdb_client_idl.cc.

Member Data Documentation

Agent* OVSDB::OvsdbClientIdl::agent_
private

Definition at line 199 of file ovsdb_client_idl.h.

OvsdbEntryList OVSDB::OvsdbClientIdl::bulk_entries_
private

Definition at line 220 of file ovsdb_client_idl.h.

struct ovsdb_idl_txn* OVSDB::OvsdbClientIdl::bulk_txn_
private

Definition at line 218 of file ovsdb_client_idl.h.

NotifyCB OVSDB::OvsdbClientIdl::callback_[OVSDB_TYPE_COUNT]
private

Definition at line 200 of file ovsdb_client_idl.h.

OvsdbSessionState OVSDB::OvsdbClientIdl::connection_state_
private

Definition at line 209 of file ovsdb_client_idl.h.

bool OVSDB::OvsdbClientIdl::deleted_
private

Definition at line 203 of file ovsdb_client_idl.h.

struct ovsdb_idl* OVSDB::OvsdbClientIdl::idl_
private

Definition at line 196 of file ovsdb_client_idl.h.

Timer* OVSDB::OvsdbClientIdl::keepalive_timer_
private

Definition at line 210 of file ovsdb_client_idl.h.

std::unique_ptr<LogicalSwitchTable> OVSDB::OvsdbClientIdl::logical_switch_table_
private

Definition at line 229 of file ovsdb_client_idl.h.

OvsPeerManager* OVSDB::OvsdbClientIdl::manager_
private

Definition at line 208 of file ovsdb_client_idl.h.

struct json* OVSDB::OvsdbClientIdl::monitor_request_id_
private

Definition at line 215 of file ovsdb_client_idl.h.

std::unique_ptr<MulticastMacLocalOvsdb> OVSDB::OvsdbClientIdl::multicast_mac_local_ovsdb_
private

Definition at line 234 of file ovsdb_client_idl.h.

const std::size_t OVSDB::OvsdbClientIdl::OVSDBEntriesInBulkTxn = 4
static

Definition at line 75 of file ovsdb_client_idl.h.

const std::size_t OVSDB::OvsdbClientIdl::OVSDBMaxInFlightPendingTxn = 25
static

Definition at line 74 of file ovsdb_client_idl.h.

ThrottledTxnMsgs OVSDB::OvsdbClientIdl::pending_send_msgs_
private

Definition at line 202 of file ovsdb_client_idl.h.

PendingTxnMap OVSDB::OvsdbClientIdl::pending_txn_
private

Definition at line 201 of file ovsdb_client_idl.h.

std::unique_ptr<PhysicalLocatorTable> OVSDB::OvsdbClientIdl::physical_locator_table_
private

Definition at line 231 of file ovsdb_client_idl.h.

std::unique_ptr<PhysicalPortTable> OVSDB::OvsdbClientIdl::physical_port_table_
private

Definition at line 230 of file ovsdb_client_idl.h.

std::unique_ptr<PhysicalSwitchTable> OVSDB::OvsdbClientIdl::physical_switch_table_
private

Definition at line 228 of file ovsdb_client_idl.h.

WorkQueue<OvsdbMsg *>* OVSDB::OvsdbClientIdl::receive_queue_
private

Definition at line 207 of file ovsdb_client_idl.h.

tbb::atomic<int> OVSDB::OvsdbClientIdl::refcount_
private

Definition at line 225 of file ovsdb_client_idl.h.

std::unique_ptr<OvsPeer> OVSDB::OvsdbClientIdl::route_peer_
private

Definition at line 226 of file ovsdb_client_idl.h.

OvsdbClientSession* OVSDB::OvsdbClientIdl::session_
private

Definition at line 198 of file ovsdb_client_idl.h.

TxnStats OVSDB::OvsdbClientIdl::stats_
private

Definition at line 223 of file ovsdb_client_idl.h.

std::unique_ptr<UnicastMacLocalOvsdb> OVSDB::OvsdbClientIdl::unicast_mac_local_ovsdb_
private

Definition at line 233 of file ovsdb_client_idl.h.

std::unique_ptr<VlanPortBindingTable> OVSDB::OvsdbClientIdl::vlan_port_table_
private

Definition at line 232 of file ovsdb_client_idl.h.

std::unique_ptr<VMInterfaceKSyncObject> OVSDB::OvsdbClientIdl::vm_interface_table_
private

Definition at line 227 of file ovsdb_client_idl.h.

std::unique_ptr<VnOvsdbObject> OVSDB::OvsdbClientIdl::vn_ovsdb_
private

Definition at line 236 of file ovsdb_client_idl.h.

std::unique_ptr<VrfOvsdbObject> OVSDB::OvsdbClientIdl::vrf_ovsdb_
private

Definition at line 235 of file ovsdb_client_idl.h.

struct vteprec_global* OVSDB::OvsdbClientIdl::vtep_global_
private

Definition at line 197 of file ovsdb_client_idl.h.

std::unique_ptr<OvsdbResourceVxLanIdTable> OVSDB::OvsdbClientIdl::vxlan_table_
private

Definition at line 237 of file ovsdb_client_idl.h.


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