|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
41 auto& payload = reply.get_response().get_payload();
48 static_cast<handle_t>(payload.pipe_sw_if_index[0]),
49 static_cast<handle_t>(payload.pipe_sw_if_index[1])),
59 msg_t req(
con.ctx(), std::ref(*
this));
61 auto& payload = req.get_request().get_payload();
63 payload.is_specified = 1;
64 payload.user_instance = m_instance;
80 s <<
"pipe-create: " <<
m_name <<
" instance:" << m_instance;
88 , m_hdl_pair(end_pair)
100 msg_t req(
con.ctx(), std::ref(*
this));
116 return (
"pipe-delete");
140 return (
"pipe-dump");
A functor class that creates an interface.
rc_t wait()
Wait on the commands promise.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
rc_t issue(connection &con)
Issue the command to VPP/HW.
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
static const rc_t & from_vpp_retval(int32_t rv)
Get the rc_t from the VPP API value.
virtual vapi_error_e operator()(vapi::Pipe_create &reply)
call operator used as a callback by VAPI when the reply is available
A cmd class that Dumps all the Vpp interfaces.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Pipe_dump > m_dump
The VAPI event registration.
void insert_interface()
add the created interface to the DB
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
delete_cmd(HW::item< handle_t > &item, HW::item< pipe::handle_pair_t > &end_pair)
Constructor.
A representation of the connection to VPP.
rc_t wait()
Wait for the issue of the command to complete.
A representation of an interface in VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
A type declaration of an interface handle in VPP.
const static log_level_t DEBUG
vapi::Pipe_create msg_t
convenient typedef
void remove_interface()
remove the deleted interface from the DB
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
A cmd class that Delete an interface.
std::pair< handle_t, handle_t > handle_pair_t
create_cmd(HW::item< handle_t > &item, const std::string &name, uint32_t instance, HW::item< pipe::handle_pair_t > &ends)
Cstrunctor taking the reference to the parent and the sub-interface's VLAN.
DEFINE_VAPI_MSG_IDS_PIPE_API_JSON
const std::string & m_name
The name of the interface to be created.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
Error codes that VPP will return during a HW write.
void fulfill(const HW::item< handle_t > &d)
Fulfill the commands promise.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes