On Tue, Jul 14, 2015 at 10:32:54PM -0700, Scott Feldman wrote: > On Tue, Jul 14, 2015 at 9:45 PM, Simon Horman
[snip] > > How about this? > > Looks good, some inline comments... [snip] > > @@ -321,9 +322,21 @@ static u16 rocker_port_vlan_to_vid(const struct > > rocker_port *rocker_port, > > return ntohs(vlan_id); > > } > > > > +static bool rocker_port_is_bridged__(const struct rocker_port *rocker_port, > > + const char *kind) > > Maybe use __rocker_port_is_bridged? (leading '__'; I've not seen use > of trailing '__'). Or __rocker_port_is_slave(port, kind)? Perhaps rocker_port_is_slave() would be a good choice? > > +{ > > + return rocker_port->bridge_dev && > > + !strcmp(rocker_port->bridge_dev->rtnl_link_ops->kind, kind); > > +} > > + > > static bool rocker_port_is_bridged(const struct rocker_port *rocker_port) > > { > > - return !!rocker_port->bridge_dev; > > + return rocker_port_is_bridged__(rocker_port, "bridge"); > > +} > > + > > +static bool rocker_port_is_ovs(const struct rocker_port *rocker_port) > > rocker_port_is_ovsed? Just to be consistent with is_bridged. Sure, for the sake of consistency I'll change things as you suggest. [snip] > > @@ -5263,11 +5301,16 @@ static int rocker_port_master_changed(struct > > net_device *dev) > > * 3. Other, e.g. being added to or removed from a bond or > > openvswitch, > > * in which case nothing is done > > */ > > Maybe comment above needs adjusting? Indeed, sorry for missing that. How about this? /* There are currently five cases handled here: * 1. Joining a bridge * 2. Joining a Open vSwitch datapath * 3. Leaving a previously joined bridge * 4. Leaving a previously joined Open vSwitch datapath * 5. Other, e.g. being added to or removed from a bond, * in which case nothing is done */ [snip] -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html