On Tue, Oct 08, 2013 at 12:26:21PM +0300, Alexandru Copot wrote:
> Signed-off-by: Alexandru Copot <[email protected]>
> Cc: Daniel Baluta <[email protected]>
"sparse" says:
../lib/ofp-util.c:3920:19: warning: incorrect type in assignment (different
base types)
../lib/ofp-util.c:3920:19: expected restricted __be32 [usertype] role
../lib/ofp-util.c:3920:19: got int enum ofp12_controller_role const
[signed] role
../lib/ofp-util.c:3922:28: warning: incorrect type in assignment (different
base types)
../lib/ofp-util.c:3922:28: expected restricted __be64 [usertype]
generation_id
../lib/ofp-util.c:3922:28: got unsigned long long const [unsigned]
[usertype] generation_id
Please put the return type and the function name on separate lines here:
> +void ofconn_send_role_status(struct ofconn *ofconn, uint32_t role, uint8_t
> reason)
> +{
> + struct ofputil_role_status status;
> + struct ofpbuf *buf;
> +
> + status.reason = reason;
> + status.role = role;
In ofconn_set_role(), I think that the top-level "if" statement should
be tightened from:
if (role == OFPCR12_ROLE_MASTER) {
to:
if (role != ofconn->role && role == OFPCR12_ROLE_MASTER) {
so that a controller that is already master and requests that it
become master does not receive a status message that it has been
demoted to a slave.
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev