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

#include <ksync_sock.h>

Inheritance diagram for KSyncSockUds:
Collaboration diagram for KSyncSockUds:

Public Member Functions

 KSyncSockUds (boost::asio::io_context &ios)
 
virtual ~KSyncSockUds ()
 
virtual uint32_t GetSeqno (char *data)
 
virtual bool IsMoreData (char *data)
 
virtual bool BulkDecoder (char *data, KSyncBulkSandeshContext *ctxt)
 
virtual bool Decoder (char *data, AgentSandeshContext *ctxt)
 
virtual bool Validate (char *data)
 
virtual void AsyncReceive (boost::asio::mutable_buffers_1, HandlerCb)
 
virtual void AsyncSendTo (KSyncBufferList *iovec, uint32_t seq_no, HandlerCb cb)
 
virtual std::size_t SendTo (KSyncBufferList *iovec, uint32_t seq_no)
 
virtual void Receive (boost::asio::mutable_buffers_1)
 
virtual bool Run (void)
 
- Public Member Functions inherited from KSyncSock
 KSyncSock ()
 
virtual ~KSyncSock ()
 
void SendAsync (KSyncEntry *entry, int msg_len, char *msg, KSyncEntry::KSyncEvent event)
 
std::size_t BlockingSend (char *msg, int msg_len)
 
bool BlockingRecv ()
 
void GenericSend (IoContext *ctx)
 
uint32_t AllocSeqNo (IoContext::Type type)
 
uint32_t AllocSeqNo (IoContext::Type type, uint32_t instance)
 
KSyncReceiveQueueGetReceiveQueue (IoContext::Type type, uint32_t instance)
 
KSyncReceiveQueueGetReceiveQueue (uint32_t seqno)
 
KSyncBulkMsgContextLocateBulkContext (uint32_t seqno, IoContext::Type io_context_type, uint32_t work_queue_index)
 
int SendBulkMessage (KSyncBulkMsgContext *bulk_context, uint32_t seqno)
 
bool TryAddToBulk (KSyncBulkMsgContext *bulk_context, IoContext *ioc)
 
void OnEmptyQueue (bool done)
 
int tx_count () const
 
const KSyncTxQueuesend_queue () const
 
const KSyncReceiveQueueget_receive_work_queue (uint16_t index) const
 
KSyncReceiveQueueAllocQueue (KSyncBulkSandeshContext ctxt[], uint32_t task_id, uint32_t instance, const char *name)
 
uint32_t WaitTreeSize () const
 
void SetSeqno (uint32_t seq)
 
void SetMeasureQueueDelay (bool val)
 
void reset_use_wait_tree ()
 
void set_process_data_inline ()
 
void EnqueueRxProcessData (KSyncEntry *entry, KSyncEntry::KSyncEvent event)
 

Static Public Member Functions

static void Init (boost::asio::io_context &ios, const std::string &cpu_pin_policy, const std::string &sockpathvr="")
 
- Static Public Member Functions inherited from KSyncSock
static void Start (bool read_inline)
 
static void Shutdown ()
 
static KSyncSockGet (DBTablePartBase *partition)
 
static KSyncSockGet (int partition_id)
 
static uint32_t GetPid ()
 
static int GetNetlinkFamilyId ()
 
static void SetNetlinkFamilyId (int id)
 
static AgentSandeshContextGetAgentSandeshContext (uint32_t type)
 
static void SetAgentSandeshContext (AgentSandeshContext *ctx, uint32_t idx)
 

Private Attributes

boost::asio::local::stream_protocol::socket sock_
 
boost::asio::local::stream_protocol::endpoint server_ep_
 
char * rx_buff_
 
char * rx_buff_q_
 
size_t remain_
 
int socket_
 
int connected_
 

Static Private Attributes

static string sockpath_ = KSYNC_AGENT_VROUTER_SOCK_PATH
 

Additional Inherited Members

- Public Types inherited from KSyncSock
typedef std::map< uint32_t,
KSyncBulkMsgContext
WaitTree
 
typedef std::pair< uint32_t,
KSyncBulkMsgContext
WaitTreePair
 
typedef boost::function< void(const
boost::system::error_code
&, size_t)> 
HandlerCb
 
typedef WorkQueue< KSyncRxDataKSyncReceiveQueue
 
typedef WorkQueue
< KSyncRxQueueData
KSyncRxWorkQueue
 
- Static Public Attributes inherited from KSyncSock
static const int kRxWorkQueueCount = 2
 
static const int kMsgGrowSize = 16
 
static const unsigned kBufLen = (4*1024)
 
static const unsigned kMaxBulkMsgCount = 16
 
static const unsigned kMaxBulkMsgSize = (4*1024)
 
static const unsigned kInvalidBulkSeqNo = 0xFFFFFFFF
 
- Protected Member Functions inherited from KSyncSock
bool ValidateAndEnqueue (char *data, KSyncBulkMsgContext *context)
 
KSyncBulkSandeshContextGetBulkSandeshContext (uint32_t seqno)
 
void ProcessDataInline (char *data)
 
- Static Protected Member Functions inherited from KSyncSock
static void Init (bool use_work_queue, const std::string &cpu_pin_policy)
 
static void SetSockTableEntry (KSyncSock *sock)
 
- Protected Attributes inherited from KSyncSock
tbb::mutex mutex_
 
nl_client * nl_client_
 
WaitTree wait_tree_
 
KSyncTxQueue send_queue_
 
KSyncReceiveQueueuve_rx_queue [kRxWorkQueueCount]
 
KSyncReceiveQueueksync_rx_queue [kRxWorkQueueCount]
 
uint32_t max_bulk_msg_count_
 
uint32_t max_bulk_buf_size_
 
uint32_t bulk_seq_no_
 
uint32_t bulk_buf_size_
 
uint32_t bulk_msg_count_
 
uint32_t bmca_prod_
 
uint32_t bmca_cons_
 
KSyncBulkMsgContextbulk_mctx_arr_ [KSYNC_BMC_ARR_SIZE]
 

Detailed Description

Definition at line 568 of file ksync_sock.h.

Constructor & Destructor Documentation

KSyncSockUds::KSyncSockUds ( boost::asio::io_context &  ios)

Definition at line 42 of file ksync_sock_uds.cc.

Here is the call graph for this function:

virtual KSyncSockUds::~KSyncSockUds ( )
inlinevirtual

Definition at line 571 of file ksync_sock.h.

Member Function Documentation

void KSyncSockUds::AsyncReceive ( boost::asio::mutable_buffers_1  ,
HandlerCb   
)
virtual

Implements KSyncSock.

Definition at line 216 of file ksync_sock_uds.cc.

Here is the call graph for this function:

void KSyncSockUds::AsyncSendTo ( KSyncBufferList iovec,
uint32_t  seq_no,
HandlerCb  cb 
)
virtual

Implements KSyncSock.

Definition at line 172 of file ksync_sock_uds.cc.

Here is the call graph for this function:

bool KSyncSockUds::BulkDecoder ( char *  data,
KSyncBulkSandeshContext ctxt 
)
virtual

Implements KSyncSock.

Definition at line 163 of file ksync_sock_uds.cc.

Here is the call graph for this function:

bool KSyncSockUds::Decoder ( char *  data,
AgentSandeshContext ctxt 
)
virtual

Implements KSyncSock.

Definition at line 158 of file ksync_sock_uds.cc.

Here is the call graph for this function:

uint32_t KSyncSockUds::GetSeqno ( char *  data)
virtual

Implements KSyncSock.

Definition at line 150 of file ksync_sock_uds.cc.

Here is the call graph for this function:

void KSyncSockUds::Init ( boost::asio::io_context &  ios,
const std::string &  cpu_pin_policy,
const std::string &  sockpathvr = "" 
)
static

Definition at line 142 of file ksync_sock_uds.cc.

Here is the call graph for this function:

bool KSyncSockUds::IsMoreData ( char *  data)
virtual

Implements KSyncSock.

Definition at line 154 of file ksync_sock_uds.cc.

Here is the call graph for this function:

void KSyncSockUds::Receive ( boost::asio::mutable_buffers_1  )
virtual

Implements KSyncSock.

Definition at line 227 of file ksync_sock_uds.cc.

bool KSyncSockUds::Run ( void  )
virtual

Definition at line 65 of file ksync_sock_uds.cc.

Here is the call graph for this function:

size_t KSyncSockUds::SendTo ( KSyncBufferList iovec,
uint32_t  seq_no 
)
virtual

Implements KSyncSock.

Definition at line 178 of file ksync_sock_uds.cc.

Here is the call graph for this function:

bool KSyncSockUds::Validate ( char *  data)
virtual

Implements KSyncSock.

Definition at line 212 of file ksync_sock_uds.cc.

Member Data Documentation

int KSyncSockUds::connected_
private

Definition at line 598 of file ksync_sock.h.

size_t KSyncSockUds::remain_
private

Definition at line 596 of file ksync_sock.h.

char* KSyncSockUds::rx_buff_
private

Definition at line 594 of file ksync_sock.h.

char* KSyncSockUds::rx_buff_q_
private

Definition at line 595 of file ksync_sock.h.

boost::asio::local::stream_protocol::endpoint KSyncSockUds::server_ep_
private

Definition at line 593 of file ksync_sock.h.

boost::asio::local::stream_protocol::socket KSyncSockUds::sock_
private

Definition at line 592 of file ksync_sock.h.

int KSyncSockUds::socket_
private

Definition at line 597 of file ksync_sock.h.

string KSyncSockUds::sockpath_ = KSYNC_AGENT_VROUTER_SOCK_PATH
staticprivate

Definition at line 599 of file ksync_sock.h.


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