5 #ifndef SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_CLIENT_IDL_H_
6 #define SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_CLIENT_IDL_H_
11 #include <boost/intrusive_ptr.hpp>
12 #include <tbb/atomic.h>
16 #include <agent_types.h>
23 #define OVSDB_TRACE(obj, ...)\
25 Ovsdb##obj::TraceMsg(OvsdbTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
28 #define OVSDB_PKT_TRACE(obj, ...)\
30 Ovsdb##obj::TraceMsg(OvsdbPktTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
38 class OvsdbClientSession;
39 class VMInterfaceKSyncObject;
40 class PhysicalSwitchTable;
41 class LogicalSwitchTable;
42 class PhysicalPortTable;
43 class PhysicalLocatorTable;
44 class VlanPortBindingTable;
45 class PhysicalLocatorTable;
46 class UnicastMacLocalOvsdb;
47 class MulticastMacLocalOvsdb;
51 class ConnectionStateTable;
52 class OvsdbResourceVxLanIdTable;
99 struct jsonrpc_msg *
msg;
109 typedef boost::function<void(OvsdbClientIdl::Op, struct ovsdb_idl_row *)>
NotifyCB;
139 void DeleteTxn(
struct ovsdb_idl_txn *txn);
180 const TxnStats &
stats()
const;
242 #endif // SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_CLIENT_IDL_H_
std::unique_ptr< VlanPortBindingTable > vlan_port_table_
void NotifyDelAdd(struct ovsdb_idl_row *row)
bool IsMonitorInProcess()
std::unique_ptr< PhysicalLocatorTable > physical_locator_table_
bool ConcurrencyCheck() const
std::set< OvsdbEntryBase * > OvsdbEntryList
struct ovsdb_idl_txn * CreateBulkTxn(OvsdbEntryBase *entry, KSyncEntry::KSyncEvent ack_event=KSyncEntry::ADD_ACK)
OvsdbSessionState connection_state_
friend void ovsdb_wrapper_idl_txn_ack(void *, struct ovsdb_idl_txn *)
std::unique_ptr< PhysicalSwitchTable > physical_switch_table_
DISALLOW_COPY_AND_ASSIGN(OvsdbClientIdl)
KSyncObjectManager * ksync_obj_manager()
OvsdbEntryList bulk_entries_
struct ovsdb_idl_txn * bulk_txn_
std::unique_ptr< VMInterfaceKSyncObject > vm_interface_table_
bool ProcessMessage(OvsdbMsg *msg)
ConnectionStateTable * connection_table()
PendingTxnMap pending_txn_
static const std::size_t OVSDBEntriesInBulkTxn
friend void intrusive_ptr_add_ref(OvsdbClientIdl *p)
bool IsKeepAliveTimerActive()
PhysicalLocatorTable * physical_locator_table()
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
friend void ovsdb_wrapper_idl_callback(void *, int, struct ovsdb_idl_row *)
VMInterfaceKSyncObject * vm_interface_table()
void Register(EntryType type, NotifyCB cb)
MulticastMacLocalOvsdb * multicast_mac_local_ovsdb()
Ip4Address remote_ip() const
uint16_t remote_port() const
std::unique_ptr< UnicastMacLocalOvsdb > unicast_mac_local_ovsdb_
ThrottledTxnMsgs pending_send_msgs_
std::unique_ptr< VrfOvsdbObject > vrf_ovsdb_
std::queue< struct jsonrpc_msg * > ThrottledTxnMsgs
VnOvsdbObject * vn_ovsdb()
void DeleteTxn(struct ovsdb_idl_txn *txn)
OvsdbMsg(struct jsonrpc_msg *m)
void MessageProcess(const u_int8_t *buf, std::size_t len)
std::map< struct ovsdb_idl_txn *, OvsdbEntryList > PendingTxnMap
SandeshTraceBufferPtr OvsdbSMTraceBuf
boost::function< void(OvsdbClientIdl::Op, struct ovsdb_idl_row *)> NotifyCB
boost::intrusive_ptr< OvsdbClientIdl > OvsdbClientIdlPtr
OvsdbResourceVxLanIdTable * vxlan_table()
uint64_t pending_send_msg_count() const
WorkQueue< OvsdbMsg * > * receive_queue_
OvsPeerManager * manager_
OvsdbClientSession * session_
boost::asio::ip::address_v4 Ip4Address
VrfOvsdbObject * vrf_ovsdb()
LogicalSwitchTable * logical_switch_table()
OvsdbClientIdl(OvsdbClientSession *session, Agent *agent, OvsPeerManager *manager)
std::unique_ptr< OvsdbResourceVxLanIdTable > vxlan_table_
std::unique_ptr< OvsPeer > route_peer_
std::unique_ptr< LogicalSwitchTable > logical_switch_table_
void UnRegister(EntryType type)
struct json * monitor_request_id_
PhysicalPortTable * physical_port_table()
NotifyCB callback_[OVSDB_TYPE_COUNT]
uint64_t pending_txn_count() const
struct vteprec_global * vtep_global_
std::unique_ptr< VnOvsdbObject > vn_ovsdb_
void TxnScheduleJsonRpc(struct jsonrpc_msg *msg)
SandeshTraceBufferPtr OvsdbPktTraceBuf
VlanPortBindingTable * vlan_port_table()
UnicastMacLocalOvsdb * unicast_mac_local_ovsdb()
std::unique_ptr< MulticastMacLocalOvsdb > multicast_mac_local_ovsdb_
friend void intrusive_ptr_release(OvsdbClientIdl *p)
static const std::size_t OVSDBMaxInFlightPendingTxn
struct ovsdb_idl_txn * CreateTxn(OvsdbEntryBase *entry, KSyncEntry::KSyncEvent ack_event=KSyncEntry::ADD_ACK)
const TxnStats & stats() const
bool EncodeSendTxn(struct ovsdb_idl_txn *txn, OvsdbEntryBase *skip_entry)
virtual ~OvsdbClientIdl()
tbb::atomic< int > refcount_
SandeshTraceBufferPtr OvsdbTraceBuf
PhysicalSwitchTable * physical_switch_table()
std::unique_ptr< PhysicalPortTable > physical_port_table_