OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ovsdb_client_idl.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #include <assert.h>
6 #include <cstddef>
7 #include <string.h>
8 #include <stdlib.h>
9 
10 extern "C" {
11 #include <ovsdb_wrapper.h>
12 };
13 #include <oper/agent_sandesh.h>
14 #include <ovsdb_types.h>
16 #include <ovsdb_client_idl.h>
17 #include <ovsdb_client_session.h>
18 #include <ovsdb_route_peer.h>
19 #include <ovsdb_entry.h>
20 #include <physical_switch_ovsdb.h>
21 #include <logical_switch_ovsdb.h>
22 #include <physical_port_ovsdb.h>
23 #include <physical_locator_ovsdb.h>
28 #include <vm_interface_ksync.h>
29 #include <vn_ovsdb.h>
30 #include <vrf_ovsdb.h>
32 
36 
38 class InterfaceTable;
40 
56 
57 namespace OVSDB {
58 void ovsdb_wrapper_idl_callback(void *idl_base, int op,
59  struct ovsdb_idl_row *row) {
60  OvsdbClientIdl *client_idl = (OvsdbClientIdl *) idl_base;
61  int i = ovsdb_wrapper_row_type(row);
63  return;
64  if (client_idl->callback_[i] != NULL)
65  client_idl->callback_[i]((OvsdbClientIdl::Op)op, row);
66 }
67 
68 void ovsdb_wrapper_idl_txn_ack(void *idl_base, struct ovsdb_idl_txn *txn) {
69  OvsdbClientIdl *client_idl = (OvsdbClientIdl *) idl_base;
70  OvsdbEntryList &entry_list = client_idl->pending_txn_[txn];
71  bool success = ovsdb_wrapper_is_txn_success(txn);
72  if (!success) {
73  // increment stats.
74  client_idl->stats_.txn_failed++;
75  OVSDB_TRACE(Error, "Transaction failed: " +
76  std::string(ovsdb_wrapper_txn_get_error(txn)));
77  // we don't handle the case where txn fails, when entry is not present
78  // case of unicast_mac_remote entry.
79  assert(!entry_list.empty());
80  } else {
81  // increment stats.
82  client_idl->stats_.txn_succeeded++;
83  }
84 
85  // trigger ack for all the entries encode in this txn
86  OvsdbEntryList::iterator it;
87  for (it = entry_list.begin(); it != entry_list.end(); ++it) {
88  OvsdbEntryBase *entry = *it;
89  entry->Ack(success);
90  }
91 
92  // Donot Access entry_list ref after transaction delete
93  client_idl->DeleteTxn(txn);
94 
95  // if there are pending txn messages to be scheduled, pick one and schedule
96  if (!client_idl->pending_send_msgs_.empty()) {
97  client_idl->session_->SendJsonRpc(client_idl->pending_send_msgs_.front());
98  client_idl->pending_send_msgs_.pop();
99  }
100 }
101 
103  assert(p->deleted_ == false);
104  p->refcount_++;
105 }
106 
108  int count = --p->refcount_;
109  switch (count) {
110  case 1:
111  // intrusive pointer for IDL is always taken first by session while
112  // creating new object, and the last reference remaining is always
113  // with the session object which on cleanup release idl object.
115  "Triggered Session Cleanup on Close");
116 
117  // intrusive pointer reference to idl is removed only when ksync
118  // object is empty, with this assumption trigger delete for KsyncDb
119  // Objects in KSync Context.
130  p->session_->OnCleanup();
131  break;
132  case 0:
133  OVSDB_SM_TRACE(Trace, "Deleted IDL associated to Closed Session");
134  delete p;
135  break;
136  default:
137  break;
138  }
139 }
140 
141 };
142 
143 OvsdbClientIdl::OvsdbClientIdl(OvsdbClientSession *session, Agent *agent,
144  OvsPeerManager *manager) : idl_(ovsdb_wrapper_idl_create()),
145  session_(session), agent_(agent), pending_txn_(), deleted_(false),
146  manager_(manager), connection_state_(OvsdbSessionRcvWait),
147  keepalive_timer_(TimerManager::CreateTimer(
148  *(agent->event_manager())->io_service(),
149  "OVSDB Client Keep Alive Timer",
150  agent->task_scheduler()->GetTaskId("Agent::KSync"), 0)),
151  monitor_request_id_(NULL), bulk_txn_(NULL), stats_() {
152  refcount_ = 0;
154  ovsdb_wrapper_idl_set_callback(idl_, (void *)this,
157  agent->task_scheduler()->GetTaskId("Agent::KSync"), 0,
158  boost::bind(&OvsdbClientIdl::ProcessMessage, this, _1));
159  receive_queue_->set_name("OVSDB receive queue");
160  for (int i = 0; i < OVSDB_TYPE_COUNT; i++) {
161  callback_[i] = NULL;
162  }
163  route_peer_.reset(manager->Allocate(session_->remote_ip()));
166  (DBTable *)agent->interface_table()));
168  logical_switch_table_.reset(new LogicalSwitchTable(this));
169  physical_port_table_.reset(new PhysicalPortTable(this));
171  vlan_port_table_.reset(new VlanPortBindingTable(this));
173  route_peer()));
175  route_peer()));
176  vrf_ovsdb_.reset(new VrfOvsdbObject(this));
177  vn_ovsdb_.reset(new VnOvsdbObject(this, (DBTable *)agent->vn_table()));
178 }
179 
181  if (monitor_request_id_ != NULL) {
183  monitor_request_id_ = NULL;
184  }
185 
187  receive_queue_->Shutdown();
188  delete receive_queue_;
189  manager_->Free(route_peer_.release());
191 }
192 
193 OvsdbClientIdl::OvsdbMsg::OvsdbMsg(struct jsonrpc_msg *m) : msg(m) {
194 }
195 
197  if (this->msg != NULL) {
199  this->msg = NULL;
200  }
201 }
202 
203 OvsdbClientIdl::TxnStats::TxnStats() : txn_initiated(0), txn_succeeded(0),
204  txn_failed(0) {
205 }
206 
208  if (deleted_) {
210  "IDL deleted skipping Monitor Request");
211  return;
212  }
213 
214  struct jsonrpc_msg *monitor_request =
216 
217  assert(monitor_request_id_ == NULL);
218  // clone and save json for monitor request
220 
221  OVSDB_SESSION_TRACE(Trace, session_, "Sending Monitor Request");
222  session_->SendJsonRpc(monitor_request);
223 
224  int keepalive_intv = session_->keepalive_interval();
225  if (keepalive_intv == 0) {
226  // timer configured not to run, return from here.
227  return;
228  }
229 
230  // Start the Keep Alives
231  keepalive_timer_->Start(keepalive_intv,
232  boost::bind(&OvsdbClientIdl::KeepAliveTimerCb, this));
233 }
234 
235 void OvsdbClientIdl::TxnScheduleJsonRpc(struct jsonrpc_msg *msg) {
236  // increment stats.
238 
241  session_->SendJsonRpc(msg);
242  } else {
243  // throttle txn messages, push the message to pending send
244  // msg queue to be scheduled later.
245  pending_send_msgs_.push(msg);
246  }
247 }
248 
250  if (!deleted_) {
251  // NULL message, echo req and reply messages are just enqueued to
252  // identify session activity, since they need no further processing
253  // skip and delete the message
254  if (msg->msg != NULL &&
257  bool connect_oper_db = false;
259  msg->msg)) {
260  // destroy saved monitor request json message
262  monitor_request_id_ = NULL;
263  connect_oper_db = true;
264  }
266  // msg->msg is freed by process method above
267  msg->msg = NULL;
268 
269  // after processing the response to monitor request
270  // connect to oper db.
271  if (connect_oper_db) {
272  // enable physical port updation, before connect to
273  // Oper DB, to allow creation of stale entries for
274  // vlan port bindings.
275  physical_switch_table_->StartUpdatePorts();
276 
277  physical_port_table_->set_stale_create_done();
278 
279  ConnectOperDB();
280  }
281  }
283  }
284  delete msg;
285  return true;
286 }
287 
288 struct ovsdb_idl_txn *OvsdbClientIdl::CreateTxn(OvsdbEntryBase *entry,
289  KSyncEntry::KSyncEvent ack_event) {
290  assert(ConcurrencyCheck());
291  if (deleted_) {
292  // Don't create new transactions for deleted idl.
293  return NULL;
294  }
295 
296  // while encode a non bulk entry send the previous bulk entry to ensure
297  // sanity of txns
298  if (bulk_txn_ != NULL) {
299  // reset bulk_txn_ and bulk_entries_ before triggering EncodeSendTxn
300  // to let the transaction send go through
302  bulk_entries_.clear();
303  struct ovsdb_idl_txn *bulk_txn = bulk_txn_;
304  bulk_txn_ = NULL;
305  EncodeSendTxn(bulk_txn, NULL);
306  }
307 
308  struct ovsdb_idl_txn *txn = ovsdb_wrapper_idl_txn_create(idl_);
309  OvsdbEntryList entry_list;
310  if (entry != NULL) {
311  entry_list.insert(entry);
312  // if entry is available store the ack_event in entry
313  entry->ack_event_ = ack_event;
314  }
315  pending_txn_[txn] = entry_list;
316  return txn;
317 }
318 
319 struct ovsdb_idl_txn *OvsdbClientIdl::CreateBulkTxn(OvsdbEntryBase *entry,
320  KSyncEntry::KSyncEvent ack_event) {
321  assert(ConcurrencyCheck());
322  if (deleted_) {
323  // Don't create new transactions for deleted idl.
324  return NULL;
325  }
326 
327  if (bulk_txn_ == NULL) {
328  // if bulk txn is not available create one
330  }
331 
332  struct ovsdb_idl_txn *bulk_txn = bulk_txn_;
333 
334  // bulk txn can be done only for entries
335  assert(entry != NULL);
336  bulk_entries_.insert(entry);
337  entry->ack_event_ = ack_event;
338 
339  // try creating bulk transaction only if pending txn are there
340  if (pending_txn_.empty() || bulk_entries_.size() == OVSDBEntriesInBulkTxn) {
341  // once done bunch entries add the txn to pending txn list and
342  // reset bulk_txn_ to let EncodeSendTxn proceed with bulk txn
344  bulk_txn_ = NULL;
345  bulk_entries_.clear();
346  }
347  return bulk_txn;
348 }
349 
350 bool OvsdbClientIdl::EncodeSendTxn(struct ovsdb_idl_txn *txn,
351  OvsdbEntryBase *skip_entry) {
352  assert(ConcurrencyCheck());
353  // return false to wait for bulk txn to complete
354  if (txn == bulk_txn_) {
355  return false;
356  }
357 
358  struct jsonrpc_msg *msg = ovsdb_wrapper_idl_txn_encode(txn);
359  if (msg == NULL) {
360  // if it was a bulk transaction trigger Ack for previously
361  // held entries, that are waiting for Ack
362  OvsdbEntryList &entry_list = pending_txn_[txn];
363  OvsdbEntryList::iterator it;
364  for (it = entry_list.begin(); it != entry_list.end(); ++it) {
365  OvsdbEntryBase *entry = *it;
366  if (entry != skip_entry) {
367  entry->Ack(true);
368  } else {
369  entry->TxnDoneNoMessage();
370  }
371  }
372  DeleteTxn(txn);
373  return true;
374  }
375  TxnScheduleJsonRpc(msg);
376  return false;
377 }
378 
379 void OvsdbClientIdl::DeleteTxn(struct ovsdb_idl_txn *txn) {
380  assert(ConcurrencyCheck());
381  pending_txn_.erase(txn);
382  // third party code and handle only one txn at a time,
383  // if there is a pending bulk entry encode and send before
384  // destroying the current txn
385  if (bulk_txn_ != NULL) {
387  bulk_entries_.clear();
388  struct ovsdb_idl_txn *bulk_txn = bulk_txn_;
389  bulk_txn_ = NULL;
390  EncodeSendTxn(bulk_txn, NULL);
391  }
393 }
394 
395 // API to trigger ovs row del followed by add
396 // used by OvsdbEntry on catastrophic change event, which
397 // results in emulating a delete followed by add
398 void OvsdbClientIdl::NotifyDelAdd(struct ovsdb_idl_row *row) {
399  int i = ovsdb_wrapper_row_type(row);
401  return;
402  if (callback_[i] != NULL) {
405  }
406 }
407 
409  return session_->tsn_ip();
410 }
411 
412 void OvsdbClientIdl::MessageProcess(struct jsonrpc_msg *msg) {
413  // Enqueue all received messages in receive queue running KSync task
414  // context, to assure only one thread is writting data to OVSDB client.
415  OvsdbMsg *ovs_msg = new OvsdbMsg(msg);
416  receive_queue_->Enqueue(ovs_msg);
417 }
418 
420  return session_->remote_ip();
421 }
422 
423 uint16_t OvsdbClientIdl::remote_port() const {
424  return session_->remote_port();
425 }
426 
428  return session_->connection_table();
429 }
430 
432  return session_->ksync_obj_manager();
433 }
434 
436  return route_peer_.get();
437 }
438 
440  return vm_interface_table_.get();
441 }
442 
444  return physical_switch_table_.get();
445 }
446 
448  return logical_switch_table_.get();
449 }
450 
452  return physical_port_table_.get();
453 }
454 
456  return physical_locator_table_.get();
457 }
458 
460  return vlan_port_table_.get();
461 }
462 
464  return unicast_mac_local_ovsdb_.get();
465 }
466 
468  return multicast_mac_local_ovsdb_.get();
469 }
470 
472  return vrf_ovsdb_.get();
473 }
474 
476  return vn_ovsdb_.get();
477 }
478 
480  return vxlan_table_.get();
481 }
482 
484  return !keepalive_timer_->cancelled();
485 }
486 
488  return (monitor_request_id_ != NULL);
489 }
490 
492  switch (connection_state_) {
493  case OvsdbSessionActive:
494  // session is active, move to Receive wait state to
495  // identify session activity.
497  return true;
498  case OvsdbSessionRcvWait:
499  {
500  // send echo request and restart the timer to wait for reply
501  struct jsonrpc_msg *req = ovsdb_wrapper_jsonrpc_create_echo_request();
503  session_->SendJsonRpc(req);
504  }
505  return true;
507  // echo reply not recevied ovsdb-server is not responding,
508  // close the session
510  "KeepAlive failed, Closing Session");
512  // Connection is closed, timer doesn't need restart
513  return false;
514  }
515  return true;
516 }
517 
519  // if idl is already marked for delete, return from here
520  if (deleted_) {
521  return;
522  }
523 
524  // mark idl being set for deletion, so we don't create further txn
525  deleted_ = true;
526 
527  // mark peer to stop add/change of routes
528  route_peer_->StopRouteExports();
529 
530  // Since IDL is scheduled for deletion cancel keepalive timer
532 
533  // trigger txn failure for pending transcations
534  PendingTxnMap::iterator it = pending_txn_.begin();
535  while (it != pending_txn_.end()) {
536  OvsdbEntryList &entry_list = it->second;
537  // Ack failure, if any entry is available.
538  OvsdbEntryList::iterator entry_it;
539  for (entry_it = entry_list.begin(); entry_it != entry_list.end();
540  ++entry_it) {
541  OvsdbEntryBase *entry = *entry_it;
542  entry->Ack(false);
543  }
544  DeleteTxn(it->first);
545  it = pending_txn_.begin();
546  }
547 
548  while (!pending_send_msgs_.empty()) {
549  // flush and destroy all the pending send messages
551  pending_send_msgs_.pop();
552  }
553 
554  // trigger KSync Object delete for all objects.
555  vm_interface_table_->DeleteTable();
556  physical_switch_table_->DeleteTable();
557 
558  // trigger Process Delete, which will do internal processing to
559  // clear self reference from logical switch before triggering
560  // delete table
561  logical_switch_table_->ProcessDeleteTableReq();
562 
563  physical_port_table_->DeleteTable();
564  physical_locator_table_->DeleteTable();
565  vlan_port_table_->DeleteTable();
566  unicast_mac_local_ovsdb_->DeleteTable();
567  multicast_mac_local_ovsdb_->DeleteTable();
568  vn_ovsdb_->DeleteTable();
569 
570  // trigger delete table for vrf table, which internally handles
571  // deletion of route table.
572  vrf_ovsdb_->DeleteTable();
573 }
574 
576  return stats_;
577 }
578 
580  return pending_txn_.size();
581 }
582 
584  return pending_send_msgs_.size();
585 }
586 
588  Task *current = Task::Running();
589  static int ksync_task_id = -1;
590  static int db_task_id = -1;
591 
592  if (ksync_task_id == -1)
593  ksync_task_id = agent_->task_scheduler()->GetTaskId("Agent::KSync");
594 
595  if (db_task_id == -1)
596  db_task_id = agent_->task_scheduler()->GetTaskId("db::DBTable");
597 
598  if (current == NULL) {
599  return session_->TestConcurrencyAllow();
600  }
601 
602  if (current->GetTaskId() == ksync_task_id) {
603  return true;
604  }
605 
606  if (current->GetTaskId() == db_task_id) {
607  return true;
608  }
609 
610  return false;
611 }
612 
615  "Received Monitor Response connecting to OperDb");
616  logical_switch_table_->OvsdbRegisterDBTable(
618  vlan_port_table_->OvsdbRegisterDBTable(
620  vrf_ovsdb_->OvsdbRegisterDBTable(
621  (DBTable *)agent_->vrf_table());
622 }
623 
std::unique_ptr< VlanPortBindingTable > vlan_port_table_
void NotifyDelAdd(struct ovsdb_idl_row *row)
int ovsdb_wrapper_row_type(struct ovsdb_idl_row *row)
void intrusive_ptr_release(ConnectionStateEntry *p)
virtual Ip4Address tsn_ip()=0
#define OVSDB_TRACE(obj,...)
virtual void OnCleanup()=0
std::unique_ptr< PhysicalLocatorTable > physical_locator_table_
bool ConcurrencyCheck() const
virtual void TxnDoneNoMessage()
Definition: ovsdb_entry.h:27
virtual bool ThrottleInFlightTxnMessages()
std::set< OvsdbEntryBase * > OvsdbEntryList
static Task * Running()
Returns a pointer to the current task the code is executing under.
Definition: task.cc:1562
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 *)
const char * ovsdb_wrapper_txn_get_error(struct ovsdb_idl_txn *txn)
std::unique_ptr< PhysicalSwitchTable > physical_switch_table_
struct ovsdb_idl * idl_
void intrusive_ptr_add_ref(ConnectionStateEntry *p)
KSyncObjectManager * ksync_obj_manager()
struct jsonrpc_msg * ovsdb_wrapper_jsonrpc_create_echo_request()
OvsdbEntryList bulk_entries_
struct ovsdb_idl_txn * bulk_txn_
std::unique_ptr< VMInterfaceKSyncObject > vm_interface_table_
OvsPeer * Allocate(const IpAddress &peer_ip)
bool ProcessMessage(OvsdbMsg *msg)
ConnectionStateTable * connection_table()
PendingTxnMap pending_txn_
InterfaceTable * interface_table() const
Definition: agent.h:465
VnTable * vn_table() const
Definition: agent.h:495
static const std::size_t OVSDBEntriesInBulkTxn
void ovsdb_wrapper_idl_txn_ack(void *idl_base, struct ovsdb_idl_txn *txn)
void SendJsonRpc(struct jsonrpc_msg *msg)
PhysicalLocatorTable * physical_locator_table()
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
Definition: sandesh_trace.h:18
friend void ovsdb_wrapper_idl_callback(void *, int, struct ovsdb_idl_row *)
VMInterfaceKSyncObject * vm_interface_table()
virtual uint16_t remote_port() const =0
MulticastMacLocalOvsdb * multicast_mac_local_ovsdb()
static void Unregister(KSyncObject *)
Ip4Address remote_ip() const
virtual Ip4Address remote_ip() const =0
uint16_t remote_port() const
struct json * ovsdb_wrapper_jsonrpc_clone_id(struct jsonrpc_msg *msg)
int GetTaskId(const std::string &name)
Definition: task.cc:856
bool ovsdb_wrapper_msg_echo_req(struct jsonrpc_msg *msg)
std::unique_ptr< UnicastMacLocalOvsdb > unicast_mac_local_ovsdb_
ThrottledTxnMsgs pending_send_msgs_
std::unique_ptr< VrfOvsdbObject > vrf_ovsdb_
virtual void TriggerClose()=0
VnOvsdbObject * vn_ovsdb()
void DeleteTxn(struct ovsdb_idl_txn *txn)
TaskScheduler * task_scheduler() const
Definition: agent.h:1120
void ovsdb_wrapper_idl_msg_process(struct ovsdb_idl *, struct jsonrpc_msg *msg)
Definition: agent.h:358
OvsdbMsg(struct jsonrpc_msg *m)
void MessageProcess(const u_int8_t *buf, std::size_t len)
struct ovsdb_idl * ovsdb_wrapper_idl_create()
SandeshTraceBufferPtr OvsdbSMTraceBuf
#define OVSDB_SM_TRACE(obj,...)
OvsdbResourceVxLanIdTable * vxlan_table()
void Free(OvsPeer *peer)
Definition: trace.h:220
uint64_t pending_send_msg_count() const
PhysicalDeviceVnTable * physical_device_vn_table() const
Definition: agent.h:635
void ovsdb_wrapper_jsonrpc_msg_destroy(struct jsonrpc_msg *msg)
struct jsonrpc_msg * ovsdb_wrapper_idl_encode_monitor_request(struct ovsdb_idl *)
WorkQueue< OvsdbMsg * > * receive_queue_
OvsPeerManager * manager_
OvsdbClientSession * session_
#define OVSDB_SESSION_TRACE(obj, session,...)
void ovsdb_wrapper_idl_txn_destroy(struct ovsdb_idl_txn *txn)
boost::asio::ip::address_v4 Ip4Address
Definition: address.h:14
bool Cancel()
Definition: timer.cc:150
VrfOvsdbObject * vrf_ovsdb()
LogicalSwitchTable * logical_switch_table()
VrfTable * vrf_table() const
Definition: agent.h:485
std::unique_ptr< OvsdbResourceVxLanIdTable > vxlan_table_
bool cancelled() const
Definition: timer.h:100
std::unique_ptr< OvsPeer > route_peer_
std::unique_ptr< LogicalSwitchTable > logical_switch_table_
virtual int keepalive_interval()=0
void ovsdb_wrapper_idl_destroy(struct ovsdb_idl *idl)
void ovsdb_wrapper_json_destroy(struct json *)
int GetTaskId() const
Definition: task.h:118
struct json * monitor_request_id_
PhysicalPortTable * physical_port_table()
bool ovsdb_wrapper_idl_msg_is_monitor_response(struct json *, struct jsonrpc_msg *)
NotifyCB callback_[OVSDB_TYPE_COUNT]
struct jsonrpc_msg * ovsdb_wrapper_idl_txn_encode(struct ovsdb_idl_txn *txn)
uint64_t pending_txn_count() const
virtual void Ack(bool success)=0
bool Start(int time, Handler handler, ErrorHandler error_handler=NULL)
Definition: timer.cc:108
struct vteprec_global * vtep_global_
virtual KSyncObjectManager * ksync_obj_manager()=0
struct ovsdb_idl_txn * ovsdb_wrapper_idl_txn_create(struct ovsdb_idl *idl)
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_
bool ovsdb_wrapper_msg_echo_reply(struct jsonrpc_msg *msg)
void ovsdb_wrapper_idl_callback(void *idl_base, int op, struct ovsdb_idl_row *row)
static const std::size_t OVSDBMaxInFlightPendingTxn
void ovsdb_wrapper_idl_set_callback(struct ovsdb_idl *idl, void *idl_base, void(*cb)(void *, int, struct ovsdb_idl_row *), void(*ack_cb)(void *, struct ovsdb_idl_txn *))
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)
Task is a wrapper over tbb::task to support policies.
Definition: task.h:86
struct vteprec_global * ovsdb_wrapper_vteprec_global_first(struct ovsdb_idl *)
bool ovsdb_wrapper_is_txn_success(struct ovsdb_idl_txn *txn)
virtual ConnectionStateTable * connection_table()=0
tbb::atomic< int > refcount_
SandeshTraceBufferPtr SandeshTraceBufferCreate(const std::string &buf_name, size_t buf_size, bool trace_enable=true)
Definition: sandesh_trace.h:46
static bool DeleteTimer(Timer *Timer)
Definition: timer.cc:222
SandeshTraceBufferPtr OvsdbTraceBuf
PhysicalSwitchTable * physical_switch_table()
KSyncEntry::KSyncEvent ack_event_
Definition: ovsdb_entry.h:34
std::unique_ptr< PhysicalPortTable > physical_port_table_