|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
22 singular_db<gbp_ext_itf::key_t, gbp_ext_itf> gbp_ext_itf::m_db;
30 , m_itf(itf.singular())
31 , m_bd(gbd.singular())
32 , m_rd(grd.singular())
47 m_db.release(
key(),
this);
53 return (m_itf->key());
59 return m_itf->handle();
65 return ((
key() == gei.
key()) && (m_itf == gei.m_itf) && (m_rd == gei.m_rd) &&
83 m_bd->id(), m_rd->id()));
91 s <<
"gbp-ext_itf:[" << m_itf->to_string() <<
", " << m_bd->to_string()
92 <<
", " << m_rd->to_string() <<
"]";
102 m_bd->id(), m_rd->id()));
106 std::shared_ptr<gbp_ext_itf>
109 return (m_db.find_or_add(temp.key(), temp));
112 std::shared_ptr<gbp_ext_itf>
115 return (m_db.find(k));
118 std::shared_ptr<gbp_ext_itf>
121 return find_or_add(*
this);
137 gbp_ext_itf::event_handler::handle_replay()
145 std::shared_ptr<gbp_ext_itf_cmds::dump_cmd> cmd =
146 std::make_shared<gbp_ext_itf_cmds::dump_cmd>();
151 for (
auto& record : *cmd) {
152 auto& payload = record.get_payload();
154 std::shared_ptr<interface> itf =
156 std::shared_ptr<gbp_bridge_domain> gbd =
158 std::shared_ptr<gbp_route_domain> grd =
162 <<
", " << payload.ext_itf.bd_id <<
", "
163 << payload.ext_itf.rd_id <<
"]";
165 if (itf && gbd && grd) {
172 <<
" or BD:" << payload.ext_itf.bd_id
173 <<
" or RD:" << payload.ext_itf.rd_id;
179 gbp_ext_itf::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.
A entry in the ARP termination table of a Bridge Domain.
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 enternal interface for GBP.
vnet_hw_if_output_node_runtime_t * r
const handle_t & handle() const
return the ext_itfulation interface's handle
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
static bool register_listener(listener *listener)
Register a listener of events.
gbp_ext_itf(const interface &itf, const gbp_bridge_domain &gbd, const gbp_route_domain &grd)
Construct a GBP ext_itf.
static std::shared_ptr< gbp_ext_itf > find(const key_t &k)
Find the instnace of the ext_itf interface in the OM.
static std::shared_ptr< gbp_bridge_domain > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
A command class that creates or updates the GBP ext_itf.
bool operator==(const gbp_ext_itf &bdae) const
comparison operator
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.
A type declaration of an interface handle in VPP.
static void enqueue(cmd *f)
Enqueue A command for execution.
std::string to_string() const
Convert to string for debugging.
const static log_level_t DEBUG
rc_t rc() const
Get the HW return code.
A cmd class that deletes a GBP ext_itf.
std::shared_ptr< gbp_ext_itf > singular() const
Return the matching 'singular instance'.
A entry in the ARP termination table of a Route Domain.
const key_t key() const
Return the object's key.
interface::key_t key_t
The key for a GBP ext_itf interface.
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
void event_handler(void *tls_async)
void replay(void)
replay the object to create it in hardware
const static log_level_t ERROR
~gbp_ext_itf()
Destructor.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.
static std::shared_ptr< gbp_route_domain > find(const key_t &k)
Find the instnace of the route_domain domain in the OM.