Skip to contentSkip to conversation

add netpoll support for 802.1q vlans

PATCH Superseded Benjamin LaHaise 3 participants 7 messages Dec 7, 2011 – Dec 9, 2011

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

PATCH 1/1 add netpoll support for 802.1q vlans

Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a forced_eth device with netconsole.

net/8021q/vlan.h +5 -0
index 9fd45f3..df562b5 100644
@@ -40,6 +40,8 @@ struct vlan_pcpu_stats {
 	u32			tx_dropped;
 };
 
+struct netpoll;
+
 /**
  *	struct vlan_dev_info - VLAN private device data
  *	@nr_ingress_mappings: number of ingress priority mappings
@@ -67,6 +69,9 @@ struct vlan_dev_info {
 
 	struct proc_dir_entry			*dent;
 	struct vlan_pcpu_stats __percpu		*vlan_pcpu_stats;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	struct netpoll				*netpoll;
+#endif
 };
 
 static inline struct vlan_dev_info *vlan_dev_info(const struct net_device *dev)
net/8021q/vlan_dev.c +62 -0

86 lines not on this page · raw message

maintainer
#1 lore raw

From: Benjamin LaHaise <[email protected]>
Date: Tue, 6 Dec 2011 20:04:24 -0500

Quoted 4 lines

Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a forced_eth device with netconsole.

Bridging doesn't try to invoke a downstream netpoll operation at all, and neither should you.

Also, please format your subject line correctly so I don't have to edit it when applying your patch. You need to add an appropriate, lowercase, subsystem prefix after the [PATCH] tag otherwise people scanning the shortlog in GIT can't figure out what area your patch is in.

In this situation "vlan: " might be appropriate.

#2 lore raw
Quoted 10 lines · David Miller

From: Benjamin LaHaise <[email protected]>
Date: Tue, 6 Dec 2011 20:04:24 -0500

Quoted 4 lines

Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a forced_eth device with netconsole.

Bridging doesn't try to invoke a downstream netpoll operation at all, and neither should you.

Please have a look at net/bridge/br_device.c:br_netpoll_setup() which is where the approach came from.

Getting netconsole over vlans working is a requirement for those of us with machines plugged into ethernet switches that can't mix tagged and untagged packets on their ethernet ports. I bumped into this while trying to capture a kernel crash on such a machine which doesn't have any external serial ports to use either.

Quoted 6 lines

Also, please format your subject line correctly so I don't have to edit it when applying your patch. You need to add an appropriate, lowercase, subsystem prefix after the [PATCH] tag otherwise people scanning the shortlog in GIT can't figure out what area your patch is in.

In this situation "vlan: " might be appropriate.

Sorry about that oversight, I'll try to remember for the future.

-ben

Signature · 1 line
"Thought is the essence of where you are now."
#3 lore raw

PATCH v2 1/1 vlan: add 802.1q netpoll support

Quoted 2 lines · Benjamin LaHaise

Please have a look at net/bridge/br_device.c:br_netpoll_setup() which is where the approach came from.

And I was blind. I see what you mean about not invoking the poll_controller of the underlying device. Here's a respin. Boot tested on the same forced_eth system.

-ben
---snip---
[PATCH net-next v2] vlan: add 802.1q netpoll support

Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a forced_eth device with netconsole.

---
vlan.h | 5 +++++

 vlan_dev.c |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
net/8021q/vlan.h +5 -0
index 9fd45f3..df562b5 100644
@@ -40,6 +40,8 @@ struct vlan_pcpu_stats {
 	u32			tx_dropped;
 };
 
+struct netpoll;
+
 /**
  *	struct vlan_dev_info - VLAN private device data
  *	@nr_ingress_mappings: number of ingress priority mappings
@@ -67,6 +69,9 @@ struct vlan_dev_info {
 
 	struct proc_dir_entry			*dent;
 	struct vlan_pcpu_stats __percpu		*vlan_pcpu_stats;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	struct netpoll				*netpoll;
+#endif
 };
 
 static inline struct vlan_dev_info *vlan_dev_info(const struct net_device *dev)
net/8021q/vlan_dev.c +59 -0

83 lines not on this page · raw message

maintainer Applied
#4 lore raw

Re: [PATCH net-next v2] vlan: add 802.1q netpoll support

From: Benjamin LaHaise <[email protected]>
Date: Thu, 8 Dec 2011 11:20:49 -0500

Quoted 6 lines

[PATCH net-next v2] vlan: add 802.1q netpoll support

Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a forced_eth device with netconsole.

Applied.

maintainer
#5 lore raw
In reply to Benjamin LaHaise

From: Benjamin LaHaise <[email protected]>
Date: Thu, 8 Dec 2011 10:35:58 -0500

Quoted 7 lines · David Miller
Quoted 6 lines

From: Benjamin LaHaise <[email protected]>
Date: Tue, 6 Dec 2011 20:04:24 -0500

Quoted 3 lines

Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a forced_eth device with netconsole.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Bridging doesn't try to invoke a downstream netpoll operation at all, and neither should you.

Please have a look at net/bridge/br_device.c:br_netpoll_setup() which is where the approach came from.

I did and I'm not talking about that part, I'm talking about the part where you invoke the downstream device's netpoll operation.

Did you even read my entire sentence, or did you just let the knee jerk reaction set in before you got to the end?

Quoted 1 line

Getting netconsole over vlans working is a requirement for those of us

What does this have to do with anything? I never made any even remote argument that this change wasn't useful. I said only that you implemented it incorrectly.

Take a deep breath and just implement the patch correctly.