Skip to contentSkip to conversation

Add support for netconsole driver used on bridge device with, VIF attached

PATCH In review [email protected] 2 participants 2 messages Jan 21, 2013

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

PATCH 1/1 Add support for netconsole driver used on bridge device with, VIF attached

When starting a VM which has virtual interface attached to the same bridge (i.e vif = [type=netfront,bridge=xenbr0'] in vm.cfg) which is used for netconsole the following message appears (after about 60 seconds) and VM creation operation fails.
Error: Device 0 (vif) could not be connected. Hotplug scripts not
working.

Note:
When trying to do the opposite, i.e. first create VM and then run netconsole we got the error #524 - vif2.0 doesn't support polling, aborting.

The following patch (to latest kernel) fix this bug by adding implementation to ndo_poll_controller.

0001-Add-support-for-netconsole-driver-used-on-bridge-dev.patch
0 2001
From: Yuval <[email protected]>
Date: Tue, 8 Jan 2013 10:08:45 +0200
Subject: [PATCH] Add support for netconsole driver used on bridge device with
VIF attached

---
 drivers/net/xen-netback/interface.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/xen-netback/interface.c +8 -0
index 601ae2a..10751f5 100644
@@ -179,6 +179,13 @@ static u32 xenvif_fix_features(struct net_device *dev, u32 features)
     return features;
 }
 
+static void xenvif_poll_controller(struct net_device *dev)
+{
+    disable_irq(dev->irq);
+    xenvif_interrupt(dev->irq, dev);
+    enable_irq(dev->irq);
+}
+
 static const struct xenvif_stat {
     char name[ETH_GSTRING_LEN];
     u16 offset;
@@ -237,6 +244,7 @@ static const struct net_device_ops xenvif_netdev_ops = {
     .ndo_stop    = xenvif_close,
     .ndo_change_mtu    = xenvif_change_mtu,
     .ndo_fix_features = xenvif_fix_features,
+    .ndo_poll_controller = xenvif_poll_controller,
 };
 
 struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 7 lines · On Mon, 2013-01-21 at 16:34 +0000, [email protected] wrote:

When starting a VM which has virtual interface attached to the same bridge (i.e vif = [type=netfront,bridge=xenbr0'] in vm.cfg) which is used for netconsole the
following message appears (after about 60 seconds) and VM creation operation fails.
Error: Device 0 (vif) could not be connected. Hotplug scripts not
working.

I'm not sure how this can relate netconsole since this happens before the guest even runs, doesn't it?

Quoted 7 lines

Note:
When trying to do the opposite, i.e. first create VM and then run netconsole we got the error #524 - vif2.0 doesn't support polling, aborting.

The following patch (to latest kernel) fix this bug by adding implementation to ndo_poll_controller.

Surely this is needed in netfront not netback?

BT, you patch is whitespace damanged, please see Documentation/SubmittingPatches and Documentation/email-clients.txt for tips. Please also run checkpatch.pl.

Ian.

Quoted 42 lines

00 01-Add-support-for-netconsole-driver-used-on-bridge-dev.patch 0 2001
From: Yuval <[email protected]>
Date: Tue, 8 Jan 2013 10:08:45 +0200
Subject: [PATCH] Add support for netconsole driver used on bridge device with
VIF attached

---
  drivers/net/xen-netback/interface.c |    8 ++++++++
  1 file changed, 8 insertions(+)
drivers/net/xen-netback/interface.c +7 -0
index 601ae2a..10751f5 100644
@@ -179,6 +179,13 @@ static u32 xenvif_fix_features(struct net_device 
 *dev, u32 features)
      return features;
  }
 
+static void xenvif_poll_controller(struct net_device *dev)
+{
+    disable_irq(dev->irq);
+    xenvif_interrupt(dev->irq, dev);
+    enable_irq(dev->irq);
+}
+
  static const struct xenvif_stat {
      char name[ETH_GSTRING_LEN];
      u16 offset;
drivers/net/xen-netback/interface.c +1 -0
@@ -237,6 +244,7 @@ static const struct net_device_ops xenvif_netdev_ops = {
      .ndo_stop    = xenvif_close,
      .ndo_change_mtu    = xenvif_change_mtu,
      .ndo_fix_features = xenvif_fix_features,
+    .ndo_poll_controller = xenvif_poll_controller,
  };
 
  struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,