On Tue, Mar 15, 2011 at 04:03:21PM -0700, Ethan Jackson wrote:
> Only transmit when the LACP partner needs to be updated instead of
> whenever it might need to be updated.
Thanks, this looks good to me.
Now I understand the slave->tx = 0 assignments :-)
In the second loop in lacp_run(), I think that we might as well check
slave_may_tx() before calling slave_get_actor(), since the output of
the latter is not interesting if the former is not true.
Also in that loop, I wonder whether it would be clearer to write a
function that compared the appropriate lacp_info fields? The "if"
condition could then become:
if (time_msec() < slave->tx
&& lacp_info_equal(&actor, &slave->ntt_actor))
which would be more obvious. Presumably the function would compare
field-by-field instead of using memcmp(), which means that saving and
restoring actor.state (which is really not so nice) could be avoided.
(Maybe it's obvious, but you can check whether one of several bits
differs between two values with something like "if ((a ^ b) & bits)".)
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev