|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
25 singular_db<mark::key_t, mark> mark::m_db;
31 , m_itf(itf.singular())
38 : m_config(m.m_config)
48 m_db.release(
key(),
this);
54 return (std::make_pair(m_itf->key(), m_src));
60 return (
key() == m.
key() && m_map->id() == m.m_map->id());
85 s <<
"qos-mark:[" << m_itf->to_string() <<
", map:" << m_map->id()
92 mark::update(
const mark&
r)
100 std::shared_ptr<mark>
101 mark::find_or_add(
const mark& temp)
103 return (m_db.find_or_add(temp.key(), temp));
106 std::shared_ptr<mark>
109 return (m_db.find(k));
112 std::shared_ptr<mark>
115 return find_or_add(*
this);
131 mark::event_handler::handle_replay()
139 std::shared_ptr<mark_cmds::dump_cmd> cmd =
140 std::make_shared<mark_cmds::dump_cmd>();
145 for (
auto& rr : *cmd) {
146 auto& payload = rr.get_payload();
148 std::shared_ptr<interface> itf =
interface::find(payload.mark.sw_if_index);
149 std::shared_ptr<map>
map =
map::find(payload.mark.map_id);
154 mark qm(*itf, *
map,
from_api(payload.mark.output_source));
160 <<
"no interface or map:" << payload.mark.sw_if_index <<
", "
161 << payload.mark.map_id;
167 mark::event_handler::order()
const
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.
void replay(void)
replay the object to create it in hardware
mark(const interface &i, const map &m, const source_t &source)
static std::shared_ptr< map > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
@ ENTRY
Entries in Tables.
vnet_hw_if_output_node_runtime_t * r
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
bool operator==(const mark &bdae) const
comparison operator
static bool register_listener(listener *listener)
Register a listener of events.
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
A representation of an interface in VPP.
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.
const key_t key() const
Return the object's key.
const static log_level_t DEBUG
const std::string & to_string() const
convert to string format for debug purposes
std::pair< interface::key_t, source_t > key_t
rc_t rc() const
Get the HW return code.
std::string to_string() const
Convert to string for debugging.
std::shared_ptr< mark > singular() const
Return the matching 'singular instance'.
A QoS map determines how value from one source are translated to values of another source.
The marking of packets with QoS bits as they egress an interface.
A cmd class that deletes a GBP endpoint.
static std::shared_ptr< mark > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
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
A command class that creates or updates the GBP endpoint.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.