summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-06-26 14:05:51 +0200
committerNeale Ranns <nranns@cisco.com>2019-07-02 14:19:15 +0000
commit3c0d84c989e9928d5ca9ffe3aceb826864bd525a (patch)
tree4f92624d794c7a771cc595632b29a02ab78283c7 /extras
parentcfc7a107e6cb8be6e7c53a08e23a146c431c8e90 (diff)
gbp: add anonymous l3-out subnets
An anonymous l3-out subnet is a locally attached l3-out subnet, and differs from regular l3-out subnets in the way adjacencies are managed. It is required for the anonymous l3-out external interfaces to correctly classify locally attached l3-out hosts. Type: feature Change-Id: Ie7bc88b1f22abc4d0b46db5f3cfbf208bc53ba5f Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/vom/vom/gbp_subnet.cpp12
-rw-r--r--extras/vom/vom/gbp_subnet.hpp14
2 files changed, 20 insertions, 6 deletions
diff --git a/extras/vom/vom/gbp_subnet.cpp b/extras/vom/vom/gbp_subnet.cpp
index 35422e2a6d4..bc897f125db 100644
--- a/extras/vom/vom/gbp_subnet.cpp
+++ b/extras/vom/vom/gbp_subnet.cpp
@@ -33,6 +33,7 @@ const gbp_subnet::type_t gbp_subnet::type_t::STITCHED_EXTERNAL(
"stitched-external");
const gbp_subnet::type_t gbp_subnet::type_t::TRANSPORT(2, "transport");
const gbp_subnet::type_t gbp_subnet::type_t::L3_OUT(3, "l3-out");
+const gbp_subnet::type_t gbp_subnet::type_t::ANON_L3_OUT(4, "anon-l3-out");
singular_db<gbp_subnet::key_t, gbp_subnet> gbp_subnet::m_db;
@@ -67,11 +68,12 @@ gbp_subnet::gbp_subnet(const gbp_route_domain& rd,
gbp_subnet::gbp_subnet(const gbp_route_domain& rd,
const route::prefix_t& prefix,
- sclass_t sclass)
+ sclass_t sclass,
+ const type_t& type)
: m_hw(false)
, m_rd(rd.singular())
, m_prefix(prefix)
- , m_type(type_t::L3_OUT)
+ , m_type(type)
, m_recirc(nullptr)
, m_epg()
, m_sclass(sclass)
@@ -239,6 +241,12 @@ gbp_subnet::event_handler::handle_populate(const client_db::key_t& key)
VOM_LOG(log_level_t::DEBUG) << "read: " << gs.to_string();
break;
}
+ case GBP_API_SUBNET_ANON_L3_OUT: {
+ gbp_subnet gs(*rd, pfx, payload.subnet.sclass, type_t::ANON_L3_OUT);
+ OM::commit(key, gs);
+ VOM_LOG(log_level_t::DEBUG) << "read: " << gs.to_string();
+ break;
+ }
case GBP_API_SUBNET_STITCHED_EXTERNAL: {
std::shared_ptr<interface> itf =
interface::find(payload.subnet.sw_if_index);
diff --git a/extras/vom/vom/gbp_subnet.hpp b/extras/vom/vom/gbp_subnet.hpp
index bff32ffaf2f..3ae8439e83c 100644
--- a/extras/vom/vom/gbp_subnet.hpp
+++ b/extras/vom/vom/gbp_subnet.hpp
@@ -54,17 +54,22 @@ public:
const static type_t TRANSPORT;
/**
- * A transport subnet, sent via the RD's UU-fwd interface
+ * A L3-out subnet
*/
const static type_t L3_OUT;
+ /**
+ * An anonymous L3-out subnet
+ */
+ const static type_t ANON_L3_OUT;
+
private:
type_t(int v, const std::string s);
};
/**
- * Construct an internal GBP subnet
- */
+ * Construct an internal GBP subnet
+ */
gbp_subnet(const gbp_route_domain& rd,
const route::prefix_t& prefix,
const type_t& type);
@@ -82,7 +87,8 @@ public:
*/
gbp_subnet(const gbp_route_domain& rd,
const route::prefix_t& prefix,
- sclass_t sclass);
+ sclass_t sclass,
+ const type_t& type = type_t::L3_OUT);
/**
* Copy Construct