summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-upcall.h
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2014-03-13 21:48:55 -0700
committerAndy Zhou <azhou@nicira.com>2014-03-15 21:18:32 -0700
commit1b5b50718fc608d42c4ba985f23fab10816d1853 (patch)
treea5b515eca47160a38946a92ea9d1bc4eaa7db382 /ofproto/ofproto-dpif-upcall.h
parent0d1cee123a84ef8885834c0d086c4a3d5d48355f (diff)
downloadopenvswitch-1b5b50718fc608d42c4ba985f23fab10816d1853.tar.gz
udpif: Bug fix updif_flush
Before this commit, all datapath flows are cleared with dpif_flush(), but the revalidator thread still holds ukeys, which are caches of the datapath flows in the revalidaor. Flushing ukeys causes flow_del messages to be sent to the datapath again on flows that have been deleted by the dpif_flush() already. Double deletion by itself is not problem, per se, may an efficiency issue. However, for ever flow_del message sent to the datapath, a log message, at the warning level, will be generated in case datapath failed to execute the command. In addition to cause spurious log messages, Double deletion causes unit tests to report erroneous failures as all warning messages are considered test failures. The fix is to simply shut down the revalidator threads to flush all ukeys, then flush the datapth before restarting the revalidator threads. dpif_flush() was implemented as flush flows of all datapaths while most of its invocation should only flush its local datapath. Only megaflow on/off commands should flush all dapapaths. This bug is also fixed. Found during development. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Diffstat (limited to 'ofproto/ofproto-dpif-upcall.h')
-rw-r--r--ofproto/ofproto-dpif-upcall.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-upcall.h b/ofproto/ofproto-dpif-upcall.h
index 9eeee5b90..6846f879c 100644
--- a/ofproto/ofproto-dpif-upcall.h
+++ b/ofproto/ofproto-dpif-upcall.h
@@ -34,6 +34,6 @@ void udpif_destroy(struct udpif *);
void udpif_revalidate(struct udpif *);
void udpif_get_memory_usage(struct udpif *, struct simap *usage);
struct seq *udpif_dump_seq(struct udpif *);
-void udpif_flush(void);
+void udpif_flush(struct udpif *);
#endif /* ofproto-dpif-upcall.h */