aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2012-05-04 14:42:04 -0700
committerJustin Pettit <jpettit@nicira.com>2012-05-08 09:51:43 -0700
commit2be393edd3a94772ef430054dc72ec794c450981 (patch)
tree77aa919171cc314f22df76b15870ed022cab494c /tests
parent3a51996b8a196e6b761e9d7e20ce573028a6dbcf (diff)
ofproto: Add support for OF1.3 port description multipart message.
OpenFlow 1.0 is limited to displaying 1364 ports in the Features Reply message, and there is no other way to get consolidated port information. OpenFlow 1.3 adds a new port description multipart message (OFPMP_PORT_DESC) that is not limited by size. This commit adds support through the OpenFlow 1.0 stats mechanism, since they have complimentary enum values. Bug #11040 Signed-off-by: Justin Pettit <jpettit@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ofp-print.at26
-rw-r--r--tests/ofproto.at15
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index 2b172d49..4b94fb4b 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -688,6 +688,32 @@ OFPST_QUEUE reply (xid=0x1): 6 queues
])
AT_CLEANUP
+AT_SETUP([OFPST_PORT_DESC request - OF1.0])
+AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
+AT_CHECK([ovs-ofctl ofp-print "0110000c00000001000d0000"], [0], [dnl
+OFPST_PORT_DESC request (xid=0x1):
+])
+AT_CLEANUP
+
+AT_SETUP([OFPST_PORT_DESC reply - OF1.0])
+AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
+AT_CHECK([ovs-ofctl ofp-print "\
+01 11 00 3c 00 00 00 00 00 0d 00 00 00 03 50 54 \
+00 00 00 01 65 74 68 30 00 00 00 00 00 00 00 00 \
+00 00 00 00 00 00 00 01 00 00 00 01 00 00 02 08 \
+00 00 02 8f 00 00 02 8f 00 00 00 00 \
+"], [0], [dnl
+OFPST_PORT_DESC reply (xid=0x0):
+ 3(eth0): addr:50:54:00:00:00:01
+ config: PORT_DOWN
+ state: LINK_DOWN
+ current: 100MB-FD AUTO_NEG
+ advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ speed: 100 Mbps now, 100 Mbps max
+])
+AT_CLEANUP
+
AT_SETUP([OFPT_BARRIER_REQUEST])
AT_KEYWORDS([ofp-print])
AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
diff --git a/tests/ofproto.at b/tests/ofproto.at
index 89264275..9009b915 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -38,6 +38,21 @@ AT_CLEANUP
dnl This is really bare-bones.
dnl It at least checks request and reply serialization and deserialization.
+AT_SETUP([ofproto - port-desc stats])
+OVS_VSWITCHD_START
+AT_CHECK([ovs-ofctl -vwarn dump-ports-desc br0], [0], [stdout])
+AT_CHECK([STRIP_XIDS stdout], [0], [dnl
+OFPST_PORT_DESC reply:
+ LOCAL(br0): addr:aa:55:aa:55:00:00
+ config: PORT_DOWN
+ state: LINK_DOWN
+ speed: 100 Mbps now, 100 Mbps max
+])
+OVS_VSWITCHD_STOP
+AT_CLEANUP
+
+dnl This is really bare-bones.
+dnl It at least checks request and reply serialization and deserialization.
AT_SETUP([ofproto - queue stats])
OVS_VSWITCHD_START
AT_CHECK([ovs-ofctl -vANY:ANY:WARN queue-stats br0], [0], [stdout])