aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-12-26 14:42:48 -0800
committerBen Pfaff <blp@nicira.com>2012-01-16 13:37:27 -0800
commitf23d28456f4ce2c4720a9c100ceff828b79c2360 (patch)
treea1bca9da6526f0c2cff408ec53fab02befa02243
parent89625d1efb32461071837b5e81c1238b4ca63387 (diff)
dpif: Log each operation in dpif_operate().
Without logging of operation groups, it becomes more difficult to debug problems related to flow setups, since those go through operation groups. Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--lib/dpif.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/dpif.c b/lib/dpif.c
index d8134698..37c00128 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -992,6 +992,20 @@ dpif_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops)
if (dpif->dpif_class->operate) {
dpif->dpif_class->operate(dpif, ops, n_ops);
+
+ for (i = 0; i < n_ops; i++) {
+ struct dpif_op *op = ops[i];
+
+ switch (op->type) {
+ case DPIF_OP_FLOW_PUT:
+ log_flow_put_message(dpif, &op->u.flow_put, op->error);
+ break;
+
+ case DPIF_OP_EXECUTE:
+ log_execute_message(dpif, &op->u.execute, op->error);
+ break;
+ }
+ }
return;
}