On Aug 29, 2011 3:56 PM, "Justin Pettit" <jpet...@nicira.com> wrote: > diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h > index 04ebd89..664ff2e 100644 > --- a/datapath/linux/compat/include/linux/netdevice.h > +++ b/datapath/linux/compat/include/linux/netdevice.h > @@ -74,7 +74,14 @@ extern void unregister_netdevice_many(struct list_head *head); > #endif > > #ifndef HAVE_DEV_DISABLE_LRO > -extern void dev_disable_lro(struct net_device *dev); > +/* Some distributions (e.g., RHEL5) backported LRO support, but not the > + * userspace interface to adjust them, so it is necessary to call > + * dev_disable_lro() from the kernel. If this is an older kernel with > + * LRO support, then we assume that they either backported > + * dev_disable_lro() or provided the userspace interface. In either > + * case, it's a no-op. > + */ > +static inline void dev_disable_lro(struct net_device *dev) { }
I don't think it's a very good idea to have a backport that doesn't do the same thing as the upstream version (where possible). So while in this case we know that if the function is called it will be a no-op, it's confusing to enforce that and unnecessary because of the version guard around the actual call. I would keep the backport and move the comment to call site. The compiled result should be the same, of course.
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev