[ovs-dev] [lacp 08/10] lacp: Transmit more judiciously.

Ben Pfaff blp at nicira.com
Wed Mar 16 23:49:18 UTC 2011


Well it's been very helpful to look at it so thanks for humoring me.

On Wed, Mar 16, 2011 at 04:47:45PM -0700, Ethan Jackson wrote:
> Haha this is why I didn't want to send the series out yet =).
> 
> Ethan
> 
> On Wed, Mar 16, 2011 at 4:22 PM, Ben Pfaff <blp at nicira.com> wrote:
> > I noticed one more thing. ?After this patch, lacp_slave_enable() is
> > reduced to just:
> >
> > void
> > lacp_slave_enable(struct lacp *lacp, void *slave_, bool enabled)
> > {
> > ? ?struct slave *slave = slave_lookup(lacp, slave_);
> >
> > ? ?if (slave->enabled != enabled) {
> > ? ? ? ?slave->enabled = enabled;
> > ? ?}
> > }
> >
> > which in turn can be simplified to:
> >
> > void
> > lacp_slave_enable(struct lacp *lacp, void *slave_, bool enabled)
> > {
> > ? ?struct slave *slave = slave_lookup(lacp, slave_);
> > ? ?slave->enabled = enabled;
> > }
> >
> > or even to:
> >
> > void
> > lacp_slave_enable(struct lacp *lacp, void *slave_, bool enabled)
> > {
> > ? ?slave_lookup(lacp, slave_)->enabled = enabled;
> > }
> >



More information about the dev mailing list