Skip to contentSkip to conversation

add HAVE_UNREGISTER_NETDEV_QUEUE define for out-of-tree modules

PATCH In review Benjamin LaHaise 2 participants 3 messages Nov 10, 2009 – Nov 11, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add HAVE_UNREGISTER_NETDEV_QUEUE define for out-of-tree modules

Hello,

I have an out of tree network driver (GPL'd) that would like to make use of the unregister_netdevice_queue interface for bulk unregister of devices. Add a #define HAVE_UNREGISTER_NETDEV_QUEUE to allow the source to detect that the kernel supports this.

-ben

include/linux/netdevice.h +1 -0
index 465add6..f9e8e0e 100644
@@ -1117,6 +1117,7 @@ extern int		dev_close(struct net_device *dev);
 extern void		dev_disable_lro(struct net_device *dev);
 extern int		dev_queue_xmit(struct sk_buff *skb);
 extern int		register_netdevice(struct net_device *dev);
+#define HAVE_UNREGISTER_NETDEV_QUEUE
 extern void		unregister_netdevice_queue(struct net_device *dev,
 						   struct list_head *head);
 extern void		unregister_netdevice_many(struct list_head *head);
maintainer
#1 lore raw

From: Benjamin LaHaise <[email protected]>
Date: Tue, 10 Nov 2009 17:00:04 -0500

Quoted 4 lines

I have an out of tree network driver (GPL'd) that would like to make use of the unregister_netdevice_queue interface for bulk unregister of devices. Add a #define HAVE_UNREGISTER_NETDEV_QUEUE to allow the source to detect that the kernel supports this.

Please get your code upstream :-)

We're already overcluttered with these "HAVE_PANTS", "HAVE_JACKET", "HAVE_KITCHEN", "HAVE_SINK" ugly defines spewed all over netdevice.h, and I'm not adding any more of that.

#2 lore raw
Quoted 9 lines · David Miller

From: Benjamin LaHaise <[email protected]>
Date: Tue, 10 Nov 2009 17:00:04 -0500

Quoted 4 lines

I have an out of tree network driver (GPL'd) that would like to make use of the unregister_netdevice_queue interface for bulk unregister of devices. Add a #define HAVE_UNREGISTER_NETDEV_QUEUE to allow the source to detect that the kernel supports this.

Please get your code upstream :-)

It's a completely separate PPP & L2TP / PPPoE from the existing code that is in tree. Somehow, I don't think people are interested in merging duplicate functionality regardless of what differences there are in the interfaces.

Quoted 3 lines

We're already overcluttered with these "HAVE_PANTS", "HAVE_JACKET", "HAVE_KITCHEN", "HAVE_SINK" ugly defines spewed all over netdevice.h, and I'm not adding any more of that.

If there was some other way of detecting that the interface is present, I'd use it, but there isn't.

-ben