On Wed, Jan 6, 2016 at 7:41 AM, Hannes Frederic Sowa <han...@stressinduktion.org> wrote: > diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c > index 24b077a32c1c9c..548925d1571cb1 100644 > --- a/drivers/net/geneve.c > +++ b/drivers/net/geneve.c > +static int geneve_notifier(struct notifier_block *unused, > + unsigned long event, void *ptr) > +{ > + struct net_device *dev = netdev_notifier_info_to_dev(ptr); > + > + switch (event) { > + case NETDEV_REFRESH_OFFLOAD_VXLAN: > + geneve_notify_refresh_netdev(dev);
Presumably this should be NETDEV_REFRESH_OFFLOAD_GENEVE, not VXLAN. However, rather than having a notifier for each protocol, it seems like it might be cleaner to just have a single one that triggers for all protocols and drivers that don't have the corresponding NDO wouldn't get called, similar to what happens when the port gets added in the first place. > diff --git a/include/net/geneve.h b/include/net/geneve.h > index e6c23dc765f7ec..36245115143652 100644 > --- a/include/net/geneve.h > +++ b/include/net/geneve.h [...] > static inline void geneve_get_rx_port(struct net_device *netdev) > { > + call_netdevice_notifiers(NETDEV_REFRESH_OFFLOAD_GENEVE, netdev); > } Unfortunately, I don't think that we can assume that RTNL is held here. It actually is for the drivers that implement Geneve at this point but not in all cases for VXLAN. For example, ixgbe refreshes the offloads in a service task in addition to when it is opened. There's only a couple instances of things like this, so I guess it's probably not too hard to through and make sure that we hold RTNL in those cases. -- 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