|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
22 singular_db<gbp_endpoint_group::key_t, gbp_endpoint_group>
23 gbp_endpoint_group::m_db;
28 : remote_ep_timeout(0xffffffff)
32 : remote_ep_timeout(remote_ep_timeout_)
45 return std::to_string(remote_ep_timeout);
93 , m_sclass(epg.m_sclass)
97 , m_retention(epg.m_retention)
104 m_db.release(
key(),
this);
134 return (
key() == gg.
key() && (m_vnid == gg.m_vnid) &&
135 (m_retention == gg.m_retention) && (m_itf == gg.m_itf) &&
136 (m_rd == gg.m_rd) && (m_bd == gg.m_bd));
140 gbp_endpoint_group::sweep()
153 m_hw, m_vnid, m_sclass, m_bd->id(), m_rd->id(), m_retention,
161 std::ostringstream s;
162 s <<
"gbp-endpoint-group:["
163 <<
"vnid:" << m_vnid <<
", sclass:" << m_sclass <<
", "
164 <<
"retention:[" << m_retention.
to_string() <<
"], "
165 << (m_itf ? m_itf->to_string() :
"NULL") <<
", " << m_bd->to_string()
166 <<
", " << m_rd->to_string() <<
"]";
176 m_hw, m_vnid, m_sclass, m_bd->id(), m_rd->id(), m_retention,
181 std::shared_ptr<gbp_endpoint_group>
184 return (m_db.find_or_add(temp.key(), temp));
187 std::shared_ptr<gbp_endpoint_group>
190 return (m_db.find(k));
193 std::shared_ptr<gbp_endpoint_group>
196 return find_or_add(*
this);
205 const std::shared_ptr<gbp_route_domain>
211 const std::shared_ptr<gbp_bridge_domain>
225 gbp_endpoint_group::event_handler::handle_replay()
233 std::shared_ptr<gbp_endpoint_group_cmds::dump_cmd> cmd =
234 std::make_shared<gbp_endpoint_group_cmds::dump_cmd>();
239 for (
auto& record : *cmd) {
240 auto& payload = record.get_payload();
242 std::shared_ptr<interface> itf =
244 std::shared_ptr<gbp_route_domain> rd =
246 std::shared_ptr<gbp_bridge_domain> bd =
250 <<
", " << payload.epg.rd_id <<
", "
251 << payload.epg.bd_id <<
"]";
253 if (itf && bd && rd) {
259 }
else if (bd && rd) {
266 <<
" or BD:" << payload.epg.bd_id
267 <<
" or RD:" << payload.epg.rd_id;
273 gbp_endpoint_group::event_handler::order()
const
bool operator==(const gbp_endpoint_group &bdae) const
comparison operator
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.
std::string to_string() const
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.
const std::shared_ptr< gbp_route_domain > get_route_domain() const
const std::shared_ptr< gbp_bridge_domain > get_bridge_domain() const
vnet_hw_if_output_node_runtime_t * r
bool operator==(const retention_t &o) const
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
std::string to_string() const
Convert to string for debugging.
static bool register_listener(listener *listener)
Register a listener of events.
static std::shared_ptr< gbp_endpoint_group > find(const key_t &k)
Find the instnace of the bridge_domain domain 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.
gbp_endpoint_group(vnid_t vnid, sclass_t sclass, const interface &itf, const gbp_route_domain &rd, const gbp_bridge_domain &bd)
Construct a GBP endpoint_group.
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.
vl_api_gbp_endpoint_retention_t retention
static void enqueue(cmd *f)
Enqueue A command for execution.
uint32_t remote_ep_timeout
Remote Endpoint timeout/ageing.
const key_t key() const
Return the object's key.
const static log_level_t DEBUG
uint32_t vnid_t
EPG IDs are 32 bit integers.
rc_t rc() const
Get the HW return code.
Endpoint Retention Policy Settings.
void replay(void)
replay the object to create it in hardware
A command class that creates or updates the GBP endpoint_group.
std::shared_ptr< gbp_endpoint_group > singular() const
Return the matching 'singular instance'.
A entry in the ARP termination table of a Route Domain.
const static handle_t INVALID
A value of an interface handle_t that means the itf does not exist.
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
sclass_t key_t
The key for a GBP endpoint group is its ID.
void event_handler(void *tls_async)
~gbp_endpoint_group()
Destructor.
A entry in the ARP termination table of a Bridge Domain.
A cmd class that deletes a GBP endpoint_group.
typedef gbp_endpoint_group
const static log_level_t ERROR
void set(const retention_t &retention)
vnid_t vnid() const
Get the ID of the EPG.
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.