From d18cc1eec44d07a6c24d7c2cda802b69c8a5624f Mon Sep 17 00:00:00 2001 From: Ambika Arora Date: Mon, 30 Nov 2015 16:52:47 +0530 Subject: ofproto: Implement OF1.4 error code for set-async-config This patch adds support for Openflow1.4 error codes for set-async-config. In this patch, a new error type, OFPET_ASYNC_CONFIG_FAILED is introduced that enables the switch to properly inform the controller when controller tries to set invalid mask or unsupported configuration. Signed-off-by: Ambika Arora Signed-off-by: Ben Pfaff --- tests/ofp-print.at | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/ofp-print.at') diff --git a/tests/ofp-print.at b/tests/ofp-print.at index d189efcbb..ed9ffdb15 100644 --- a/tests/ofp-print.at +++ b/tests/ofp-print.at @@ -2824,6 +2824,30 @@ OFPT_SET_ASYNC (OF1.4) (xid=0x2): ]) AT_CLEANUP +AT_SETUP([OFPT_SET_ASYNC_CONFIG - invalid mask - OF1.4]) +AT_KEYWORDS([ofp-print]) +AT_CHECK([ovs-ofctl ofp-print "\ +05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 40 \ +00 01 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \ +00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \ +00 05 00 08 00 00 00 05 \ +"], [0], [dnl +OFPT_SET_ASYNC (OF1.4) (xid=0x2): ***decode error: OFPACFC_INVALID*** +]) +AT_CLEANUP + +AT_SETUP([OFPT_SET_ASYNC_CONFIG - unsupported configuration - OF1.4]) +AT_KEYWORDS([ofp-print]) +AT_CHECK([ovs-ofctl ofp-print "\ +05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 05 \ +00 11 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \ +00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \ +00 05 00 08 00 00 00 05\ +"], [0], [dnl +OFPT_SET_ASYNC (OF1.4) (xid=0x2): ***decode error: OFPACFC_UNSUPPORTED*** +]) +AT_CLEANUP + AT_SETUP([NXT_SET_CONTROLLER_ID]) AT_KEYWORDS([ofp-print]) AT_CHECK([ovs-ofctl ofp-print "\ -- cgit v1.2.1