|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
25 singular_db<record::key_t, record> record::m_db;
31 , m_itf(itf.singular())
37 : m_config(
r.m_config)
46 m_db.release(
key(),
this);
52 return (std::make_pair(m_itf->key(), m_src));
58 return (
key() ==
r.key());
82 s <<
"qos-record:[" << m_itf->to_string() <<
", src:" << m_src.
to_string();
95 std::shared_ptr<record>
96 record::find_or_add(
const record& temp)
98 return (m_db.find_or_add(temp.key(), temp));
101 std::shared_ptr<record>
104 return (m_db.find(k));
107 std::shared_ptr<record>
110 return find_or_add(*
this);
126 record::event_handler::handle_replay()
134 std::shared_ptr<record_cmds::dump_cmd> cmd =
135 std::make_shared<record_cmds::dump_cmd>();
140 for (
auto& rr : *cmd) {
141 auto& payload = rr.get_payload();
143 std::shared_ptr<interface> itf =
149 record qr(*itf,
from_api(payload.record.input_source));
155 << payload.record.sw_if_index;
161 record::event_handler::order()
const
177 os <<
key.first <<
"," <<
key.second;
static rc_t write()
Write/Execute all commands hitherto enqueued.
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
The VPP Object Model (VOM) library.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
const static rc_t OK
The HW write was successfull.
A cmd class that deletes a GBP endpoint.
@ ENTRY
Entries in Tables.
static std::shared_ptr< record > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
vnet_hw_if_output_node_runtime_t * r
record(const interface &i, const source_t &source)
std::shared_ptr< record > singular() const
Return the matching 'singular instance'.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
static bool register_listener(listener *listener)
Register a listener of events.
void replay(void)
replay the object to create it in hardware
A representation of an interface in VPP.
A command class that creates or updates the GBP endpoint.
const typedef std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static void enqueue(cmd *f)
Enqueue A command for execution.
std::pair< interface::key_t, source_t > key_t
const static log_level_t DEBUG
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
const std::string & to_string() const
convert to string format for debug purposes
rc_t rc() const
Get the HW return code.
bool operator==(const record &bdae) const
comparison operator
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
std::string to_string() const
Convert to string for debugging.
void event_handler(void *tls_async)
The Source of the QoS classification (i.e.
static const map::outputs_t from_api(vapi_type_qos_egress_map_row rows[4])
const static log_level_t ERROR
const key_t key() const
Return the object's key.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.