projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stream: Fix typo in comment.
[openvswitch]
/
lib
/
dpif.c
diff --git
a/lib/dpif.c
b/lib/dpif.c
index 315f11f9dd72c078f078d79deedb1a41a165d759..186f165c1745558883b4e8fed88874433e4cec04 100644
(file)
--- a/
lib/dpif.c
+++ b/
lib/dpif.c
@@
-58,7
+58,7
@@
static struct shash dpif_classes = SHASH_INITIALIZER(&dpif_classes);
static struct vlog_rate_limit dpmsg_rl = VLOG_RATE_LIMIT_INIT(600, 600);
/* Not really much point in logging many dpif errors. */
static struct vlog_rate_limit dpmsg_rl = VLOG_RATE_LIMIT_INIT(600, 600);
/* Not really much point in logging many dpif errors. */
-static struct vlog_rate_limit error_rl = VLOG_RATE_LIMIT_INIT(
9999
, 5);
+static struct vlog_rate_limit error_rl = VLOG_RATE_LIMIT_INIT(
60
, 5);
static void log_operation(const struct dpif *, const char *operation,
int error);
static void log_operation(const struct dpif *, const char *operation,
int error);
@@
-724,6
+724,11
@@
dpif_flow_get(const struct dpif *dpif, struct odp_flow *flow)
if (!error) {
error = flow->stats.error;
}
if (!error) {
error = flow->stats.error;
}
+ if (error) {
+ /* Make the results predictable on error. */
+ memset(&flow->stats, 0, sizeof flow->stats);
+ flow->n_actions = 0;
+ }
if (should_log_flow_message(error)) {
log_flow_operation(dpif, "flow_get", error, flow);
}
if (should_log_flow_message(error)) {
log_flow_operation(dpif, "flow_get", error, flow);
}