OpenSDN source code
|
#include <ksync_sock.h>
Public Member Functions | |
KSyncSockUdp (boost::asio::io_context &ios, int port) | |
virtual | ~KSyncSockUdp () |
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) |
![]() | |
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) |
KSyncReceiveQueue * | GetReceiveQueue (IoContext::Type type, uint32_t instance) |
KSyncReceiveQueue * | GetReceiveQueue (uint32_t seqno) |
KSyncBulkMsgContext * | LocateBulkContext (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 KSyncTxQueue * | send_queue () const |
const KSyncReceiveQueue * | get_receive_work_queue (uint16_t index) const |
KSyncReceiveQueue * | AllocQueue (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, int port, const std::string &cpu_pin_policy) |
![]() | |
static void | Start (bool read_inline) |
static void | Shutdown () |
static KSyncSock * | Get (DBTablePartBase *partition) |
static KSyncSock * | Get (int partition_id) |
static uint32_t | GetPid () |
static int | GetNetlinkFamilyId () |
static void | SetNetlinkFamilyId (int id) |
static AgentSandeshContext * | GetAgentSandeshContext (uint32_t type) |
static void | SetAgentSandeshContext (AgentSandeshContext *ctx, uint32_t idx) |
Private Attributes | |
boost::asio::ip::udp::socket | sock_ |
boost::asio::ip::udp::endpoint | server_ep_ |
Additional Inherited Members | |
![]() | |
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< KSyncRxData > | KSyncReceiveQueue |
typedef WorkQueue < KSyncRxQueueData > | KSyncRxWorkQueue |
![]() | |
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 |
![]() | |
bool | ValidateAndEnqueue (char *data, KSyncBulkMsgContext *context) |
KSyncBulkSandeshContext * | GetBulkSandeshContext (uint32_t seqno) |
void | ProcessDataInline (char *data) |
![]() | |
static void | Init (bool use_work_queue, const std::string &cpu_pin_policy) |
static void | SetSockTableEntry (KSyncSock *sock) |
![]() | |
tbb::mutex | mutex_ |
nl_client * | nl_client_ |
WaitTree | wait_tree_ |
KSyncTxQueue | send_queue_ |
KSyncReceiveQueue * | uve_rx_queue [kRxWorkQueueCount] |
KSyncReceiveQueue * | ksync_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_ |
KSyncBulkMsgContext * | bulk_mctx_arr_ [KSYNC_BMC_ARR_SIZE] |
Definition at line 543 of file ksync_sock.h.
KSyncSockUdp::KSyncSockUdp | ( | boost::asio::io_context & | ios, |
int | port | ||
) |
Definition at line 763 of file ksync_sock.cc.
|
inlinevirtual |
Definition at line 546 of file ksync_sock.h.
|
virtual |
Implements KSyncSock.
Definition at line 827 of file ksync_sock.cc.
|
virtual |
Implements KSyncSock.
Definition at line 798 of file ksync_sock.cc.
|
virtual |
Implements KSyncSock.
Definition at line 790 of file ksync_sock.cc.
|
virtual |
Implements KSyncSock.
Definition at line 785 of file ksync_sock.cc.
|
virtual |
Implements KSyncSock.
Definition at line 774 of file ksync_sock.cc.
|
static |
|
virtual |
Implements KSyncSock.
Definition at line 779 of file ksync_sock.cc.
|
virtual |
Implements KSyncSock.
Definition at line 832 of file ksync_sock.cc.
|
virtual |
Implements KSyncSock.
Definition at line 811 of file ksync_sock.cc.
|
virtual |
Implements KSyncSock.
Definition at line 823 of file ksync_sock.cc.
|
private |
Definition at line 563 of file ksync_sock.h.
|
private |
Definition at line 562 of file ksync_sock.h.