On Mon, Jul 23, 2012 at 12:51:45AM -0700, Justin Pettit wrote:
> On Jul 19, 2012, at 11:19 AM, Ben Pfaff wrote:
> 
> > OK, I wrote one.  I'm glad I did since the patch I posted didn't
> > work.  Here's a fixed version for final review.
> 
> I think you need the incremental I've added at the end of the
> message, but otherwise it looks good to me.

Thanks for spotting and fixing that.  I applied it as the following,
so as to get test coverage for that problem.  I'll push this in a
minute.

diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at
index 305cf7c..b1b4c6c 100644
--- a/tests/ovs-ofctl.at
+++ b/tests/ovs-ofctl.at
@@ -1977,5 +1977,13 @@ AT_DATA([flows.txt], [actions=resubmit(,1)
 ])
 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
 AT_CHECK([ovs-ofctl diff-flows br0 flows.txt])
+AT_CHECK([ovs-ofctl add-flow br0 idle_timeout=60,dl_vlan=9,actions=output:1])
+AT_CHECK([ovs-ofctl diff-flows br0 flows.txt], [2], [dnl
+-dl_vlan=9 idle_timeout=60 actions=output:1
+])
+AT_CHECK([ovs-ofctl add-flow br0 
hard_timeout=120,cookie=1234,dl_vlan=9,actions=output:1])
+AT_CHECK([ovs-ofctl diff-flows flows.txt br0], [2], [dnl
++dl_vlan=9 cookie=0x4d2 hard_timeout=120 actions=output:1
+])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 7cbd4dc..3f64178 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -1754,13 +1754,13 @@ fte_version_format(const struct fte *fte, int index, 
struct ds *s)
 
     cls_rule_format(&fte->rule, s);
     if (version->cookie != htonll(0)) {
-        printf(" cookie=0x%"PRIx64, ntohll(version->cookie));
+        ds_put_format(s, " cookie=0x%"PRIx64, ntohll(version->cookie));
     }
     if (version->idle_timeout != OFP_FLOW_PERMANENT) {
-        printf(" idle_timeout=%"PRIu16, version->idle_timeout);
+        ds_put_format(s, " idle_timeout=%"PRIu16, version->idle_timeout);
     }
     if (version->hard_timeout != OFP_FLOW_PERMANENT) {
-        printf(" hard_timeout=%"PRIu16, version->hard_timeout);
+        ds_put_format(s, " hard_timeout=%"PRIu16, version->hard_timeout);
     }
 
     ds_put_char(s, ' ');
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to