From 58cf43df9aa551b58970153d020728c1825f91c8 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 21 Aug 2012 13:55:38 +0900 Subject: [PATCH] ofp-msgs: Allow encoding and decoding of Open Flow 1.1 & 1.2 Barrier Messages Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- lib/ofp-msgs.h | 4 ++-- tests/ofp-print.at | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index 7ef7c5a6e..752d12c6d 100644 --- a/lib/ofp-msgs.h +++ b/lib/ofp-msgs.h @@ -163,12 +163,12 @@ enum ofpraw { /* OFPT 1.0 (18): void. */ OFPRAW_OFPT10_BARRIER_REQUEST, - /* OFPT 1.1 (20): void. */ + /* OFPT 1.1+ (20): void. */ OFPRAW_OFPT11_BARRIER_REQUEST, /* OFPT 1.0 (19): void. */ OFPRAW_OFPT10_BARRIER_REPLY, - /* OFPT 1.1 (21): void. */ + /* OFPT 1.1+ (21): void. */ OFPRAW_OFPT11_BARRIER_REPLY, /* Standard statistics. */ diff --git a/tests/ofp-print.at b/tests/ofp-print.at index aca502ab0..3c55d9108 100644 --- a/tests/ofp-print.at +++ b/tests/ofp-print.at @@ -987,20 +987,48 @@ OFPST_PORT_DESC reply (xid=0x0): ]) AT_CLEANUP -AT_SETUP([OFPT_BARRIER_REQUEST]) +AT_SETUP([OFPT_BARRIER_REQUEST - OF1.0]) AT_KEYWORDS([ofp-print]) AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl OFPT_BARRIER_REQUEST (xid=0x1): ]) AT_CLEANUP -AT_SETUP([OFPT_BARRIER_REPLY]) +AT_SETUP([OFPT_BARRIER_REQUEST - OF1.1]) +AT_KEYWORDS([ofp-print]) +AT_CHECK([ovs-ofctl ofp-print '02 14 00 08 00 00 00 01'], [0], [dnl +OFPT_BARRIER_REQUEST (OF1.1) (xid=0x1): +]) +AT_CLEANUP + +AT_SETUP([OFPT_BARRIER_REQUEST - OF1.2]) +AT_KEYWORDS([ofp-print]) +AT_CHECK([ovs-ofctl ofp-print '03 14 00 08 00 00 00 01'], [0], [dnl +OFPT_BARRIER_REQUEST (OF1.2) (xid=0x1): +]) +AT_CLEANUP + +AT_SETUP([OFPT_BARRIER_REPLY - OF1.0]) AT_KEYWORDS([ofp-print]) AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl OFPT_BARRIER_REPLY (xid=0x1): ]) AT_CLEANUP +AT_SETUP([OFPT_BARRIER_REPLY] - OF1.1) +AT_KEYWORDS([ofp-print]) +AT_CHECK([ovs-ofctl ofp-print '02 15 00 08 00 00 00 01'], [0], [dnl +OFPT_BARRIER_REPLY (OF1.1) (xid=0x1): +]) +AT_CLEANUP + +AT_SETUP([OFPT_BARRIER_REPLY] - OF1.2) +AT_KEYWORDS([ofp-print]) +AT_CHECK([ovs-ofctl ofp-print '03 15 00 08 00 00 00 01'], [0], [dnl +OFPT_BARRIER_REPLY (OF1.2) (xid=0x1): +]) +AT_CLEANUP + AT_SETUP([NXT_ROLE_REQUEST]) AT_KEYWORDS([ofp-print]) AT_CHECK([ovs-ofctl ofp-print "\ -- 2.43.0