mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
ofp-util: Fix group desc request encoding.
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
committed by
Ben Pfaff
parent
1bc331dba7
commit
d4d3f33e55
@@ -339,7 +339,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][]. */
|
||||
|
@@ -7257,7 +7257,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:
|
||||
@@ -7270,12 +7269,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();
|
||||
}
|
||||
|
@@ -1999,8 +1999,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
|
||||
|
Reference in New Issue
Block a user