Hi, On 2015年07月28日 05:32, Ben Pfaff wrote: > On Mon, Jul 27, 2015 at 05:01:26PM +0900, Minoru TAKAHASHI wrote: >> On 2015年07月25日 00:34, Ben Pfaff wrote: >>> On Fri, Jul 24, 2015 at 02:45:33PM +0900, Minoru TAKAHASHI wrote: >>>> Hi, >>>> >>>> On 2015年07月22日 17:25, Minoru TAKAHASHI wrote: >>>>> Hi, >>>>> >>>>> Thank you for reply. >>>>> >>>>> On 2015年07月22日 00:19, Ben Pfaff wrote: >>>>>> On Tue, Jul 21, 2015 at 03:10:08PM +0900, Minoru TAKAHASHI wrote: >>>>>>>> they do not make the corresponding change to the decoder >>>>>>> >>>>>>> Should I fix this problem? >>>>>>> If so, please tell me that which source file should I fix. >>>>>>> (Sorry, I am new in implementation of OpenvSwitch.) >>>>>> >>>>>> I cannot apply anything to the repository that makes tests fail, so yes >>>>>> you should fix the decoder. >>>>>> >>>>>> The decode function is right next to the encode function. >>>> >>>>> ## ------------------------------ ## >>>>> ## openvswitch 2.4.90 test suite. ## >>>>> ## ------------------------------ ## >>>>> >>>>> 694: ofproto - del group (OpenFlow 1.5) FAILED >>>>> (ofproto.at:350) >>>>> 696: ofproto - insert buckets FAILED >>>>> (ofproto.at:424) >>>> >>>> I think that the following code is causing the above error. >>>> >>>> [lib/ofp-msgs.h] >>>> https://github.com/openvswitch/ovs/blob/master/lib/ofp-msgs.h#L336 >>>> >>>> [tests/ofp-print.at] >>>> https://github.com/openvswitch/ovs/blob/master/tests/ofp-print.at#L2003 >>>> >>>> After I fix these, the above error does not occur. >>> >>> Did you run all the tests? I see three failures: >> >> Oh, sorry about that. >> Hmm, how to run the testsuite is correct in the following? >> >> 1. uninstall ovs >> >> sudo make uninstall >> sudo make distclean >> >> 2. install ovs >> >> ./boot.sh >> ./configure >> make && sudo make install >> >> 3. run tests >> >> ./tests/testsuite -C tests AUTOTEST_PATH=utilities:vswitchd:ovsdb:vtep:tests > > You don't have to install (or uninstall) OVS to run the testsuite. Just > build OVS then run "make check". >
Thank you for your infomation! I attached fixed patches in this email as follows. In my environment, following patches did not cause the error when testsuite(make check) run. * Fix group desc request encoding. - 0001-openflow-Add-OpenFlow1.5-group-desc-request.patch - 0002-ofp-util-Fix-group-desc-request-encoding.patch * Fix port desc request encoding. - 0001-openflow-Add-OpenFlow1.5-port-desc-request.patch - 0002-ofp-util-Fix-port-desc-request-encoding.patch thanks,
>From e312418ecee215ca8edcaed784c851b0e596fd89 Mon Sep 17 00:00:00 2001 From: Minoru TAKAHASHI <[email protected]> Date: Fri, 17 Jul 2015 14:10:15 +0900 Subject: [PATCH 1/2] openflow: Add OpenFlow1.5 port desc request. Signed-off-by: Minoru TAKAHASHI <[email protected]> --- include/openflow/openflow-1.5.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/openflow/openflow-1.5.h b/include/openflow/openflow-1.5.h index 4d77818..d112f35 100644 --- a/include/openflow/openflow-1.5.h +++ b/include/openflow/openflow-1.5.h @@ -39,6 +39,13 @@ #include <openflow/openflow-common.h> +/* Body for ofp15_multipart_request of type OFPMP_PORT_DESC. */ +struct ofp15_port_desc_request { + ovs_be32 port_no; /* All ports if OFPP_ANY. */ + uint8_t pad[4]; /* Align to 64 bits. */ +}; +OFP_ASSERT(sizeof(struct ofp15_port_desc_request) == 8); + /* Group commands */ enum ofp15_group_mod_command { /* Present since OpenFlow 1.1 - 1.4 */ -- 1.9.1
>From 6fac9c6c16edea651ec39485e1f53b5a5f8821d5 Mon Sep 17 00:00:00 2001 From: Minoru TAKAHASHI <[email protected]> Date: Fri, 17 Jul 2015 14:10:33 +0900 Subject: [PATCH 2/2] ofp-util: Fix port desc request encoding. Signed-off-by: Minoru TAKAHASHI <[email protected]> --- lib/ofp-msgs.h | 2 +- lib/ofp-util.c | 11 +++++------ tests/ofp-print.at | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index 3d9fedf..9cd38b7 100644 --- a/lib/ofp-msgs.h +++ b/lib/ofp-msgs.h @@ -377,7 +377,7 @@ enum ofpraw { /* OFPST 1.0-1.4 (13): void. */ OFPRAW_OFPST10_PORT_DESC_REQUEST, - /* OFPST 1.5+ (13): ovs_be32. */ + /* OFPST 1.5+ (13): struct ofp15_port_desc_request. */ OFPRAW_OFPST15_PORT_DESC_REQUEST, /* OFPST 1.0 (13): struct ofp10_phy_port[]. */ diff --git a/lib/ofp-util.c b/lib/ofp-util.c index cdb8553..e9aefac 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -3994,7 +3994,6 @@ ofputil_encode_port_desc_stats_request(enum ofp_version ofp_version, ofp_port_t port) { struct ofpbuf *request; - ovs_be32 ofp11_port; switch (ofp_version) { case OFP10_VERSION: @@ -4005,14 +4004,14 @@ ofputil_encode_port_desc_stats_request(enum ofp_version ofp_version, request = ofpraw_alloc(OFPRAW_OFPST10_PORT_DESC_REQUEST, ofp_version, 0); break; - - case OFP15_VERSION: + case OFP15_VERSION:{ + struct ofp15_port_desc_request *req; request = ofpraw_alloc(OFPRAW_OFPST15_PORT_DESC_REQUEST, ofp_version, 0); - ofp11_port = ofputil_port_to_ofp11(port); - ofpbuf_put(request, &ofp11_port, sizeof ofp11_port); + req = ofpbuf_put_zeros(request, sizeof *req); + req->port_no = ofputil_port_to_ofp11(port); break; - + } default: OVS_NOT_REACHED(); } diff --git a/tests/ofp-print.at b/tests/ofp-print.at index 6e11150..d3cb375 100644 --- a/tests/ofp-print.at +++ b/tests/ofp-print.at @@ -2093,8 +2093,8 @@ AT_CLEANUP AT_SETUP([OFPST_PORT_DESC request - OF1.5]) AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST]) AT_CHECK([ovs-ofctl ofp-print "\ -06 12 00 14 00 00 00 02 00 0d 00 00 00 00 00 00 \ -00 00 00 05"], [0], [dnl +06 12 00 18 00 00 00 02 00 0d 00 00 00 00 00 00 \ +00 00 00 05 00 00 00 00"], [0], [dnl OFPST_PORT_DESC request (OF1.5) (xid=0x2): port=5 ]) AT_CLEANUP -- 1.9.1
>From 26434209b2672f485b08e91fa4a2bf0a9158a9c9 Mon Sep 17 00:00:00 2001 From: Minoru TAKAHASHI <[email protected]> Date: Fri, 17 Jul 2015 13:22:13 +0900 Subject: [PATCH 1/2] openflow: Add OpenFlow1.5 group desc request. Signed-off-by: Minoru TAKAHASHI <[email protected]> --- include/openflow/openflow-1.5.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/openflow/openflow-1.5.h b/include/openflow/openflow-1.5.h index 4d77818..dd068cf 100644 --- a/include/openflow/openflow-1.5.h +++ b/include/openflow/openflow-1.5.h @@ -137,6 +137,13 @@ struct ofp15_group_mod { }; OFP_ASSERT(sizeof(struct ofp15_group_mod) == 16); +/* Body for ofp15_multipart_request of type OFPMP_GROUP_DESC. */ +struct ofp15_group_desc_request { + ovs_be32 group_id; /* All groups if OFPG_ALL. */ + uint8_t pad[4]; /* Align to 64 bits. */ +}; +OFP_ASSERT(sizeof(struct ofp15_group_desc_request) == 8); + /* Body of reply to OFPMP_GROUP_DESC request. */ struct ofp15_group_desc_stats { ovs_be16 length; /* Length of this entry. */ -- 1.9.1
>From abf23759aa12219cf2f19bcc6e02a4a774b1025c Mon Sep 17 00:00:00 2001 From: Minoru TAKAHASHI <[email protected]> Date: Fri, 24 Jul 2015 13:31:58 +0900 Subject: [PATCH 2/2] ofp-util: Fix group desc request encoding. Signed-off-by: Minoru TAKAHASHI <[email protected]> --- lib/ofp-msgs.h | 2 +- lib/ofp-util.c | 9 +++++---- tests/ofp-print.at | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index 3d9fedf..85576eb 100644 --- a/lib/ofp-msgs.h +++ b/lib/ofp-msgs.h @@ -333,7 +333,7 @@ enum ofpraw { /* OFPST 1.1-1.4 (7): void. */ OFPRAW_OFPST11_GROUP_DESC_REQUEST, - /* OFPST 1.5+ (7): ovs_be32. */ + /* OFPST 1.5+ (7): struct ofp15_group_desc_request. */ OFPRAW_OFPST15_GROUP_DESC_REQUEST, /* OFPST 1.1+ (7): uint8_t[8][]. */ diff --git a/lib/ofp-util.c b/lib/ofp-util.c index cdb8553..a0723cb 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -7258,7 +7258,6 @@ ofputil_encode_group_desc_request(enum ofp_version ofp_version, uint32_t group_id) { struct ofpbuf *request; - ovs_be32 gid; switch (ofp_version) { case OFP10_VERSION: @@ -7271,12 +7270,14 @@ ofputil_encode_group_desc_request(enum ofp_version ofp_version, request = ofpraw_alloc(OFPRAW_OFPST11_GROUP_DESC_REQUEST, ofp_version, 0); break; - case OFP15_VERSION: + case OFP15_VERSION:{ + struct ofp15_group_desc_request *req; request = ofpraw_alloc(OFPRAW_OFPST15_GROUP_DESC_REQUEST, ofp_version, 0); - gid = htonl(group_id); - ofpbuf_put(request, &gid, sizeof gid); + req = ofpbuf_put_zeros(request, sizeof *req); + req->group_id = htonl(group_id); break; + } default: OVS_NOT_REACHED(); } diff --git a/tests/ofp-print.at b/tests/ofp-print.at index 6e11150..51f59d3 100644 --- a/tests/ofp-print.at +++ b/tests/ofp-print.at @@ -2000,8 +2000,8 @@ AT_CLEANUP AT_SETUP([OFPST_GROUP_DESC request - OF1.5]) AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST]) AT_CHECK([ovs-ofctl ofp-print "\ -06 12 00 14 00 00 00 02 00 07 00 00 00 00 00 00 \ -00 00 00 01 +06 12 00 18 00 00 00 02 00 07 00 00 00 00 00 00 \ +00 00 00 01 00 00 00 00 "], [0], [OFPST_GROUP_DESC request (OF1.5) (xid=0x2): group_id=1 ]) AT_CLEANUP -- 1.9.1
_______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
