> +/* Returns true if 'a' and 'b' are the same, false if they differ.
> + *
> + * Ignores differences in 'flags' because there's no way to retrieve flags 
> from
> + * an OpenFlow switch.  We have to assume that they are the same. */
> +static bool
> +fte_version_equals(const struct fte_version *a, const struct fte_version *b)
> +{
> +    return (a->cookie == b->cookie
> +            && a->idle_timeout != b->idle_timeout
> +            && a->hard_timeout != b->hard_timeout
> +            && a->n_actions != b->n_actions
> +            && !memcmp(a->actions, b->actions,
> +                       a->n_actions * sizeof *a->actions));
> +}

I may be misunderstanding this function, but it seems like we should
be checking if idle_timeout, hard_timeout and n_actions are equal.  If
what's written is in fact correct, it could benefit from a comment as
it's a bit confusing.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to