|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
22 gbp_recirc::type_t::type_t(
int v,
const std::string s)
30 singular_db<gbp_recirc::key_t, gbp_recirc> gbp_recirc::m_db;
38 , m_itf(itf.singular())
40 , m_epg(epg.singular())
55 m_db.release(
key(),
this);
61 return (m_itf->key());
67 return m_itf->handle();
73 return ((
key() == gbpe.
key()) && (m_type == gbpe.m_type) &&
74 (m_itf == gbpe.m_itf) && (m_epg == gbpe.m_epg));
99 s <<
"gbp-recirc:[" << m_itf->to_string() <<
", type:" << m_type.
to_string()
100 <<
", " << m_epg->to_string() <<
"]";
114 std::shared_ptr<gbp_recirc>
115 gbp_recirc::find_or_add(
const gbp_recirc& temp)
117 return (m_db.find_or_add(temp.key(), temp));
120 std::shared_ptr<gbp_recirc>
123 return (m_db.find(k));
126 std::shared_ptr<gbp_recirc>
129 return find_or_add(*
this);
145 gbp_recirc::event_handler::handle_replay()
153 std::shared_ptr<gbp_recirc_cmds::dump_cmd> cmd =
154 std::make_shared<gbp_recirc_cmds::dump_cmd>();
159 for (
auto& record : *cmd) {
160 auto& payload = record.get_payload();
162 std::shared_ptr<interface> itf =
164 std::shared_ptr<gbp_endpoint_group> epg =
168 <<
", " << payload.recirc.sclass <<
"]";
172 *itf, (payload.recirc.is_ext ? type_t::EXTERNAL : type_t::INTERNAL),
182 gbp_recirc::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.
bool operator==(const gbp_recirc &bdae) const
comparison operator
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 ...
gbp_recirc(const interface &itf, const type_t &type, const gbp_endpoint_group &epg)
Construct a GBP recirc.
const static rc_t OK
The HW write was successfull.
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
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 bool register_listener(listener *listener)
Register a listener of events.
const handle_t & handle() const
return the recirculation interface's handle
static std::shared_ptr< gbp_endpoint_group > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
std::string to_string() const
Convert to string for debugging.
A recirculation interface for GBP use pre/post NAT.
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.
const static log_level_t DEBUG
interface::key_t key_t
The key for a GBP recirc interface.
const std::string & to_string() const
convert to string format for debug purposes
A cmd class that deletes a GBP recirc.
rc_t rc() const
Get the HW return code.
A command class that creates or updates the GBP recirc.
void replay(void)
replay the object to create it in hardware
const static type_t INTERNAL
Internal recirclation interfaces accept per-NAT translation traffic from the external/NAT EPG and inj...
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
const key_t key() const
Return the object's key.
void event_handler(void *tls_async)
A entry in the ARP termination table of a Bridge Domain.
const static type_t EXTERNAL
External recirculation interfaces accept post-NAT translation traffic from the internal EPG and injec...
vl_api_fib_path_type_t type
static std::shared_ptr< gbp_recirc > find(const key_t &k)
Find the instnace of the recirc interface in the OM.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.
std::shared_ptr< gbp_recirc > singular() const
Return the matching 'singular instance'.