[ovs-dev] [PATCH 2/4] v2 Add Openflow 1.2 role request/reply processing, update OF 1.2 tests.

Ben Pfaff blp at nicira.com
Thu Dec 27 18:42:01 UTC 2012

On Tue, Dec 18, 2012 at 01:19:45PM +0200, Jarno Rajahalme wrote:
> v2 adds struct ofputil_role_request and
>  encode/decode functions for role request/reply.
> Signed-off-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>

Hi Jarno.  Thanks for the updated version, and sorry for the delay in

This goes farther toward what I had in mind, but it still has
protocol-specific decoding in ofp-print.c.  It would be better to put
all the protocol-specific decoding in ofp-util.c.

In ofputil_encode_role_reply(), there is no need to pass reply_size to
ofpraw_alloc_reply(), because ofpraw_alloc_reply() always allocates
enough space for a minimum-length message of the type allocated.  You
can pass 0 instead.

> +        /*
> +         * OpenFlow specification does not specify use of generation_id field
> +         * on reply messages.  Intuitively, it would seem a good idea to return
> +         * the current value.  However, the current value is undefined
> +         * initially, and there is no way to insert an undefined value in the
> +         * message.  Therefore we leave the generation_id zeroed on reply
> +         * messages.
> +         */

I've filed a request for clarification on this with ONF as EXT-272.
If you have an account, or if you can get one, it is accessible at:



More information about the dev mailing list