> On Mar 12, 2018, at 6:22 PM, Justin Pettit <[email protected]> wrote:
> 
> 
>> On Feb 16, 2018, at 2:54 PM, Ben Pfaff <[email protected]> wrote:
>> 
>> diff --git a/lib/ofp-print.c b/lib/ofp-print.c
>> index b13bc380386a..c0bfa92843c6 100644
>> --- a/lib/ofp-print.c
>> +++ b/lib/ofp-print.c
>> @@ -2287,18 +2287,15 @@ ofp_print_nxt_set_flow_format(struct ds *string, 
>> const struct ofp_header *oh)
>> 
>> static enum ofperr
>> ofp_print_nxt_set_packet_in_format(struct ds *string,
>> -                                   const struct nx_set_packet_in_format 
>> *nspf)
>> +                                   const struct ofp_header *oh)
>> {
>> -    uint32_t format = ntohl(nspf->format);
>> -
>> -    ds_put_cstr(string, " format=");
>> -    if (ofputil_packet_in_format_is_valid(format)) {
>> -        ds_put_cstr(string, ofputil_packet_in_format_to_string(format));
>> -    } else {
>> -        ds_put_format(string, "%"PRIu32, format);
>> +    enum ofputil_packet_in_format format;
>> +    enum ofperr error = ofputil_decode_set_packet_in_format(oh, &format);
>> +    if (!error) {
>> +        ds_put_format(string, " format=%s",
>> +                      ofputil_packet_in_format_to_string(format));
>>    }
>> +    return error;
>> }
> 
> Do you think it's worth printing some sort of error message if it's not a 
> known protocol?  The previous version just printed the raw number.
> 
> Signed-off-by: Justin Pettit <[email protected]>

Whoops.  Should have been:

Acked-by: Justin Pettit <[email protected]>

--Justin


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to