projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto: Revert change in flow cookie when an ofoperation fails.
[openvswitch]
/
lib
/
dpif-linux.c
diff --git
a/lib/dpif-linux.c
b/lib/dpif-linux.c
index b571441f587e90c44b7961c445c63243f6049dc9..fcf6899c032e3792beaa3ca07e2b5d80ba0ec001 100644
(file)
--- a/
lib/dpif-linux.c
+++ b/
lib/dpif-linux.c
@@
-968,24
+968,38
@@
dpif_linux_operate__(struct dpif *dpif_, struct dpif_op **ops, size_t n_ops)
switch (op->type) {
case DPIF_OP_FLOW_PUT:
put = &op->u.flow_put;
switch (op->type) {
case DPIF_OP_FLOW_PUT:
put = &op->u.flow_put;
- if (!op->error && put->stats) {
- struct dpif_linux_flow reply;
-
- op->error = dpif_linux_flow_from_ofpbuf(&reply, txn->reply);
+ if (put->stats) {
if (!op->error) {
if (!op->error) {
- dpif_linux_flow_get_stats(&reply, put->stats);
+ struct dpif_linux_flow reply;
+
+ op->error = dpif_linux_flow_from_ofpbuf(&reply,
+ txn->reply);
+ if (!op->error) {
+ dpif_linux_flow_get_stats(&reply, put->stats);
+ }
+ }
+
+ if (op->error) {
+ memset(put->stats, 0, sizeof *put->stats);
}
}
break;
case DPIF_OP_FLOW_DEL:
del = &op->u.flow_del;
}
}
break;
case DPIF_OP_FLOW_DEL:
del = &op->u.flow_del;
- if (!op->error && del->stats) {
- struct dpif_linux_flow reply;
-
- op->error = dpif_linux_flow_from_ofpbuf(&reply, txn->reply);
+ if (del->stats) {
if (!op->error) {
if (!op->error) {
- dpif_linux_flow_get_stats(&reply, del->stats);
+ struct dpif_linux_flow reply;
+
+ op->error = dpif_linux_flow_from_ofpbuf(&reply,
+ txn->reply);
+ if (!op->error) {
+ dpif_linux_flow_get_stats(&reply, del->stats);
+ }
+ }
+
+ if (op->error) {
+ memset(del->stats, 0, sizeof *del->stats);
}
}
break;
}
}
break;
@@
-1981,7
+1995,7
@@
report_loss(struct dpif *dpif_, struct dpif_channel *ch)
}
ds_chomp(&s, ',');
}
ds_chomp(&s, ',');
- VLOG_ERR("%s: lost packet on channel %d%s",
+ VLOG_ERR("%s: lost packet on channel %
t
d%s",
dpif_name(dpif_), ch - dpif->channels, ds_cstr(&s));
ds_destroy(&s);
}
dpif_name(dpif_), ch - dpif->channels, ds_cstr(&s));
ds_destroy(&s);
}