86 const int last_count)
const {
89 ss << uuid_str <<
":";
95 const std::string &ace_id) {
98 ss << uuid_str <<
":";
104 AclFlowCountResp &data,
105 const std::string& ace_id) {
107 bool key_set =
false;
108 AceIdFlowCntMap::iterator aceid_it =
aceid_cnt_map_.upper_bound(ace_id);
109 std::vector<AceIdFlowCnt> id_cnt_l;
111 AceIdFlowCnt id_cnt_s;
112 id_cnt_s.ace_id = aceid_it->first;
113 id_cnt_s.flow_cnt = aceid_it->second;
114 id_cnt_l.push_back(id_cnt_s);
123 data.set_aceid_cnt_list(id_cnt_l);
125 data.set_flow_count(
Size());
135 const int last_count,
138 bool key_set =
false;
139 FlowList::iterator fe_tree_it =
flow_list_.begin();
140 while (fe_tree_it !=
flow_list_.end() && (count + 1) < last_count) {
144 data.set_flow_count(
Size());
146 std::vector<FlowSandeshData> flow_entries_l;
150 FlowSandeshData fe_sandesh_data;
153 flow_entries_l.push_back(fe_sandesh_data);
163 data.set_flow_entries(flow_entries_l);
170 AclEntryIDList::const_iterator id_it;
171 for (id_it = id_list->begin(); id_it != id_list->end(); ++id_it) {
182 if (id_list->size()) {
183 AclEntryIDList::const_iterator id_it;
184 for (id_it = id_list->begin(); id_it != id_list->end(); ++id_it) {
195 if (id_list->size()) {
224 for (FlowList::iterator it =
flow_list_.begin();
242 bool local_flow,
bool old_ingress) {
260 if (new_ingress != old_ingress) {
341 vrf_(vrf), vrf_id_(vrf->vrf_id()),
342 inet4_(this, vrf, vrf->GetRouteTable(
Agent::INET4_UNICAST)),
343 inet6_(this, vrf, vrf->GetRouteTable(
Agent::INET6_UNICAST)),
344 bridge_(this, vrf, vrf->GetRouteTable(
Agent::BRIDGE)),
345 vrf_tree_(vrf_tree) {
362 deleted_(false), table_ref_(this, NULL),
363 vrf_mgmt_entry_(vrf_mgmt_entry), vrf_(vrf) {
372 table_ref_.Reset(NULL);
377 vrf_mgmt_entry_->vrf_tree()->mgr()->RetryVrfDeleteEvent(
vrf_);
std::vector< AclEntryID > AclEntryIDList
const boost::uuids::uuid & GetUuid() const
void FillAclFlowSandeshInfo(const AclDBEntry *acl, AclFlowResp &data, const int last_count, Agent *agent)
AceIdFlowCntMap aceid_cnt_map_
std::string GetAclFlowSandeshDataKey(const AclDBEntry *acl, const int last_count) const
std::string GetAceSandeshDataKey(const AclDBEntry *acl, const std::string &ace_id)
bool Add(const AclEntryIDList *ace_id_list, FlowEntry *flow, const AclEntryIDList *old_id_list, FlowMgmtKeyNode *node)
void FillAceFlowSandeshInfo(const AclDBEntry *acl, AclFlowCountResp &data, const std::string &ace_id)
void DecrementAceIdCountMap(const AclEntryIDList *id_list)
bool Delete(const AclEntryIDList *ace_id_list, FlowEntry *flow, FlowMgmtKeyNode *node)
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge,...
LifetimeActor * deleter()
static const std::string & NullString()
virtual bool HealthCheckUpdate(Agent *agent, FlowMgmtManager *mgr, BgpAsAServiceFlowMgmtKey &key, BgpAsAServiceFlowMgmtRequest *req)
virtual bool NonOperEntryDelete(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
void StartHealthCheck(Agent *agent, FlowEntry *flow, const boost::uuids::uuid &hc_uuid)
void StopHealthCheck(FlowEntry *flow)
BgpAsAServiceFlowMgmtRequest::Type type() const
const boost::uuids::uuid & health_check_uuid() const
void SetAclFlowSandeshData(const AclDBEntry *acl, FlowSandeshData &fe_sandesh_data, Agent *agent) const
bool is_flags_set(const FlowEntryFlags &flags) const
virtual bool OperEntryAdd(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
virtual bool CanDelete() const
virtual bool Add(FlowEntry *flow, FlowMgmtKeyNode *node)
static const int MaxResponses
virtual bool OperEntryChange(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
virtual bool Delete(FlowEntry *flow, FlowMgmtKeyNode *node)
virtual bool OperEntryDelete(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
FlowEntry * flow_entry() const
void NonOperEntryEvent(FlowEvent::Event event, FlowEntry *flow)
bool HasVrfFlows(uint32_t vrf)
BgpAsAServiceFlowMgmtKey * FindBgpAsAServiceInfo(FlowEntry *flow, BgpAsAServiceFlowMgmtKey &key)
void DBEntryEvent(FlowEvent::Event event, FlowMgmtKey *key, FlowEntry *flow)
FlowEvent::Event GetResponseEvent() const
FlowMgmtManager * mgr() const
bool HandleNhChange(FlowMgmtManager *mgr, const FlowMgmtRequest *req, FlowMgmtKey *key)
bool RecomputeCoveringRouteEntry(FlowMgmtManager *mgr, InetRouteFlowMgmtKey *covering_route, InetRouteFlowMgmtKey *key)
bool NeedsReCompute(const FlowEntry *flow)
bool Delete(FlowEntry *flow, FlowMgmtKeyNode *node)
bool Add(FlowEntry *flow, FlowMgmtKeyNode *node)
void UpdateCounterOnDel(FlowEntry *flow, bool local_flow, bool old_ingress)
void UpdateCounterOnAdd(FlowEntry *flow, bool add_flow, bool local_flow, bool old_ingress)
uint32_t ingress_flow_count_
uint32_t egress_flow_count_
VrfFlowMgmtEntry(VrfFlowMgmtTree *vrf_tree, const VrfEntry *vrf)
VrfFlowMgmtTree * vrf_tree_
static std::string UuidToString(const boost::uuids::uuid &id)
LifetimeRef< Data > table_ref_
Data(VrfFlowMgmtEntry *vrf_mgmt_entry, const VrfEntry *vrf, AgentRouteTable *table)