|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
21 singular_db<bridge_domain_entry::key_t, bridge_domain_entry>
22 bridge_domain_entry::m_db;
32 , m_tx_itf(tx_itf.singular())
41 , m_tx_itf(tx_itf.singular())
55 , m_tx_itf(bde.m_tx_itf)
62 return (std::make_pair(m_bd->key(), m_mac));
68 return ((
key() == bde.
key()) && (m_tx_itf == bde.m_tx_itf));
76 m_db.release(
key(),
this);
80 bridge_domain_entry::sweep()
94 m_hw, m_mac, m_bd->id(), m_tx_itf->handle(),
101 std::ostringstream s;
102 s <<
"bridge-domain-entry:[" << m_bd->to_string() <<
", " << m_mac.
to_string()
103 <<
", tx:" << m_tx_itf->name() <<
"]";
116 m_hw, m_mac, m_bd->id(), m_tx_itf->handle(),
121 std::shared_ptr<bridge_domain_entry>
122 bridge_domain_entry::find_or_add(
const bridge_domain_entry& temp)
124 return (m_db.find_or_add(temp.key(), temp));
127 std::shared_ptr<bridge_domain_entry>
130 return (m_db.find(k));
133 std::shared_ptr<bridge_domain_entry>
136 return find_or_add(*
this);
149 "bridge domain entry configurations",
this);
153 bridge_domain_entry::event_handler::handle_replay()
161 std::shared_ptr<bridge_domain_entry_cmds::dump_cmd> cmd =
162 std::make_shared<bridge_domain_entry_cmds::dump_cmd>();
167 for (
auto& record : *cmd) {
168 auto& payload = record.get_payload();
175 <<
" itf:" << payload.sw_if_index
176 <<
" bd:" << payload.bd_id;
181 bridge_domain_entry bd_e(*bd,
mac, *itf);
184 <<
" " << bd->to_string() <<
" "
185 << itf->to_string() <<
" mac:["
186 <<
mac.to_string() <<
"]";
198 bridge_domain_entry::event_handler::order()
const
212 os <<
"[" <<
key.first <<
", " <<
key.second.to_string() <<
"]";
A base class for all object_base in the VPP object_base-Model.
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.
const static type_t BVI
A brideged Virtual interface (aka SVI or IRB)
bool operator==(const bridge_domain_entry &be) const
comparison operator
std::shared_ptr< bridge_domain > singular() const
Return the matchin 'singular' instance of the bridge-domain.
const static uint32_t DEFAULT_TABLE
The value of the defaultbridge domain.
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.
@ 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.
static std::shared_ptr< bridge_domain_entry > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
static bool register_listener(listener *listener)
Register a listener of events.
static std::shared_ptr< bridge_domain > find(const key_t &key)
Static function to find the bridge_domain in the model.
std::string to_string() const
Convert to string for debugging.
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.
std::shared_ptr< bridge_domain_entry > singular() const
Return the matching 'singular instance'.
static void enqueue(cmd *f)
Enqueue A command for execution.
~bridge_domain_entry()
Destructor.
const static log_level_t DEBUG
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
rc_t rc() const
Get the HW return code.
std::pair< bridge_domain::key_t, mac_address_t > key_t
The key for a bridge_domain.
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
const key_t key() const
Return the object's key.
std::string to_string() const
String conversion.
A command class that creates or updates the bridge_domain.
Type def of a Ethernet address.
A cmd class that deletes a bridge_domain.
void replay(void)
replay the object to create it in hardware
void event_handler(void *tls_async)
bridge_domain_entry(const bridge_domain &bd, const mac_address_t &mac, const interface &tx_itf)
Construct a bridge_domain in the given bridge domain.
const static log_level_t ERROR
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.
A MAC forwarding entry in the bridge-domain/L2-FIB.