Skip to content

Commit

Permalink
Do not log or send error messages for deleted or evicted flows.
Browse files Browse the repository at this point in the history
Conflicts:
	src/vnsw/agent/cmn/agent_cmn.h

Change-Id: Ice2e9e411df3954aa694367a33ff76c8065b67ad
closes-bug: #1638110
(cherry picked from commit d58ecf5)
  • Loading branch information
haripk committed Nov 10, 2016
1 parent 182ccc5 commit 9f04cae
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 37 deletions.
20 changes: 0 additions & 20 deletions src/vnsw/agent/cmn/agent_cmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,5 @@ do {\
SandeshLevel::SYS_ERR, __FILE__, __LINE__, ##__VA_ARGS__);\
} while (false);\

#define AGENT_ERROR(obj, ...)\
do {\
if (LoggingDisabled()) break;\
obj::Send(g_vns_constants.CategoryNames.find(Category::VROUTER)->second,\
SandeshLevel::SYS_ERR, __FILE__, __LINE__, ##__VA_ARGS__);\
} while (false);

#define AGENT_LOG(obj, ...)\
do {\
if (LoggingDisabled()) break;\
obj::Send(g_vns_constants.CategoryNames.find(Category::VROUTER)->second,\
SandeshLevel::SYS_INFO, __FILE__, __LINE__, ##__VA_ARGS__);\
} while (false);

#define AGENT_ASSERT(cond)\
do {\
if (Agent::GetInstance()->debug() == true) {\
assert(cond);\
}\
} while (false);
#endif // vnsw_agent_cmn_hpp

1 change: 0 additions & 1 deletion src/vnsw/agent/oper/global_vrouter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ void GlobalVrouter::GlobalVrouterConfig(DBTablePartBase *partition,

//Rebakes
if (resync_route) {
AGENT_LOG(GlobalVrouterLog, "Rebake all routes");
//Resync vm_interfaces to handle ethernet tag change if vxlan changed to
//mpls or vice versa.
//Update all routes irrespectively as this will handle change of
Expand Down
13 changes: 1 addition & 12 deletions src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -519,19 +519,8 @@ void FlowTableKSyncEntry::ErrorHandler(int err, uint32_t seq_no,
":", VrouterError(err), ">. Object <", ToString(),
">. Operation <", AckOperationString(event),
">. Message number :", seq_no);
return;
}
if (err == EINVAL && IgnoreVrouterError()) {
return;
}
KSyncEntry::ErrorHandler(err, seq_no, event);
}

bool FlowTableKSyncEntry::IgnoreVrouterError() const {
if (flow_entry_->deleted())
return true;

return false;
return;
}

std::string FlowTableKSyncEntry::VrouterError(uint32_t error) const {
Expand Down
2 changes: 0 additions & 2 deletions src/vnsw/agent/vrouter/ksync/flowtable_ksync.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ class FlowTableKSyncEntry : public KSyncNetlinkEntry {
friend class KSyncFlowEntryFreeList;
friend class KSyncFlowIndexManager;

bool IgnoreVrouterError() const;

FlowEntryPtr flow_entry_;
uint8_t gen_id_; // contains the last propagated genid from flow module
uint8_t evict_gen_id_; // contains current active gen-id in vrouter
Expand Down
4 changes: 2 additions & 2 deletions src/vnsw/agent/vrouter/ksync/ksync_flow_memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ bool KSyncFlowMemory::AuditProcess() {

FlowProto *proto = ksync_->agent()->pkt()->get_flow_proto();
proto->CreateAuditEntry(key, flow_idx, gen_id);
AGENT_LOG(FlowLog, flow_idx, "FlowAudit : Converting HOLD entry"
"to short flow");
LOG(DEBUG, "FlowAudit : Converting HOLD entry to short flow " <<
"for index " << flow_idx);
}
}

Expand Down

0 comments on commit 9f04cae

Please sign in to comment.