[ovs-dev] [PATCH 14/14] ofproto: Add support for master/slave controller coordination.

Jeremy Stribling strib at nicira.com
Wed Apr 14 21:27:54 UTC 2010

I didn't read through the code, but I applied this set of patches to my 
local repository and tested it with Onix.  It seems to work well for my 
simple test cases, though I haven't banged on it too hard.  I only have 
one little comment on the code:

Ben Pfaff wrote:
> +struct nx_role_request {
> +    struct nicira_header nxh;
> +    uint32_t role;              /* One of NX_ROLE_*. */
> +};
> +
> +enum nx_role {
> +    NX_ROLE_OTHER,              /* Default role, full access. */
> +    NX_ROLE_MASTER,             /* Full access, at most one. */
> +    NX_ROLE_SLAVE               /* Read-only access. */
> +}; 

It seems strange that "role" is 32 bits long, when it's just encoding 3 
possible states.  Perhaps this is for alignment purposes, but it just 
kind of jumped out at me (a different enum in openflow.h, ofp_type, is 
declared as uint8_t).  Not a big deal at all, mostly just curious.

More information about the dev mailing list