[ovs-dev] [PATCH v5 2/2] ofp-print: Enable printing OF1.4 version

Alexandru Copot alex.mihai.c at gmail.com
Thu May 1 10:22:20 UTC 2014


Also fix some tests that can now properly print packets
with the new protocol version.

Signed-off-by: Alexandru Copot <alex.mihai.c at gmail.com>
Cc: Daniel Baluta <dbaluta at ixiacom.com>
---
 lib/ofp-print.c    | 3 +++
 tests/ofp-print.at | 6 +++---
 tests/ofp-util.at  | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index b1bd2c3..1dc634b 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -2295,6 +2295,9 @@ ofp_print_version(const struct ofp_header *oh,
     case OFP13_VERSION:
         ds_put_cstr(string, " (OF1.3)");
         break;
+    case OFP14_VERSION:
+        ds_put_cstr(string, " (OF1.4)");
+        break;
     default:
         ds_put_format(string, " (OF 0x%02"PRIx8")", oh->version);
         break;
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index b34e504..ba1abf1 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -2375,7 +2375,7 @@ AT_CHECK([ovs-ofctl ofp-print "\
 05 1e 00 18 00 00 00 0a \
 00 00 00 02 02 00 00 00 ff ff ff ff ff ff ff ff \
 "], [0], [dnl
-OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master reason=experimenter_data_changed
+OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master reason=experimenter_data_changed
 ])
 AT_CLEANUP
 
@@ -2385,7 +2385,7 @@ AT_CHECK([ovs-ofctl ofp-print "\
 05 1e 00 18 00 00 00 0a \
 00 00 00 02 01 00 00 00 ff ff ff ff ff ff ff ff \
 "], [0], [dnl
-OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master reason=configuration_changed
+OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master reason=configuration_changed
 ])
 AT_CLEANUP
 
@@ -2395,7 +2395,7 @@ AT_CHECK([ovs-ofctl ofp-print "\
 05 1e 00 18 00 00 00 0a \
 00 00 00 02 01 00 00 00 00 00 00 00 00 00 00 10 \
 "], [0], [dnl
-OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master generation_id=16 reason=configuration_changed
+OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master generation_id=16 reason=configuration_changed
 ])
 AT_CLEANUP
 
diff --git a/tests/ofp-util.at b/tests/ofp-util.at
index fbb6848..248faf4 100644
--- a/tests/ofp-util.at
+++ b/tests/ofp-util.at
@@ -24,7 +24,7 @@ OFPT_HELLO (OF1.3) (xid=0x1):
 ])
 AT_CHECK([ovs-ofctl encode-hello 0x3e], [0], [dnl
 00000000  05 00 00 08 00 00 00 01-
-OFPT_HELLO (OF 0x05) (xid=0x1):
+OFPT_HELLO (OF1.4) (xid=0x1):
  version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05
 ])
 
-- 
1.9.2




More information about the dev mailing list