OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ksync_sock.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef ctrlplane_ksync_sock_h
6 #define ctrlplane_ksync_sock_h
7 
8 #include <vector>
9 #include <boost/asio.hpp>
10 #include <boost/asio/buffer.hpp>
11 
12 #include <boost/asio/netlink_protocol.hpp>
13 #include <boost/asio/netlink_endpoint.hpp>
14 
15 #include <tbb/atomic.h>
16 #include <tbb/mutex.h>
17 
18 #include <base/queue_task.h>
19 #include <sandesh/common/vns_constants.h>
20 #include <sandesh/common/vns_types.h>
21 #include <io/tcp_session.h>
22 #include <vr_types.h>
23 #include <nl_util.h>
24 #include "ksync_entry.h"
25 #include "ksync_tx_queue.h"
26 
27 #define KSYNC_DEFAULT_MSG_SIZE 4096
28 #define KSYNC_DEFAULT_Q_ID_SEQ 0x00000001
29 #define KSYNC_ACK_WAIT_THRESHOLD 200
30 #define KSYNC_SOCK_RECV_BUFF_SIZE (256 * 1024)
31 #define KSYNC_BMC_ARR_SIZE 1024
32 
33 class KSyncEntry;
34 class KSyncIoContext;
36 struct nl_client;
38 
39 typedef std::vector<boost::asio::mutable_buffers_1> KSyncBufferList;
40 
41 uint32_t GetNetlinkSeqno(char *data);
42 bool NetlinkMsgDone(char *data);
43 bool ValidateNetlink(char *data);
44 void GetNetlinkPayload(char *data, char **buf, uint32_t *buf_len);
45 void InitNetlink(nl_client *client);
46 void ResetNetlink(nl_client *client);
47 void UpdateNetlink(nl_client *client, uint32_t len, uint32_t seq_no);
48 void DecodeSandeshMessages(char *buf, uint32_t buf_len, SandeshContext *sandesh_context,
49  uint32_t alignment);
50 
51 /* Base class to hold sandesh context information which is passed to
52  * Sandesh decode
53  */
55 public:
57  virtual ~AgentSandeshContext() { }
58 
59  virtual void IfMsgHandler(vr_interface_req *req) = 0;
60  virtual void NHMsgHandler(vr_nexthop_req *req) = 0;
61  virtual void RouteMsgHandler(vr_route_req *req) = 0;
62  virtual void MplsMsgHandler(vr_mpls_req *req) = 0;
63  virtual int VrResponseMsgHandler(vr_response *resp) = 0;
64  virtual void MirrorMsgHandler(vr_mirror_req *req) = 0;
65  virtual void FlowMsgHandler(vr_flow_req *req) = 0;
66  virtual void FlowResponseHandler(vr_flow_response *req) { assert(0); }
67  virtual void FlowTableInfoHandler(vr_flow_table_data *r) { assert(0); }
68  virtual void BridgeTableInfoHandler(vr_bridge_table_data *r) { assert(0);}
69  virtual void VrfAssignMsgHandler(vr_vrf_assign_req *req) = 0;
70  virtual void VrfMsgHandler(vr_vrf_req *req) = 0;
71  virtual void VrfStatsMsgHandler(vr_vrf_stats_req *req) = 0;
72  virtual void DropStatsMsgHandler(vr_drop_stats_req *req) = 0;
73  virtual void VxLanMsgHandler(vr_vxlan_req *req) = 0;
74  virtual void VrouterHugePageHandler(vr_hugepage_config *req) {}
75  virtual void VrouterOpsMsgHandler(vrouter_ops *req) = 0;
76  virtual void QosConfigMsgHandler(vr_qos_map_req *req) = 0;
77  virtual void ForwardingClassMsgHandler(vr_fc_map_req *req) = 0;
78  virtual void SetErrno(int err) {errno_ = err;}
79 
80  int GetErrno() const {return errno_;}
81  void set_ksync_io_ctx(const KSyncIoContext *ioc) {ksync_io_ctx_ = ioc;}
82  const KSyncIoContext *ksync_io_ctx() const {return ksync_io_ctx_;}
83 private:
84  int errno_;
86 };
87 
88 
89 /* Base class for context management. Used while sending and
90  * receiving data via ksync socket
91  */
92 class IoContext {
93 public:
94  // Type of IoContext. The work-queue used for processing response is based
95  // on this
96  // IOC_UVE : Used for UVEs
97  // IOC_KSYNC : Used for KSync objects
98  enum Type {
101  MAX_WORK_QUEUES // This should always be last
102  };
103  // Work-queue neames used for the ksync receive work-queues
104  static const char *io_wq_names[MAX_WORK_QUEUES];
105 
107  sandesh_context_(NULL), msg_(NULL), msg_len_(0), seqno_(0),
108  type_(IOC_KSYNC), index_(0), rx_buffer1_(NULL), rx_buffer2_(NULL) {
109  }
110  IoContext(char *msg, uint32_t len, uint32_t seq, AgentSandeshContext *ctx,
111  Type type) :
112  sandesh_context_(ctx), msg_(msg), msg_len_(len), seqno_(seq),
113  type_(type), index_(0), rx_buffer1_(NULL), rx_buffer2_(NULL) {
114  }
115  IoContext(char *msg, uint32_t len, uint32_t seq, AgentSandeshContext *ctx,
116  Type type, uint32_t index) :
117  sandesh_context_(ctx), msg_(msg), msg_len_(len), seqno_(seq),
118  type_(type), index_(index), rx_buffer1_(NULL), rx_buffer2_(NULL) {
119  }
120  virtual ~IoContext() {
121  if (msg_ != NULL)
122  free(msg_);
123  assert(rx_buffer1_ == NULL);
124  assert(rx_buffer2_ == NULL);
125  }
126 
127  bool operator<(const IoContext &rhs) const {
128  return seqno_ < rhs.seqno_;
129  }
130 
131  virtual void Handler() {}
132  virtual void ErrorHandler(int err) {}
133 
135  Type type() { return type_; }
136 
137  void SetSeqno(uint32_t seqno) {seqno_ = seqno;}
138  uint32_t GetSeqno() const {return seqno_;}
139  char *GetMsg() const { return msg_; }
140  uint32_t GetMsgLen() const { return msg_len_; }
141  char *rx_buffer1() const { return rx_buffer1_; }
142  void reset_rx_buffer1() { rx_buffer1_ = NULL; }
143  char *rx_buffer2() { return rx_buffer2_; }
144  void reset_rx_buffer2() { rx_buffer2_ = NULL; }
145  uint32_t index() const { return index_; }
146 
147  boost::intrusive::list_member_hook<> node_;
148 
149 protected:
151 
152 private:
153  char *msg_;
154  uint32_t msg_len_;
155  uint32_t seqno_;
157  uint32_t index_;
158  // Buffers allocated to read the ksync responses for this IoContext.
159  // As an optimization, KSync Tx Queue will use these buffers to minimize
160  // computation in KSync Tx Queue context.
161  char *rx_buffer1_;
162  char *rx_buffer2_;
163 
164  friend class KSyncSock;
165 };
166 
167 /* IoContext tied to KSyncEntry */
168 class KSyncIoContext : public IoContext {
169 public:
170  KSyncIoContext(KSyncSock *sock, KSyncEntry *sync_entry, int msg_len,
171  char *msg, KSyncEntry::KSyncEvent event);
172  virtual ~KSyncIoContext() {
173  }
174 
175  virtual void Handler();
176 
177  void ErrorHandler(int err);
178  KSyncEntry *GetKSyncEntry() const {return entry_;}
180 private:
185 };
186 
187 /*
188  * KSync implementation of bunching messages.
189  *
190  * Message bunching has two parts,
191  * Encoding messages
192  * KSyncTxQueue is responsible to bunch KSync requests into single message
193  *
194  * KSyncTxQueue uses KSyncBulkMsgContext to bunch KSync events.
195  * The IoContext for bunched KSync events are stored as list inside
196  * KSyncBulkMessageContext
197  *
198  * KSync Events are bunched if pass following constraints,
199  * - Number of KSync events is less than max_bulk_msg_count_
200  * - Total size of buffer for events is less than max_bulk_buf_size_
201  * - Type of IoContext is same.
202  * When type of IoContext is same, it also ensures that KSync Responses
203  * are processed in same WorkQueue.
204  * - Each IoContext type has multiple work-queues. Flows are sprayed across
205  * the work-queues based on flow-table index. Entries are bunched only if
206  * they belong to same work-queue.
207  * This also ensures that flows from a flow-table partition are processed
208  * in single KSync Response Work-Queue
209  * - The input queue for KSyncTxQueue is not empty.
210  *
211  * Decoding messages
212  * KSync response are processed in context of KSyncSock::receive_work_queue_.
213  * Each IoContext type has its own set of receive work-queue.
214  *
215  * Bulk decoder works on following assumption,
216  * - Expects KSync Responses for each IoContext in KSyncBulkMsgContext
217  * - Response for each IoContext can itself be more than one Sandesh Response.
218  * - The sequence of response is same as sequence of IoContext entries
219  * - Response for each IoContext starts with VrResponseMsg followed
220  * optionally by other response. Hence, decoder moves to next IoContext
221  * after getting VrResponse message
222  *
223  * class KSyncBulkSandeshContext is used to decode the Sandesh Responses
224  * and move the IoContext on getting VrResponse
225  */
226 typedef boost::intrusive::member_hook<IoContext,
227  boost::intrusive::list_member_hook<>,
229 typedef boost::intrusive::list<IoContext, KSyncSockNode> IoContextList;
230 
232 public:
233  const static unsigned kMaxRxBufferCount = 64;
234  KSyncBulkMsgContext(IoContext::Type type, uint32_t index);
237 
238  void Insert(IoContext *ioc);
239  void Data(KSyncBufferList *iovec);
241  return io_context_type_;
242  }
243  void AddReceiveBuffer(char *buff);
244  char *GetReceiveBuffer();
245  uint32_t work_queue_index() const { return work_queue_index_; }
246  void set_seqno(uint32_t seq) { seqno_ = seq; }
247  uint32_t seqno() { return seqno_; }
248 private:
250  // List of IoContext to be processed in this context
252  // Type of message
254  // Index of work-queue
256  // List of rx-buffers
257  // The buffers are taken from IoContext added to the list above
258  // If IoContext does not have buffer, then it dyamically allocates
259  // buffer
261  // Index of next buffer to process
263 
265  // Following fields are used for decode processing
267  // Number of responses already processed
269  // Iterator to IoContext being processed
270  IoContextList::iterator io_context_list_it_;
271  uint32_t seqno_;
272 };
273 
275 public:
277  virtual ~KSyncBulkSandeshContext();
278 
279  void IfMsgHandler(vr_interface_req *req);
280  void NHMsgHandler(vr_nexthop_req *req);
281  void RouteMsgHandler(vr_route_req *req);
282  void MplsMsgHandler(vr_mpls_req *req);
283  int VrResponseMsgHandler(vr_response *resp);
284  void MirrorMsgHandler(vr_mirror_req *req);
285  void FlowMsgHandler(vr_flow_req *req);
286  void FlowResponseHandler(vr_flow_response *req);
287  void VrfAssignMsgHandler(vr_vrf_assign_req *req);
288  void VrfMsgHandler(vr_vrf_req *req);
289  void VrfStatsMsgHandler(vr_vrf_stats_req *req);
290  void DropStatsMsgHandler(vr_drop_stats_req *req);
291  void VxLanMsgHandler(vr_vxlan_req *req);
292  void VrouterOpsMsgHandler(vrouter_ops *req);
293  void QosConfigMsgHandler(vr_qos_map_req *req);
294  void ForwardingClassMsgHandler(vr_fc_map_req *req);
295  void SetErrno(int err);
296 
297  bool Decoder(char *buff, uint32_t buff_len, uint32_t alignment, bool more);
300  bulk_msg_context_ = bulk_context;
301  }
302 
303  void IoContextStart();
304  void IoContextDone();
305 
306 private:
309 };
310 
311 class KSyncSock {
312 public:
313  // Number of flow receive queues
314  const static int kRxWorkQueueCount = 2;
315  const static int kMsgGrowSize = 16;
316  const static unsigned kBufLen = (4*1024);
317 
318  // Number of messages that can be bunched together
319  const static unsigned kMaxBulkMsgCount = 16;
320  // Max size of buffer that can be bunched together
321  const static unsigned kMaxBulkMsgSize = (4*1024);
322  // Sequence number to denote invalid builk-context
323  const static unsigned kInvalidBulkSeqNo = 0xFFFFFFFF;
324 
325  typedef std::map<uint32_t, KSyncBulkMsgContext> WaitTree;
326  typedef std::pair<uint32_t, KSyncBulkMsgContext> WaitTreePair;
327  typedef boost::function<void(const boost::system::error_code &, size_t)>
329 
330  // Request structure in the KSync Response Queue
331  struct KSyncRxData {
332  // buffer having KSync response
333  char *buff_;
334  // bulk context for decoding response
336 
337  KSyncRxData() : buff_(NULL), bulk_msg_context_(NULL) { }
338  KSyncRxData(const KSyncRxData &rhs) :
340  }
341  KSyncRxData(char *buff, KSyncBulkMsgContext *ctxt) :
342  buff_(buff), bulk_msg_context_(ctxt) {
343  }
344  };
346  // structure for ksyncrprocess Rx queue
352  entry_(entry), event_(event) {
353  }
354  };
356 
357  KSyncSock();
358  virtual ~KSyncSock();
359 
360  // Virtual methods
361  virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt) = 0;
362  virtual bool Decoder(char *data, AgentSandeshContext *ctxt) = 0;
363 
364  // Write a KSyncEntry to kernel
365  void SendAsync(KSyncEntry *entry, int msg_len, char *msg,
366  KSyncEntry::KSyncEvent event);
367  std::size_t BlockingSend(char *msg, int msg_len);
368  bool BlockingRecv();
369  void GenericSend(IoContext *ctx);
370  uint32_t AllocSeqNo(IoContext::Type type);
371  uint32_t AllocSeqNo(IoContext::Type type, uint32_t instance);
373  KSyncReceiveQueue *GetReceiveQueue(uint32_t seqno);
374 
375  // Bulk Messaging methods
376  KSyncBulkMsgContext *LocateBulkContext(uint32_t seqno,
377  IoContext::Type io_context_type,
378  uint32_t work_queue_index);
379  int SendBulkMessage(KSyncBulkMsgContext *bulk_context, uint32_t seqno);
380  bool TryAddToBulk(KSyncBulkMsgContext *bulk_context, IoContext *ioc);
381  void OnEmptyQueue(bool done);
382  int tx_count() const { return tx_count_; }
383 
384  // Start Ksync Asio operations
385  static void Start(bool read_inline);
386  static void Shutdown();
387 
388  // Partition to KSyncSock mapping
389  static KSyncSock *Get(DBTablePartBase *partition);
390  static KSyncSock *Get(int partition_id);
391 
392  static uint32_t GetPid() {return pid_;};
394  static void SetNetlinkFamilyId(int id);
395 
397  return agent_sandesh_ctx_[type % kRxWorkQueueCount];
398  }
399  static void SetAgentSandeshContext(AgentSandeshContext *ctx, uint32_t idx) {
400  agent_sandesh_ctx_[idx] = ctx;
401  }
402 
403  const KSyncTxQueue *send_queue() const { return &send_queue_; }
404  const KSyncReceiveQueue *get_receive_work_queue(uint16_t index) const {
405  return ksync_rx_queue[index];
406  }
407  // Allocate a recieve work-queue
408 
410  uint32_t task_id, uint32_t instance,
411  const char *name);
412 
413  uint32_t WaitTreeSize() const;
414  void SetSeqno(uint32_t seq);
415  void SetMeasureQueueDelay(bool val);
418  // API to enqueue ksync events to rx process work queue
420 protected:
421  static void Init(bool use_work_queue, const std::string &cpu_pin_policy);
422  static void SetSockTableEntry(KSyncSock *sock);
423  bool ValidateAndEnqueue(char *data, KSyncBulkMsgContext *context);
425  void ProcessDataInline(char *data);
426 
427  tbb::mutex mutex_;
428  nl_client *nl_client_;
429  // Tree of all IoContext pending ksync response
434 
435  // Information maintained for bulk processing
436 
437  // Max messages in one bulk context
439  // Max buffer size in one bulk context
441 
442  // Sequence number of first message in bulk context. Entry in WaitTree is
443  // added based on this sequence number
444  uint32_t bulk_seq_no_;
445  // Current buffer size in bulk context
446  uint32_t bulk_buf_size_;
447  // Current message count in bulk context
448  uint32_t bulk_msg_count_;
449 
450  uint32_t bmca_prod_;
451  uint32_t bmca_cons_;
453 
454 private:
455  friend class KSyncTxQueue;
456  virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb) = 0;
457  virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no,
458  HandlerCb cb) = 0;
459  virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no) = 0;
460  virtual void Receive(boost::asio::mutable_buffers_1) = 0;
461  virtual uint32_t GetSeqno(char *data) = 0;
462  virtual bool IsMoreData(char *data) = 0;
463  virtual bool Validate(char *data) = 0;
464 
465  // Read handler registered with boost::asio. Demux done based on seqno_
466  void ReadHandler(const boost::system::error_code& error,
467  size_t bytes_transferred);
468 
469  // Write handler registered with boost::asio. Demux done based on seqno_
470  void WriteHandler(const boost::system::error_code& error,
471  size_t bytes_transferred);
472 
473  bool ProcessKernelData(KSyncBulkSandeshContext *ksync_context,
474  const KSyncRxData &data);
475  bool ProcessRxData(KSyncRxQueueData data);
476  bool SendAsyncImpl(IoContext *ioc);
477  bool SendAsyncStart() {
478  tbb::mutex::scoped_lock lock(mutex_);
479  return (wait_tree_.size() <= KSYNC_ACK_WAIT_THRESHOLD);
480  }
481 
482 private:
483  char *rx_buff_;
484  tbb::atomic<uint32_t> seqno_;
485  tbb::atomic<uint32_t> uve_seqno_;
486  // Read ksync responses inline
487  // The IoContext WaitTree is not used when response is read-inline
494 
495  // Debug stats
499 
500  // IO context can defer ksync event processing
501  // by defering them to this work queue, this queue gets
502  // processed in Agent::KSync context
504  static std::unique_ptr<KSyncSock> sock_;
505  static pid_t pid_;
507  // AgentSandeshContext used for KSync response handling
508  // AgentSandeshContext used for decode is picked based on work-queue index
509  // Picking AgentSandeshContext based on work-queue index also makes it
510  // thread safe
512  static tbb::atomic<bool> shutdown_;
513 
515 };
516 
517 //netlink socket class for interacting with kernel
518 class KSyncSockNetlink : public KSyncSock {
519 public:
520  KSyncSockNetlink(boost::asio::io_context &ios, int protocol);
521  virtual ~KSyncSockNetlink();
522 
523  virtual uint32_t GetSeqno(char *data);
524  virtual bool IsMoreData(char *data);
525  virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt);
526  virtual bool Decoder(char *data, AgentSandeshContext *ctxt);
527  virtual bool Validate(char *data);
528  virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb);
529  virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no,
530  HandlerCb cb);
531  virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no);
532  virtual void Receive(boost::asio::mutable_buffers_1);
533 
534  static void NetlinkDecoder(char *data, SandeshContext *ctxt);
535  static void NetlinkBulkDecoder(char *data, SandeshContext *ctxt, bool more);
536  static void Init(boost::asio::io_context &ios, int protocol, bool use_work_queue,
537  const std::string &cpu_pin_policy);
538 private:
539  boost::asio::netlink::raw::socket sock_;
540 };
541 
542 //udp socket class for interacting with user vrouter
543 class KSyncSockUdp : public KSyncSock {
544 public:
545  KSyncSockUdp(boost::asio::io_context &ios, int port);
546  virtual ~KSyncSockUdp() { }
547 
548  virtual uint32_t GetSeqno(char *data);
549  virtual bool IsMoreData(char *data);
550  virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt);
551  virtual bool Decoder(char *data, AgentSandeshContext *ctxt);
552  virtual bool Validate(char *data);
553  virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb);
554  virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no,
555  HandlerCb cb);
556  virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no);
557  virtual void Receive(boost::asio::mutable_buffers_1);
558 
559  static void Init(boost::asio::io_context &ios, int port,
560  const std::string &cpu_pin_policy);
561 private:
562  boost::asio::ip::udp::socket sock_;
563  boost::asio::ip::udp::endpoint server_ep_;
564 };
565 
566 //Unix domain socket class for interacting with user vrouter
567 #define KSYNC_AGENT_VROUTER_SOCK_PATH "/var/run/vrouter/dpdk_netlink"
568 class KSyncSockUds : public KSyncSock {
569 public:
570  KSyncSockUds(boost::asio::io_context &ios);
571  virtual ~KSyncSockUds() {
572  delete rx_buff_;
573  delete rx_buff_q_;
574  }
575 
576  virtual uint32_t GetSeqno(char *data);
577  virtual bool IsMoreData(char *data);
578  virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt);
579  virtual bool Decoder(char *data, AgentSandeshContext *ctxt);
580  virtual bool Validate(char *data);
581  virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb);
582  virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no,
583  HandlerCb cb);
584  virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no);
585  virtual void Receive(boost::asio::mutable_buffers_1);
586  virtual bool Run(void);
587 
588  static void Init(boost::asio::io_context &ios,
589  const std::string &cpu_pin_policy,
590  const std::string &sockpathvr="");
591 private:
592  boost::asio::local::stream_protocol::socket sock_;
593  boost::asio::local::stream_protocol::endpoint server_ep_;
594  char *rx_buff_;
595  char *rx_buff_q_;
596  size_t remain_;
597  int socket_;
599  static string sockpath_;
600 };
601 
603 public:
606 
607 protected:
608  virtual int MsgLength(Buffer buffer, int offset);
609 
610  virtual const int GetHeaderLenSize() {
611  return sizeof(struct nlmsghdr);
612  }
613 
614  virtual const int GetMaxMessageSize() {
615  return kMaxMessageSize;
616  }
617 
618 private:
619  static const int kMaxMessageSize = 4096;
620 };
621 
623 public:
625  bool async_ready = false);
626  virtual ~KSyncSockTcpSession();
627 protected:
628  virtual void OnRead(Buffer buffer);
629 private:
631 };
632 
633 class KSyncSockTcp : public KSyncSock, public TcpServer {
634 public:
635  KSyncSockTcp(EventManager *evm, boost::asio::ip::address ip_addr,
636  int port);
637  virtual ~KSyncSockTcp() { }
638 
639  virtual uint32_t GetSeqno(char *data);
640  virtual bool IsMoreData(char *data);
641  virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt);
642  virtual bool Decoder(char *data, AgentSandeshContext *ctxt);
643  virtual bool Validate(char *data);
644  virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb);
645  virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no,
646  HandlerCb cb);
647  virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no);
648  virtual void Receive(boost::asio::mutable_buffers_1);
649  virtual TcpSession *AllocSession(Socket *socket);
650  virtual bool Run(void);
651 
652  bool ReceiveMsg(const u_int8_t *msg, size_t size);
653  void OnSessionEvent(TcpSession *session, TcpSession::Event event);
654  bool connect_complete() const {
655  return connect_complete_;
656  }
657  void AsyncReadStart();
658 
659  static void Init(EventManager *evm,
660  boost::asio::ip::address ip_addr, int port,
661  const std::string &cpu_pin_policy);
662 private:
665  boost::asio::ip::tcp::endpoint server_ep_;
666  boost::asio::ip::tcp::socket *tcp_socket_;
668  char *rx_buff_;
670  size_t remain_;
671 };
672 #endif // ctrlplane_ksync_sock_h
virtual ~KSyncSockUdp()
Definition: ksync_sock.h:546
bool ProcessRxData(KSyncRxQueueData data)
Definition: ksync_sock.cc:325
uint32_t GetSeqno() const
Definition: ksync_sock.h:138
KSyncRxWorkQueue rx_process_queue_
Definition: ksync_sock.h:503
static const unsigned kInvalidBulkSeqNo
Definition: ksync_sock.h:323
static const int kRxWorkQueueCount
Definition: ksync_sock.h:314
virtual const int GetHeaderLenSize()
Definition: ksync_sock.h:610
virtual TcpSession * AllocSession(Socket *socket)
virtual bool IsMoreData(char *data)
char * rx_buff_
Definition: ksync_sock.h:668
virtual ~IoContext()
Definition: ksync_sock.h:120
KSyncRxData(const KSyncRxData &rhs)
Definition: ksync_sock.h:338
static int GetNetlinkFamilyId()
Definition: ksync_sock.h:393
AgentSandeshContext * GetSandeshContext()
Definition: ksync_sock.cc:941
void VrfMsgHandler(vr_vrf_req *req)
Definition: ksync_sock.cc:1023
void SetSeqno(uint32_t seq)
Definition: ksync_sock.cc:278
KSyncEntry * entry_
Definition: ksync_sock.h:181
uint32_t WaitTreeSize() const
Definition: ksync_sock.cc:274
void VrfAssignMsgHandler(vr_vrf_assign_req *req)
Definition: ksync_sock.cc:1018
boost::asio::const_buffer Buffer
Definition: tcp_session.h:64
KSyncEntry::KSyncEvent event_
Definition: ksync_sock.h:182
static std::unique_ptr< KSyncSock > sock_
Definition: ksync_sock.h:504
virtual void BridgeTableInfoHandler(vr_bridge_table_data *r)
Definition: ksync_sock.h:68
char * rx_buff_
Definition: ksync_sock.h:594
std::size_t BlockingSend(char *msg, int msg_len)
Definition: ksync_sock.cc:444
virtual void MplsMsgHandler(vr_mpls_req *req)=0
Type type()
Definition: ksync_sock.h:135
boost::function< bool(const uint8_t *, size_t)> ReceiveCallback
Definition: tcp_session.h:311
virtual void SetErrno(int err)
Definition: ksync_sock.h:78
virtual bool Validate(char *data)
void SendAsync(KSyncEntry *entry, int msg_len, char *msg, KSyncEntry::KSyncEvent event)
Definition: ksync_sock.cc:455
boost::asio::ip::tcp::socket Socket
Definition: tcp_server.h:31
void AsyncReadStart()
int ack_count_
Definition: ksync_sock.h:497
static const char * io_wq_names[MAX_WORK_QUEUES]
Definition: ksync_sock.h:104
void RouteMsgHandler(vr_route_req *req)
Definition: ksync_sock.cc:956
uint32_t bmca_prod_
Definition: ksync_sock.h:450
void reset_rx_buffer1()
Definition: ksync_sock.h:142
virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt)=0
Type type_
Definition: ksync_sock.h:156
static AgentSandeshContext * agent_sandesh_ctx_[kRxWorkQueueCount]
Definition: ksync_sock.h:511
virtual bool Validate(char *data)=0
KSyncBulkMsgContext * bulk_msg_context_
Definition: ksync_sock.h:307
KSyncSockTcpSession(TcpServer *server, Socket *sock, bool async_ready=false)
virtual bool Run(void)
boost::intrusive::list_member_hook node_
Definition: ksync_sock.h:147
void AddReceiveBuffer(char *buff)
Definition: ksync_sock.cc:1085
virtual void DropStatsMsgHandler(vr_drop_stats_req *req)=0
KSyncIoContext(KSyncSock *sock, KSyncEntry *sync_entry, int msg_len, char *msg, KSyncEntry::KSyncEvent event)
Definition: ksync_sock.cc:867
boost::intrusive::list< IoContext, KSyncSockNode > IoContextList
Definition: ksync_sock.h:229
KSyncBulkSandeshContext * GetBulkSandeshContext(uint32_t seqno)
Definition: ksync_sock.cc:331
void DropStatsMsgHandler(vr_drop_stats_req *req)
Definition: ksync_sock.cc:1033
bool ProcessKernelData(KSyncBulkSandeshContext *ksync_context, const KSyncRxData &data)
Definition: ksync_sock.cc:386
KSyncEntry * GetKSyncEntry() const
Definition: ksync_sock.h:178
virtual uint32_t GetSeqno(char *data)
bool read_inline_
Definition: ksync_sock.h:488
virtual bool Validate(char *data)
void SetSeqno(uint32_t seqno)
Definition: ksync_sock.h:137
uint32_t GetMsgLen() const
Definition: ksync_sock.h:140
#define KSYNC_BMC_ARR_SIZE
Definition: ksync_sock.h:31
virtual uint32_t GetSeqno(char *data)
virtual bool IsMoreData(char *data)
virtual void Receive(boost::asio::mutable_buffers_1)
Definition: ksync_sock.cc:832
virtual void FlowResponseHandler(vr_flow_response *req)
Definition: ksync_sock.h:66
void set_bulk_message_context(KSyncBulkMsgContext *bulk_context)
Definition: ksync_sock.h:299
std::vector< boost::asio::mutable_buffers_1 > KSyncBufferList
Definition: ksync_sock.h:37
KSyncBulkMsgContext * LocateBulkContext(uint32_t seqno, IoContext::Type io_context_type, uint32_t work_queue_index)
Definition: ksync_sock.cc:544
static AgentSandeshContext * GetAgentSandeshContext(uint32_t type)
Definition: ksync_sock.h:396
virtual void MirrorMsgHandler(vr_mirror_req *req)=0
char * msg_
Definition: ksync_sock.h:153
void OnSessionEvent(TcpSession *session, TcpSession::Event event)
void VrfStatsMsgHandler(vr_vrf_stats_req *req)
Definition: ksync_sock.cc:1028
void GenericSend(IoContext *ctx)
Definition: ksync_sock.cc:451
static void Shutdown()
Definition: ksync_sock.cc:220
std::pair< uint32_t, KSyncBulkMsgContext > WaitTreePair
Definition: ksync_sock.h:326
IoContext(char *msg, uint32_t len, uint32_t seq, AgentSandeshContext *ctx, Type type, uint32_t index)
Definition: ksync_sock.h:115
KSyncSockTcp(EventManager *evm, boost::asio::ip::address ip_addr, int port)
virtual ~KSyncSock()
Definition: ksync_sock.cc:198
void MplsMsgHandler(vr_mpls_req *req)
Definition: ksync_sock.cc:961
void ForwardingClassMsgHandler(vr_fc_map_req *req)
Definition: ksync_sock.cc:971
uint32_t index_
Definition: ksync_sock.h:157
virtual uint32_t GetSeqno(char *data)=0
static int vnsw_netlink_family_id_
Definition: ksync_sock.h:506
void UpdateNetlink(nl_client *client, uint32_t len, uint32_t seq_no)
Definition: ksync_sock.cc:140
int GetErrno() const
Definition: ksync_sock.h:80
IoContextList io_context_list_
Definition: ksync_sock.h:251
int VrResponseMsgHandler(vr_response *resp)
Definition: ksync_sock.cc:978
void ProcessDataInline(char *data)
Definition: ksync_sock.cc:837
boost::asio::ip::tcp::endpoint server_ep_
Definition: ksync_sock.h:665
uint32_t bulk_seq_no_
Definition: ksync_sock.h:444
tbb::atomic< uint32_t > uve_seqno_
Definition: ksync_sock.h:485
KSyncBulkMsgContext(IoContext::Type type, uint32_t index)
Definition: ksync_sock.cc:1051
virtual void VxLanMsgHandler(vr_vxlan_req *req)=0
KSyncSockUds(boost::asio::io_context &ios)
bool SendAsyncImpl(IoContext *ioc)
Definition: ksync_sock.cc:625
virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no)
Definition: ksync_sock.cc:811
void VrouterOpsMsgHandler(vrouter_ops *req)
Definition: ksync_sock.cc:1043
virtual uint32_t GetSeqno(char *data)
Definition: ksync_sock.cc:774
virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb)
Definition: ksync_sock.cc:827
void MirrorMsgHandler(vr_mirror_req *req)
Definition: ksync_sock.cc:1003
uint32_t msg_len_
Definition: ksync_sock.h:154
virtual void FlowTableInfoHandler(vr_flow_table_data *r)
Definition: ksync_sock.h:67
DISALLOW_COPY_AND_ASSIGN(KSyncSock)
KSyncBulkMsgContext * bulk_msg_context_
Definition: ksync_sock.h:489
char * rx_buffer2()
Definition: ksync_sock.h:143
virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no, HandlerCb cb)
Definition: ksync_sock.cc:798
bool ValidateNetlink(char *data)
Definition: ksync_sock.cc:68
nl_client * nl_client_
Definition: ksync_sock.h:428
boost::asio::ip::tcp::socket Socket
Definition: tcp_session.h:60
virtual ~KSyncSockTcp()
Definition: ksync_sock.h:637
void GetNetlinkPayload(char *data, char **buf, uint32_t *buf_len)
Definition: ksync_sock.cc:113
virtual bool Decoder(char *data, AgentSandeshContext *ctxt)
virtual ~KSyncBulkSandeshContext()
Definition: ksync_sock.cc:891
bool SendAsyncStart()
Definition: ksync_sock.h:477
uint32_t max_bulk_buf_size_
Definition: ksync_sock.h:440
uint32_t GetNetlinkSeqno(char *data)
Definition: ksync_sock.cc:57
virtual const int GetMaxMessageSize()
Definition: ksync_sock.h:614
virtual bool Decoder(char *data, AgentSandeshContext *ctxt)=0
virtual void Receive(boost::asio::mutable_buffers_1)=0
virtual bool IsMoreData(char *data)=0
virtual void VrouterOpsMsgHandler(vrouter_ops *req)=0
bool operator<(const IoContext &rhs) const
Definition: ksync_sock.h:127
KSyncSock * sock_
Definition: ksync_sock.h:184
KSyncReceiveQueue * uve_rx_queue[kRxWorkQueueCount]
Definition: ksync_sock.h:432
bool ValidateAndEnqueue(char *data, KSyncBulkMsgContext *context)
Definition: ksync_sock.cc:349
bool ReceiveMsg(const u_int8_t *msg, size_t size)
uint32_t work_queue_index() const
Definition: ksync_sock.h:245
boost::asio::ip::udp::socket sock_
Definition: ksync_sock.h:562
virtual void VrfMsgHandler(vr_vrf_req *req)=0
void Data(KSyncBufferList *iovec)
Definition: ksync_sock.cc:1095
uint8_t type
Definition: load_balance.h:109
uint32_t vr_response_count_
Definition: ksync_sock.h:268
uint32_t bulk_buf_size_
Definition: ksync_sock.h:446
virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb)=0
char * rx_buff_q_
Definition: ksync_sock.h:595
virtual bool Decoder(char *data, AgentSandeshContext *ctxt)
virtual void ErrorHandler(int err)
Definition: ksync_sock.h:132
static KSyncSock * Get(DBTablePartBase *partition)
Definition: ksync_sock.cc:340
size_t remain_
Definition: ksync_sock.h:670
static const int kMsgGrowSize
Definition: ksync_sock.h:315
tbb::mutex mutex_
Definition: ksync_sock.h:427
void ReadHandler(const boost::system::error_code &error, size_t bytes_transferred)
Definition: ksync_sock.cc:364
virtual bool IsMoreData(char *data)
Definition: ksync_sock.cc:779
virtual int MsgLength(Buffer buffer, int offset)
static void Start(bool read_inline)
Definition: ksync_sock.cc:252
char * rx_buffer1_
Definition: ksync_sock.h:161
static tbb::atomic< bool > shutdown_
Definition: ksync_sock.h:512
boost::asio::const_buffer Buffer
Definition: tcp_session.h:310
static const int kMaxMessageSize
Definition: ksync_sock.h:619
static void SetSockTableEntry(KSyncSock *sock)
Definition: ksync_sock.cc:264
AgentSandeshContext * GetSandeshContext()
Definition: ksync_sock.h:134
bool connect_complete() const
Definition: ksync_sock.h:654
int tx_count() const
Definition: ksync_sock.h:382
char * rx_buffer2_
Definition: ksync_sock.h:162
virtual void Receive(boost::asio::mutable_buffers_1)
bool Decoder(char *buff, uint32_t buff_len, uint32_t alignment, bool more)
Definition: ksync_sock.cc:918
boost::function< void(const boost::system::error_code &, size_t)> HandlerCb
Definition: ksync_sock.h:328
void SetMeasureQueueDelay(bool val)
Definition: ksync_sock.cc:245
virtual ~KSyncIoContext()
Definition: ksync_sock.h:172
uint32_t AllocSeqNo(IoContext::Type type)
Definition: ksync_sock.cc:299
static void Init(bool use_work_queue, const std::string &cpu_pin_policy)
Definition: ksync_sock.cc:226
KSyncSockTcpSessionReader(TcpSession *session, ReceiveCallback callback)
uint32_t rx_buffer_index_
Definition: ksync_sock.h:262
virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no)
KSyncTxQueue send_queue_
Definition: ksync_sock.h:431
bool BlockingRecv()
Definition: ksync_sock.cc:419
bool TryAddToBulk(KSyncBulkMsgContext *bulk_context, IoContext *ioc)
Definition: ksync_sock.cc:593
virtual bool Decoder(char *data, AgentSandeshContext *ctxt)
Definition: ksync_sock.cc:785
static uint32_t GetPid()
Definition: ksync_sock.h:392
int err_count_
Definition: ksync_sock.h:498
KSyncBulkSandeshContext uve_bulk_sandesh_context_[kRxWorkQueueCount]
Definition: ksync_sock.h:493
AgentSandeshContext * sandesh_context_
Definition: ksync_sock.h:150
bool connect_complete_
Definition: ksync_sock.h:667
virtual void FlowMsgHandler(vr_flow_req *req)=0
void EnqueueRxProcessData(KSyncEntry *entry, KSyncEntry::KSyncEvent event)
Definition: ksync_sock.cc:322
size_t remain_
Definition: ksync_sock.h:596
char * GetMsg() const
Definition: ksync_sock.h:139
IoContext(char *msg, uint32_t len, uint32_t seq, AgentSandeshContext *ctx, Type type)
Definition: ksync_sock.h:110
int SendBulkMessage(KSyncBulkMsgContext *bulk_context, uint32_t seqno)
Definition: ksync_sock.cc:503
virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb)
KSyncReceiveQueue * AllocQueue(KSyncBulkSandeshContext ctxt[], uint32_t task_id, uint32_t instance, const char *name)
Definition: ksync_sock.cc:233
KSyncBulkMsgContext * bulk_msg_context_
Definition: ksync_sock.h:335
static void Init(boost::asio::io_context &ios, const std::string &cpu_pin_policy, const std::string &sockpathvr="")
uint32_t seqno()
Definition: ksync_sock.h:247
boost::asio::ip::tcp::socket * tcp_socket_
Definition: ksync_sock.h:666
TcpSession * session_
Definition: ksync_sock.h:664
const KSyncReceiveQueue * get_receive_work_queue(uint16_t index) const
Definition: ksync_sock.h:404
const KSyncIoContext * ksync_io_ctx() const
Definition: ksync_sock.h:82
void WriteHandler(const boost::system::error_code &error, size_t bytes_transferred)
Definition: ksync_sock.cc:469
const KSyncIoContext * ksync_io_ctx_
Definition: ksync_sock.h:85
void QosConfigMsgHandler(vr_qos_map_req *req)
Definition: ksync_sock.cc:966
virtual void QosConfigMsgHandler(vr_qos_map_req *req)=0
void reset_rx_buffer2()
Definition: ksync_sock.h:144
IoContext::Type io_context_type() const
Definition: ksync_sock.h:240
char * rx_buff_rem_
Definition: ksync_sock.h:669
KSyncRxData(char *buff, KSyncBulkMsgContext *ctxt)
Definition: ksync_sock.h:341
char * rx_buff_
Definition: ksync_sock.h:483
void set_ksync_io_ctx(const KSyncIoContext *ioc)
Definition: ksync_sock.h:81
EventManager * evm_
Definition: ksync_sock.h:663
static const unsigned kMaxRxBufferCount
Definition: ksync_sock.h:233
KSyncBulkSandeshContext ksync_bulk_sandesh_context_[kRxWorkQueueCount]
Definition: ksync_sock.h:492
void SetErrno(int err)
Definition: ksync_sock.cc:936
void Insert(IoContext *ioc)
Definition: ksync_sock.cc:1090
std::map< uint32_t, KSyncBulkMsgContext > WaitTree
Definition: ksync_sock.h:325
static const unsigned kMaxBulkMsgCount
Definition: ksync_sock.h:319
KSyncReceiveQueue * ksync_rx_queue[kRxWorkQueueCount]
Definition: ksync_sock.h:433
void reset_use_wait_tree()
Definition: ksync_sock.h:416
boost::asio::local::stream_protocol::socket sock_
Definition: ksync_sock.h:592
static void SetAgentSandeshContext(AgentSandeshContext *ctx, uint32_t idx)
Definition: ksync_sock.h:399
virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt)
Definition: ksync_sock.cc:790
uint32_t max_bulk_msg_count_
Definition: ksync_sock.h:438
static pid_t pid_
Definition: ksync_sock.h:505
boost::asio::local::stream_protocol::endpoint server_ep_
Definition: ksync_sock.h:593
WorkQueue< KSyncRxQueueData > KSyncRxWorkQueue
Definition: ksync_sock.h:355
virtual void OnRead(Buffer buffer)
virtual void VrfAssignMsgHandler(vr_vrf_assign_req *req)=0
virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no)
bool NetlinkMsgDone(char *data)
Definition: ksync_sock.cc:62
static void Init(EventManager *evm, boost::asio::ip::address ip_addr, int port, const std::string &cpu_pin_policy)
virtual void RouteMsgHandler(vr_route_req *req)=0
AgentSandeshContext * agent_sandesh_ctx_
Definition: ksync_sock.h:183
#define KSYNC_ACK_WAIT_THRESHOLD
Definition: ksync_sock.h:29
void InitNetlink(nl_client *client)
Definition: ksync_sock.cc:126
virtual bool Validate(char *data)
Definition: ksync_sock.cc:823
virtual void IfMsgHandler(vr_interface_req *req)=0
KSyncRxQueueData(KSyncEntry *entry, KSyncEntry::KSyncEvent event)
Definition: ksync_sock.h:351
virtual void NHMsgHandler(vr_nexthop_req *req)=0
KSyncSockTcpSessionReader * reader_
Definition: ksync_sock.h:630
WorkQueue< KSyncRxData > KSyncReceiveQueue
Definition: ksync_sock.h:345
KSyncBulkMsgContext * bulk_mctx_arr_[KSYNC_BMC_ARR_SIZE]
Definition: ksync_sock.h:452
virtual ~KSyncSockUds()
Definition: ksync_sock.h:571
TcpServer * server()
Definition: tcp_session.h:88
virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no, HandlerCb cb)=0
virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt)
virtual ~KSyncSockTcpSessionReader()
Definition: ksync_sock.h:605
WaitTree wait_tree_
Definition: ksync_sock.h:430
KSyncSockUdp(boost::asio::io_context &ios, int port)
Definition: ksync_sock.cc:763
virtual void Handler()
Definition: ksync_sock.h:131
uint32_t index() const
Definition: ksync_sock.h:145
void set_seqno(uint32_t seq)
Definition: ksync_sock.h:246
virtual void ForwardingClassMsgHandler(vr_fc_map_req *req)=0
boost::intrusive::member_hook< IoContext, boost::intrusive::list_member_hook<>,&IoContext::node_ > KSyncSockNode
Definition: ksync_sock.h:228
virtual bool Run(void)
bool process_data_inline_
Definition: ksync_sock.h:491
uint32_t bmca_cons_
Definition: ksync_sock.h:451
static void SetNetlinkFamilyId(int id)
Definition: ksync_sock.cc:269
virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no, HandlerCb cb)
virtual void Handler()
Definition: ksync_sock.cc:877
void set_process_data_inline()
Definition: ksync_sock.h:417
bool use_wait_tree_
Definition: ksync_sock.h:490
virtual bool BulkDecoder(char *data, KSyncBulkSandeshContext *ctxt)
KSyncReceiveQueue * GetReceiveQueue(IoContext::Type type, uint32_t instance)
Definition: ksync_sock.cc:303
char * GetReceiveBuffer()
Definition: ksync_sock.cc:1078
char * rx_buffer1() const
Definition: ksync_sock.h:141
uint32_t work_queue_index_
Definition: ksync_sock.h:255
virtual void Receive(boost::asio::mutable_buffers_1)
DISALLOW_COPY_AND_ASSIGN(KSyncBulkSandeshContext)
void NHMsgHandler(vr_nexthop_req *req)
Definition: ksync_sock.cc:951
static void Init(boost::asio::io_context &ios, int port, const std::string &cpu_pin_policy)
Definition: ksync_sock.cc:768
virtual std::size_t SendTo(KSyncBufferList *iovec, uint32_t seq_no)=0
KSyncEntry::KSyncEvent event() const
Definition: ksync_sock.h:179
virtual void AsyncSendTo(KSyncBufferList *iovec, uint32_t seq_no, HandlerCb cb)
virtual ~AgentSandeshContext()
Definition: ksync_sock.h:57
void FlowResponseHandler(vr_flow_response *req)
Definition: ksync_sock.cc:1013
virtual void VrfStatsMsgHandler(vr_vrf_stats_req *req)=0
int tx_count_
Definition: ksync_sock.h:496
virtual void AsyncReceive(boost::asio::mutable_buffers_1, HandlerCb)
IoContextList::iterator io_context_list_it_
Definition: ksync_sock.h:270
void ErrorHandler(int err)
Definition: ksync_sock.cc:881
uint32_t seqno_
Definition: ksync_sock.h:155
static const unsigned kMaxBulkMsgSize
Definition: ksync_sock.h:321
void ResetNetlink(nl_client *client)
Definition: ksync_sock.cc:133
static string sockpath_
Definition: ksync_sock.h:599
void VxLanMsgHandler(vr_vxlan_req *req)
Definition: ksync_sock.cc:1038
uint32_t bulk_msg_count_
Definition: ksync_sock.h:448
boost::asio::ip::udp::endpoint server_ep_
Definition: ksync_sock.h:563
void DecodeSandeshMessages(char *buf, uint32_t buf_len, SandeshContext *sandesh_context, uint32_t alignment)
Definition: ksync_sock.cc:147
tbb::atomic< uint32_t > seqno_
Definition: ksync_sock.h:484
KSyncEntry::KSyncEvent event_
Definition: ksync_sock.h:349
virtual int VrResponseMsgHandler(vr_response *resp)=0
char * rx_buffers_[kMaxRxBufferCount]
Definition: ksync_sock.h:260
static const unsigned kBufLen
Definition: ksync_sock.h:316
const KSyncTxQueue * send_queue() const
Definition: ksync_sock.h:403
virtual ~KSyncSockTcpSession()
static EventManager evm
void FlowMsgHandler(vr_flow_req *req)
Definition: ksync_sock.cc:1008
void OnEmptyQueue(bool done)
Definition: ksync_sock.cc:481
IoContext::Type io_context_type_
Definition: ksync_sock.h:253
void IfMsgHandler(vr_interface_req *req)
Definition: ksync_sock.cc:946
virtual void VrouterHugePageHandler(vr_hugepage_config *req)
Definition: ksync_sock.h:74