12 Tree::iterator it =
tree_.find(key);
13 if (it ==
tree_.end())
34 Tree::iterator it =
tree_.lower_bound(key);
35 if (it ==
tree_.end())
50 Tree::iterator it =
tree_.find(key);
51 assert(it !=
tree_.end());
69 std::pair<FlowMgmtKeyTree::iterator, bool> ret;
70 ret = tree->insert(make_pair(key, node));
71 if (ret.second ==
false) {
87 return entry->
Add(flow, node);
92 Tree::iterator it =
tree_.find(key);
93 if (it ==
tree_.end()) {
98 bool ret = entry->
Delete(flow, node);
201 return TryDelete(&key, entry);
205 Tree::iterator it =
tree_.begin();
206 while (it !=
tree_.end()) {
226 dest_ip.to_string()) {
238 std::list<MatchAclParams>::const_iterator it;
239 for (it = acl_list->begin(); it != acl_list->end(); it++) {
279 return entry->
Add(acl_key->
ace_id_list(), flow, old_ace_id_list, node);
284 Tree::iterator it =
tree_.find(key);
285 if (it ==
tree_.end()) {
312 tbb::mutex::scoped_lock mutex(
mutex_);
317 tbb::mutex::scoped_lock mutex(
mutex_);
322 uint32_t *ingress_flow_count,
323 uint32_t *egress_flow_count) {
325 tbb::mutex::scoped_lock mutex(
mutex_);
337 tbb::mutex::scoped_lock mutex(
mutex_);
342 tbb::mutex::scoped_lock mutex(
mutex_);
349 uint32_t *active_flows) {
351 tbb::mutex::scoped_lock mutex(
mutex_);
357 *active_flows += entry->
Size();
378 if (flow->
rpf_nh() == NULL)
401 Tree::iterator it =
tree_.find(key);
402 if (it ==
tree_.end()) {
410 if (it->first->db_entry()) {
411 assert(it->first->db_entry() == req->
db_entry());
414 it->first->set_db_entry(req->
db_entry());
458 if (flow->
l3_flow() || (plen != 255)) {
476 FlowRouteRefMap::const_iterator it;
477 for (it = rt_list->begin(); it != rt_list->end(); it++) {
478 ExtractKeys(flow, tree, it->first, ip, it->second);
485 if (flow->
l3_flow() ==
false) {
546 if (next_key == NULL)
549 if (next_key->
vrf_id() != vrf)
565 if (rt_key->
plen_ > 0) {
569 if (covering_route != NULL) {
581 (Find(covering_route));
640 if (next_key == NULL)
643 if (next_key->
vrf_id() != vrf)
684 VrfIdMap::iterator it =
id_map_.find(vrf_id);
709 if (route_entry == NULL ||
uint32_t ingress_flow_count() const
virtual bool OperEntryDelete(const FlowMgmtRequest *req, FlowMgmtKey *key)
static const MacAddress & ZeroMac()
uint64_t flow_aged() const
const DBEntry * db_entry() const
virtual bool OperEntryChange(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
MatchAclParamsList m_reverse_acl_l
virtual bool OperEntryDelete(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
bool BgpAsAServiceHealthCheckUpdate(Agent *agent, BgpAsAServiceFlowMgmtKey &key, BgpAsAServiceFlowMgmtRequest *req)
bool HandleNhChange(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
virtual bool HealthCheckUpdate(Agent *agent, FlowMgmtManager *mgr, BgpAsAServiceFlowMgmtKey &key, BgpAsAServiceFlowMgmtRequest *req)
virtual FlowMgmtEntry * Allocate(const FlowMgmtKey *key)=0
FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
void VnFlowCounters(const VnEntry *vn, uint32_t *ingress_flow_count, uint32_t *egress_flow_count)
virtual bool OperEntryAdd(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
void SetDBEntry(const FlowMgmtRequest *req, FlowMgmtKey *key)
FlowMgmtEntry * Locate(FlowMgmtKey *key)
const boost::uuids::uuid & GetUuid() const
const DBEntry * db_entry() const
FlowTable * flow_table() const
MatchAclParamsList m_vrf_assign_acl_l
FlowMgmtEntry * Find(FlowMgmtKey *key)
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree, uint32_t vrf, const IpAddress &ip, uint8_t plen)
MatchAclParamsList m_acl_l
void FreeDBEntryEvent(FlowEvent::Event event, FlowMgmtKey *key, uint32_t gen_id)
uint32_t acl_assigned_vrf_index_
boost::asio::ip::address IpAddress
virtual bool Delete(FlowMgmtKey *key, FlowEntry *flow, FlowMgmtKeyNode *node)
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree)
bool Delete(const AclEntryIDList *ace_id_list, FlowEntry *flow, FlowMgmtKeyNode *node)
static int GetCNIndex(const FlowEntry *flow)
static bool ProcessEvent(FlowMgmtRequest *req, FlowMgmtKey *key, FlowMgmtTree *tree)
bool Add(FlowMgmtKey *key, FlowEntry *flow, FlowMgmtKey *old_key, FlowMgmtKeyNode *node)
std::vector< AclEntryID > AclEntryIDList
virtual void FreeNotify(FlowMgmtKey *key, uint32_t gen_id)
virtual FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
void InsertEntry(FlowMgmtKey *key, FlowMgmtEntry *entry)
virtual bool Delete(FlowMgmtKey *key, FlowEntry *flow, FlowMgmtKeyNode *node)
bool HasVrfFlows(uint32_t vrf_id, Agent::RouteTableType type)
static Ip4Address GetIp4SubnetAddress(const Ip4Address &prefix, uint16_t plen)
FlowRouteRefMap flow_source_plen_map
void RetryDelete(uint32_t vrf_id)
bool TryDelete(FlowMgmtKey *key, FlowMgmtEntry *entry)
bool RouteNHChangeEvent(const FlowMgmtRequest *req, FlowMgmtKey *key)
InetRouteFlowMgmtTree * ip4_route_flow_mgmt_tree()
virtual bool Delete(FlowEntry *flow, FlowMgmtKeyNode *node)
virtual void FreeNotify(FlowMgmtKey *key, uint32_t gen_id)
static Ip6Address GetIp6SubnetAddress(const Ip6Address &prefix, uint16_t plen)
virtual bool OperEntryChange(const FlowMgmtRequest *req, FlowMgmtKey *key)
FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree)
const AclEntryIDList * ace_id_list() const
MatchAclParamsList m_out_mirror_acl_l
bool HasVrfFlows(uint32_t vrf_id, Agent::RouteTableType type)
const FlowKey & key() const
FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
FlowRouteRefMap flow_dest_plen_map
virtual bool CanDelete() const
FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
VrfEntry * FindVrfFromId(size_t index)
bool is_flags_set(const FlowEntryFlags &flags) const
static bool AddFlowMgmtKey(FlowMgmtKeyTree *tree, FlowMgmtKey *key)
virtual void RemoveEntry(Tree::iterator it)
FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
virtual bool OperEntryDelete(const FlowMgmtRequest *req, FlowMgmtKey *key)
void AddToLPMTree(InetRouteFlowMgmtKey *key)
void DeleteDefaultRoute(const VrfEntry *vrf)
SessionPolicy fwaas_policy
boost::asio::ip::address_v6 Ip6Address
map< int, int > FlowRouteRefMap
const uint32_t bgp_as_a_service_sport() const
MatchAclParamsList m_acl_l
MatchAclParamsList m_reverse_out_acl_l
virtual bool OperEntryDelete(const FlowMgmtRequest *req, FlowMgmtKey *key)
void BgpAsAServiceNotify(const boost::uuids::uuid &vm_uuid, uint32_t source_port)
static const int kInvalidCnIndex
std::map< FlowMgmtKey *, FlowMgmtKeyNode *, FlowMgmtKeyCmp > FlowMgmtKeyTree
void RemoveEntry(Tree::iterator it)
void RetryVrfDelete(uint32_t vrf_id)
virtual FlowMgmtKey * Clone()=0
bool BgpAsAServiceDelete(BgpAsAServiceFlowMgmtKey &key, const FlowMgmtRequest *req)
void InterfaceFlowCount(const Interface *itf, uint64_t *created, uint64_t *aged, uint32_t *active_flows)
virtual void InsertEntry(FlowMgmtKey *key, FlowMgmtEntry *entry)
FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
const std::string & controller_ifmap_xmpp_server(uint8_t idx) const
const uint32_t vrf_id() const
virtual bool OperEntryAdd(const FlowMgmtRequest *req, FlowMgmtKey *key)
uint32_t source_port() const
boost::asio::ip::address_v4 Ip4Address
VrfTable * vrf_table() const
const Interface * intf_entry() const
virtual bool OperEntryAdd(const FlowMgmtRequest *req, FlowMgmtKey *key)
FlowMgmtKey * LowerBound(FlowMgmtKey *key)
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree)
void RemoveEntry(Tree::iterator it)
InetRouteFlowMgmtKey * LPM(const InetRouteFlowMgmtKey *key)
MatchAclParamsList m_mirror_acl_l
virtual bool NonOperEntryDelete(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree, const MatchAclParamsList *acl_list)
void DelFromLPMTree(InetRouteFlowMgmtKey *key)
virtual bool Add(FlowMgmtKey *key, FlowEntry *flow, FlowMgmtKeyNode *node)
MatchAclParamsList m_out_acl_l
uint32_t egress_flow_count() const
const VnEntry * vn_entry() const
MatchAclParamsList m_out_acl_l
void InsertEntry(FlowMgmtKey *key, FlowMgmtEntry *entry)
bool RecomputeCoveringRouteEntry(FlowMgmtManager *mgr, InetRouteFlowMgmtKey *covering_route, InetRouteFlowMgmtKey *key)
FlowEntry * reverse_flow_entry()
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree)
virtual void FreeNotify(FlowMgmtKey *key, uint32_t gen_id)
virtual bool RetryDelete(FlowMgmtKey *key)
static const uint32_t kInvalidIndex
std::list< MatchAclParams > MatchAclParamsList
FlowEvent::Event FreeDBEntryEvent() const
FlowMgmtEntry * Allocate(const FlowMgmtKey *key)
virtual bool OperEntryAdd(const FlowMgmtRequest *req, FlowMgmtKey *key)
bool AllRouteTablesEmpty() const
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree)
const boost::uuids::uuid & uuid() const
const NextHop * rpf_nh() const
virtual bool Add(FlowEntry *flow, FlowMgmtKeyNode *node)
const MatchPolicy & match_p() const
virtual bool OperEntryDelete(const FlowMgmtRequest *req, FlowMgmtKey *key)
bool Delete(FlowMgmtKey *key, FlowEntry *flow, FlowMgmtKeyNode *node)
bool Add(const AclEntryIDList *ace_id_list, FlowEntry *flow, const AclEntryIDList *old_id_list, FlowMgmtKeyNode *node)
virtual bool OperEntryAdd(const FlowMgmtRequest *req, FlowMgmtKey *key)
void ExtractKeys(FlowEntry *flow, FlowMgmtKeyTree *tree)
uint64_t flow_created() const
bool RecomputeCoveringRoute(InetRouteFlowMgmtKey *covering_route, InetRouteFlowMgmtKey *key)