add netpoll support for 802.1q vlans
Subsystems (2)
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
@@ -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
David Miller
maintainerFrom: 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_ethdevice with netconsole.Signed-off-by Benjamin LaHaise <[email protected]>
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.
Quoted 10 lines · David Miller
From: Benjamin LaHaise <[email protected]>
Date: Tue, 6 Dec 2011 20:04:24 -0500Quoted 4 lines
Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a
forced_ethdevice with netconsole.Signed-off-by Benjamin LaHaise <[email protected]>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."
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
@@ -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
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_ethdevice with netconsole.Signed-off-by Benjamin LaHaise <[email protected]>
Applied.
David Miller
maintainerFrom: 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 -0500Quoted 3 lines
Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a
forced_ethdevice with netconsole.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Benjamin LaHaise <[email protected]>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.
Quoted 5 lines · Benjamin LaHaise
Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a
forced_ethdevice with netconsole.Signed-off-by Benjamin LaHaise <[email protected]>
You also need to handle DEL_VLAN_CMD case.