* [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
@ 2008-02-29 10:54 Amit Shah
2008-03-03 4:08 ` Rusty Russell
2008-03-03 4:08 ` Rusty Russell
0 siblings, 2 replies; 6+ messages in thread
From: Amit Shah @ 2008-02-29 10:54 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, virtualization
Add a new poll_controller handler that the netpoll interface needs.
This enables netconsole logging from a kvm guest over the virtio
net interface.
Signed-off-by: Amit Shah <amitshah@gmx.net>
---
drivers/net/virtio_net.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index fdc2367..3f3d334 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -294,6 +294,15 @@ again:
return 0;
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void virtnet_netpoll(struct net_device *dev)
+{
+ struct virtnet_info *vi = netdev_priv(dev);
+
+ napi_schedule(&vi->napi);
+}
+#endif
+
static int virtnet_open(struct net_device *dev)
{
struct virtnet_info *vi = netdev_priv(dev);
@@ -336,6 +345,9 @@ static int virtnet_probe(struct virtio_device *vdev)
dev->stop = virtnet_close;
dev->hard_start_xmit = start_xmit;
dev->features = NETIF_F_HIGHDMA;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = virtnet_netpoll;
+#endif
SET_NETDEV_DEV(dev, &vdev->dev);
/* Do we support "hardware" checksums? */
--
1.5.2.5
--
Amit Shah
http://www.amitshah.net/
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
2008-02-29 10:54 [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging Amit Shah
@ 2008-03-03 4:08 ` Rusty Russell
2008-03-03 4:52 ` Amit Shah
2008-03-03 4:52 ` Amit Shah
2008-03-03 4:08 ` Rusty Russell
1 sibling, 2 replies; 6+ messages in thread
From: Rusty Russell @ 2008-03-03 4:08 UTC (permalink / raw)
To: Amit Shah; +Cc: linux-kernel, virtualization
On Friday 29 February 2008 21:54:50 Amit Shah wrote:
> Add a new poll_controller handler that the netpoll interface needs.
>
> This enables netconsole logging from a kvm guest over the virtio
> net interface.
>
> Signed-off-by: Amit Shah <amitshah@gmx.net>
Wow, does this actually work?
If so, I'll apply it no problems...
Rusty.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
2008-03-03 4:08 ` Rusty Russell
@ 2008-03-03 4:52 ` Amit Shah
2008-03-03 4:52 ` Amit Shah
1 sibling, 0 replies; 6+ messages in thread
From: Amit Shah @ 2008-03-03 4:52 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, virtualization
On Mon, Mar 3, 2008 at 9:38 AM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Friday 29 February 2008 21:54:50 Amit Shah wrote:
> > Add a new poll_controller handler that the netpoll interface needs.
> >
> > This enables netconsole logging from a kvm guest over the virtio
> > net interface.
> >
> > Signed-off-by: Amit Shah <amitshah@gmx.net>
>
> Wow, does this actually work?
Yes, it does :-)
> If so, I'll apply it no problems...
> Rusty.
Thanks.
Amit.
--
Amit Shah
http://www.amitshah.net/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
2008-03-03 4:08 ` Rusty Russell
2008-03-03 4:52 ` Amit Shah
@ 2008-03-03 4:52 ` Amit Shah
1 sibling, 0 replies; 6+ messages in thread
From: Amit Shah @ 2008-03-03 4:52 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, virtualization
On Mon, Mar 3, 2008 at 9:38 AM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Friday 29 February 2008 21:54:50 Amit Shah wrote:
> > Add a new poll_controller handler that the netpoll interface needs.
> >
> > This enables netconsole logging from a kvm guest over the virtio
> > net interface.
> >
> > Signed-off-by: Amit Shah <amitshah@gmx.net>
>
> Wow, does this actually work?
Yes, it does :-)
> If so, I'll apply it no problems...
> Rusty.
Thanks.
Amit.
--
Amit Shah
http://www.amitshah.net/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
2008-02-29 10:54 [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging Amit Shah
2008-03-03 4:08 ` Rusty Russell
@ 2008-03-03 4:08 ` Rusty Russell
1 sibling, 0 replies; 6+ messages in thread
From: Rusty Russell @ 2008-03-03 4:08 UTC (permalink / raw)
To: Amit Shah; +Cc: linux-kernel, virtualization
On Friday 29 February 2008 21:54:50 Amit Shah wrote:
> Add a new poll_controller handler that the netpoll interface needs.
>
> This enables netconsole logging from a kvm guest over the virtio
> net interface.
>
> Signed-off-by: Amit Shah <amitshah@gmx.net>
Wow, does this actually work?
If so, I'll apply it no problems...
Rusty.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
@ 2008-02-29 10:54 Amit Shah
0 siblings, 0 replies; 6+ messages in thread
From: Amit Shah @ 2008-02-29 10:54 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, virtualization
Add a new poll_controller handler that the netpoll interface needs.
This enables netconsole logging from a kvm guest over the virtio
net interface.
Signed-off-by: Amit Shah <amitshah@gmx.net>
---
drivers/net/virtio_net.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index fdc2367..3f3d334 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -294,6 +294,15 @@ again:
return 0;
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void virtnet_netpoll(struct net_device *dev)
+{
+ struct virtnet_info *vi = netdev_priv(dev);
+
+ napi_schedule(&vi->napi);
+}
+#endif
+
static int virtnet_open(struct net_device *dev)
{
struct virtnet_info *vi = netdev_priv(dev);
@@ -336,6 +345,9 @@ static int virtnet_probe(struct virtio_device *vdev)
dev->stop = virtnet_close;
dev->hard_start_xmit = start_xmit;
dev->features = NETIF_F_HIGHDMA;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = virtnet_netpoll;
+#endif
SET_NETDEV_DEV(dev, &vdev->dev);
/* Do we support "hardware" checksums? */
--
1.5.2.5
--
Amit Shah
http://www.amitshah.net/
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-03 4:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-29 10:54 [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging Amit Shah
2008-03-03 4:08 ` Rusty Russell
2008-03-03 4:52 ` Amit Shah
2008-03-03 4:52 ` Amit Shah
2008-03-03 4:08 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2008-02-29 10:54 Amit Shah
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.