aboutsummaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-02-07 10:13:52 -0800
committerBen Pfaff <blp@nicira.com>2012-02-07 15:48:53 -0800
commitf27f21341ab42ad0e898d6c0e1bd4e98af82afda (patch)
treeeaa427ccc2e6550a1455aec6791bf23ed3543fa4 /utilities
parentef0ce8aeeeb95d2d64a8a22bd5839d7f684a31f5 (diff)
Add information about time left before timeouts to flow dumps.
The "learn" action is useful for MAC learning, but until now there has been no way to find out through OpenFlow how much time remains before a MAC learning entry (a learned flow) expires. This commit adds that ability. Feature #7193. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-ofctl.8.in38
-rw-r--r--utilities/ovs-ofctl.c2
2 files changed, 24 insertions, 16 deletions
diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index 1c1b7098..d72d8abf 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -1071,19 +1071,13 @@ If set, a matching flow must include an output action to \fIport\fR.
.
The \fBdump\-tables\fR and \fBdump\-aggregate\fR commands print information
about the entries in a datapath's tables. Each line of output is a
-unique flow entry, which begins with some common information:
+flow entry as described in \fBFlow Syntax\fR, above, plus some
+additional fields:
.
-.IP \fBduration\fR
-The number of seconds the entry has been in the table.
-.
-.IP \fBtable\fR
-The table that contains the flow. When a packet arrives, the switch
-begins searching for an entry at the lowest numbered table. Tables are
-numbered as shown by the \fBdump\-tables\fR command.
-.
-.IP \fBpriority\fR
-The priority of the entry in relation to other entries within the same
-table. A higher value will match before a lower one.
+.IP \fBduration=\fIsecs\fR
+The time, in seconds, that the entry has been in the table.
+\fIsecs\fR includes as much precision as the switch provides, possibly
+to nanosecond resolution.
.
.IP \fBn_packets\fR
The number of packets that have matched the entry.
@@ -1092,9 +1086,23 @@ The number of packets that have matched the entry.
The total number of bytes from packets that have matched the entry.
.
.PP
-The rest of the line consists of a description of the flow entry as
-described in \fBFlow Syntax\fR, above.
-.
+The following additional fields are included only if the switch is
+Open vSwitch 1.6 or later and the NXM flow format is used to dump the
+flow (see the description of the \fB\-\-flow-format\fR option below).
+The values of these additional fields are approximations only and in
+particular \fBidle_age\fR will sometimes become nonzero even for busy
+flows.
+.
+.IP \fBhard_age=\fIsecs\fR
+The integer number of seconds since the flow was added or modified.
+\fBhard_age\fR is displayed only if it differs from the integer part
+of \fBduration\fR. (This is separate from \fBduration\fR because
+\fBmod\-flows\fR restarts the \fBhard_timeout\fR timer without zeroing
+\fBduration\fR.)
+.
+.IP \fBidle_age=\fIsecs\fR
+The integer number of seconds that have passed without any packets
+passing through the flow.
.
.SH OPTIONS
.TP
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 7df0a90a..26bc1c3b 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -1354,7 +1354,7 @@ read_flows_from_switch(struct vconn *vconn, enum nx_flow_format flow_format,
struct ofputil_flow_stats fs;
int retval;
- retval = ofputil_decode_flow_stats_reply(&fs, reply);
+ retval = ofputil_decode_flow_stats_reply(&fs, reply, false);
if (retval) {
if (retval != EOF) {
ovs_fatal(0, "parse error in reply");