[ovs-discuss] Problem about ofp-util.c

Minoru TAKAHASHI takahashi.minoru7 at gmail.com
Fri Jul 17 04:38:38 UTC 2015


Hi,

On 2015年07月17日 06:40, Ben Pfaff wrote:
> On Thu, Jul 16, 2015 at 02:31:10PM +0900, Minoru TAKAHASHI wrote:
>> Maybe I’ve found a problem on "ofputil_encode_group_desc_request" of ofp-util.c.
>> According to the OFspec v1.5, the last element of ofp_group_multipart_request has to be filled with zeros.
>>
>>   /* Body of OFPMP_GROUP_STATS and OFPMP_GROUP_DESC requests. */
>>       struct ofp_group_multipart_request {
>>       uint32_t group_id;  /* All groups if OFPG_ALL. */
>>       uint8_t pad[4];     /* Align to 64 bits. */
>>   };
>>   OFP_ASSERT(sizeof(struct ofp_group_multipart_request) == 8);
>>
>> I’ve checked the source code of "ofputil_encode_group_desc_request", such a process it could not find.
>>
>>   * ofputil_encode_group_desc_request
>>   https://github.com/openvswitch/ovs/blob/master/lib/ofp-util.c#L7274-L7279
>>
>> I guess it should be write in the same way as follows.
>>
>>   * ofputil_encode_group_stats_request
>>   https://github.com/openvswitch/ovs/blob/master/lib/ofp-util.c#L7207-L7213
>>
>> And, I think "ofputil_encode_port_desc_stats_request" also has a similar problem.
>>
>>   * ofputil_encode_port_desc_stats_request
>>   https://github.com/openvswitch/ovs/blob/master/lib/ofp-util.c#L4009-L4014
>>
>> Please confirm if it’s correct.
> 
> You're right.
> 
> Will you submit a patch?

For starters, I've created patches that fixes the following problem.

>> I’ve checked the source code of "ofputil_encode_group_desc_request", such a process it could not find.
>>
>>   * ofputil_encode_group_desc_request
>>   https://github.com/openvswitch/ovs/blob/master/lib/ofp-util.c#L7274-L7279

I would like you to review my patches.

thanks,

> 
> Thanks,
> 
> Ben.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-openflow-Add-OpenFlow1.5-group-desc-request.patch
Type: text/x-patch
Size: 1038 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/discuss/attachments/20150717/15bbfcda/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ofp-util-Fix-group-desc-request-encoding.patch
Type: text/x-patch
Size: 1431 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/discuss/attachments/20150717/15bbfcda/attachment-0003.bin>


More information about the discuss mailing list