From: Yuval Shaia <yuval.shaia@oracle.com>
To: <xen-devel@lists.xensource.com>, <netdev@vger.kernel.org>,
<ian.campbell@citrix.com>
Subject: [PATCH] Add support for netconsole driver used on bridge device with VIF attached
Date: Mon, 21 Jan 2013 09:17:49 -0800 (PST) [thread overview]
Message-ID: <5757e54b-902b-4338-8ac9-43857cd1906c@default> (raw)
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.
As i see it, netconsole driver requires ndo_poll_controller from the device's controlling driver (function __netpoll_setup in net/core/netpoll.c), a thing that is not supported currently in xen_netback driver which is the driver that runs on dom0 and serve VM's virtual interface.
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 <yuval.shaia@oracle.com>
Date: Tue, 8 Jan 2013 10:08:45 +0200
Subject: [PATCH] Add support for netconsole driver used on bridge device with
VIF attached
Signed-off-by: Yuval <yuval.shaia@oracle.com>
---
drivers/net/xen-netback/interface.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 601ae2a..10751f5 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -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,
--
1.7.9.5
next reply other threads:[~2013-01-21 17:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 17:17 Yuval Shaia [this message]
2013-01-21 17:28 ` [PATCH] Add support for netconsole driver used on bridge device with VIF attached Ian Campbell
2013-01-21 18:00 ` yuval.shaia
2013-01-22 9:23 ` Ian Campbell
2013-01-29 8:47 ` yuval.shaia
2013-01-29 8:54 ` Yuval Shaia
2013-01-29 10:29 ` Ian Campbell
2013-04-29 10:42 ` Yuval Shaia
2013-04-30 14:24 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2013-05-01 11:55 Yuval Shaia
2013-05-03 9:11 ` Ian Campbell
2013-01-21 16:34 [PATCH] Add support for netconsole driver used on bridge device with, " yuval.shaia
2013-01-21 16:40 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5757e54b-902b-4338-8ac9-43857cd1906c@default \
--to=yuval.shaia@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=netdev@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox