[ovs-dev] [wdp error reporting 5/5] ofproto: Improve OFPT_FLOW_MOD error reporting.
jpettit at nicira.com
Tue Aug 17 01:49:25 UTC 2010
On Jul 26, 2010, at 3:44 PM, Ben Pfaff wrote:
> static inline int
> -ofp_make_vendor_error(uint8_t vendor, uint16_t type, uint16_t code)
> +ofp_mkerr_vendor(uint8_t vendor, uint16_t type, uint16_t code)
> return (1 << 30) | (vendor << 26) | (type << 16) | code;
> +/* Returns the OpenFlow vendor error with Nicira as vendor, with the specific
> + * 'type' and 'code', as an integer. */
> +static inline int
> +make_nxerr(uint16_t type, uint16_t code)
> + return ofp_mkerr_vendor(OFPUTIL_VENDOR_NICIRA, type, code);
This is super minor, but in the first function, you changed "make" to "mk", but then introduced a new similar function that uses "make". It's a bit inconsistent, but it is only a static function.
> + * - OpenFlow lacks appropriate error types and codes for many
> + * situations. Feel free to add a new error vendor extension to
> + * nicira-ext.h to handle these situations, either under
> + * OFPUTIL_VENDOR_NICIRA if it seems reasonably generic or with your
> + * own vendor ID otherwise.
I don't know that we should encourage users to add them under Nicira's vendor id, since there could be conflicts with ones that we define.
Otherwise, looks good.
More information about the dev