|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
46 m_conn.ctx().dispatch();
53 std::shared_ptr<cmd> sp(
c);
55 m_queue.push_back(sp);
68 std::shared_ptr<cmd> sp(cmds.front());
70 m_queue.push_back(sp);
81 if (0 == m_conn.connect()) {
83 m_rx_thread.reset(
new std::thread(&HW::cmd_q::rx_run,
this));
97 if (m_rx_thread && m_rx_thread->joinable()) {
125 auto it = m_queue.begin();
127 while (
it != m_queue.end()) {
128 std::shared_ptr<cmd>
c = *
it;
139 rc =
c->issue(m_conn);
165 m_queue.erase(m_queue.begin(), m_queue.end());
207 m_cmdQ =
new cmd_q();
257 return (m_cmdQ->
write());
268 return (m_poll_state);
274 m_statReader->
read();
281 std::ostringstream os;
284 <<
"rc:" << item_rc.to_string() <<
" data:" << item_data <<
"]";
292 std::ostringstream os;
295 <<
"rc:" << item_rc.to_string() <<
" data:" << item_data <<
"]";
static rc_t write()
Write/Execute all commands hitherto enqueued.
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
static bool poll()
Blocking pool of the HW connection.
virtual bool connect()
Blocking Connect to VPP - call once at bootup.
pthread_t thread[MAX_CONNS]
virtual void enqueue(cmd *c)
Enqueue a command into the Q.
virtual int connect()
connection to stat object
cmd_q & operator=(const cmd_q &f)
Copy assignement - only used in UT.
virtual void read()
read stats for registered objects from stat_segment and set those stats to respective objects
static void init()
Initialise the HW.
The pipe to VPP into which we write the commands.
static void disconnect()
Disconnect to VPP.
static void enqueue(cmd *f)
Enqueue A command for execution.
save_rewrite_length must be aligned so that reass doesn t overwrite it
void enable()
Enable the passing of commands to VPP - undoes the disable.
std::string to_string() const
convert to string format for debug purposes
const static log_level_t DEBUG
A command poll the HW for liveness.
virtual rc_t write()
Write all the commands to HW.
void disable()
Disable the passing of commands to VPP.
static void read_stats()
read stats from stat segment
static bool connect()
Blocking Connect to VPP.
virtual void disconnect()
Disconnect to VPP.
Error codes that VPP will return during a HW write.
A representation of a method call to VPP.
virtual void disconnect()
disconnect to stat object
const static log_level_t ERROR
Stat reader: single interface to get stats.