search for: napi_schedul

Displaying 20 results from an estimated 75 matches for "napi_schedul".

Did you mean: napi_schedule
2014 Oct 20
0
[PATCH RFC v3 1/3] virtio_net: enable tx interrupt
...t_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting for more output buffers. */ - netif_wake_subqueue(vi->dev, vq2txq(vq)); + virtqueue_disable_cb(sq->vq); + napi_schedule(&sq->napi); } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -774,6 +802,31 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi, int budget) +{ + struct send_queue *sq = + container_of(napi, struct send_queue, napi); + str...
2014 Oct 20
0
[PATCH RFC v3 1/3] virtio_net: enable tx interrupt
...t_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting for more output buffers. */ - netif_wake_subqueue(vi->dev, vq2txq(vq)); + virtqueue_disable_cb(sq->vq); + napi_schedule(&sq->napi); } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -774,6 +802,31 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi, int budget) +{ + struct send_queue *sq = + container_of(napi, struct send_queue, napi); + str...
2014 Dec 01
1
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...uct send_queue *sq = &vi->sq[vq2txq(vq)]; > > - /* Suppress further interrupts. */ > - virtqueue_disable_cb(vq); > - > - /* We were probably waiting for more output buffers. */ > - netif_wake_subqueue(vi->dev, vq2txq(vq)); > + virtqueue_disable_cb(sq->vq); > + napi_schedule(&sq->napi); > } > > static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) > @@ -777,6 +808,32 @@ again: > return received; > } > > +static int virtnet_poll_tx(struct napi_struct *napi, int budget) > +{ > + struct send_queue *sq = &gt...
2014 Dec 01
1
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...uct send_queue *sq = &vi->sq[vq2txq(vq)]; > > - /* Suppress further interrupts. */ > - virtqueue_disable_cb(vq); > - > - /* We were probably waiting for more output buffers. */ > - netif_wake_subqueue(vi->dev, vq2txq(vq)); > + virtqueue_disable_cb(sq->vq); > + napi_schedule(&sq->napi); > } > > static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) > @@ -777,6 +808,32 @@ again: > return received; > } > > +static int virtnet_poll_tx(struct napi_struct *napi, int budget) > +{ > + struct send_queue *sq = &gt...
2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
...39;t > allocate a receive buffer, but that's less polite in virtnet_open() so > we schedule a refill as we do in the normal receive path if we run out > of memory. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> Doh. napi_disable does not prevent the following napi_schedule, does it? Can someone confirm that I am not seeing things please? And this means this hack does not work: try_fill_recv can still run in parallel with napi, corrupting the vq. I suspect we need to resurrect a patch that used a dedicated flag to avoid this race. Comments? > --- > driver...
2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
...39;t > allocate a receive buffer, but that's less polite in virtnet_open() so > we schedule a refill as we do in the normal receive path if we run out > of memory. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> Doh. napi_disable does not prevent the following napi_schedule, does it? Can someone confirm that I am not seeing things please? And this means this hack does not work: try_fill_recv can still run in parallel with napi, corrupting the vq. I suspect we need to resurrect a patch that used a dedicated flag to avoid this race. Comments? > --- > driver...
2014 Dec 01
0
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...t_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting for more output buffers. */ - netif_wake_subqueue(vi->dev, vq2txq(vq)); + virtqueue_disable_cb(sq->vq); + napi_schedule(&sq->napi); } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -777,6 +808,32 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi, int budget) +{ + struct send_queue *sq = + container_of(napi, struct send_queue, napi); + str...
2014 Dec 01
0
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...t_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2txq(vq)]; - /* Suppress further interrupts. */ - virtqueue_disable_cb(vq); - - /* We were probably waiting for more output buffers. */ - netif_wake_subqueue(vi->dev, vq2txq(vq)); + virtqueue_disable_cb(sq->vq); + napi_schedule(&sq->napi); } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -777,6 +808,32 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi, int budget) +{ + struct send_queue *sq = + container_of(napi, struct send_queue, napi); + str...
2012 Jan 12
9
Re: [PATCH] add netconsole support for xen-netfront
...gned long flags; > + > + spin_lock_irqsave(&np->tx_lock, flags); > + > + if (likely(netif_carrier_ok(dev))) { > + xennet_tx_buf_gc(dev); > + /* Under tx_lock: protects access to rx shared-ring indexes. */ > + if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx)) > + napi_schedule(&np->napi); > + } > + > + spin_unlock_irqrestore(&np->tx_lock, flags); > + > + return IRQ_HANDLED; > +} > + > +#ifdef CONFIG_NET_POLL_CONTROLLER > +static void xennet_poll_controller(struct net_device *dev) > +{ > + xennet_interrupt(0, dev); > +} &...
2014 Dec 01
9
[PATCH RFC v4 net-next 0/5] virtio_net: enabling tx interrupts
Hello: We used to orphan packets before transmission for virtio-net. This breaks socket accounting and can lead serveral functions won't work, e.g: - Byte Queue Limit depends on tx completion nofication to work. - Packet Generator depends on tx completion nofication for the last transmitted packet to complete. - TCP Small Queue depends on proper accounting of sk_wmem_alloc to work. This
2014 Dec 01
9
[PATCH RFC v4 net-next 0/5] virtio_net: enabling tx interrupts
Hello: We used to orphan packets before transmission for virtio-net. This breaks socket accounting and can lead serveral functions won't work, e.g: - Byte Queue Limit depends on tx completion nofication to work. - Packet Generator depends on tx completion nofication for the last transmitted packet to complete. - TCP Small Queue depends on proper accounting of sk_wmem_alloc to work. This
2014 Dec 19
1
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...t_subqueue(dev, qnum); > - virtqueue_disable_cb(sq->vq); > - } > - } > - } > > if (kick || netif_xmit_stopped(txq)) > virtqueue_kick(sq->vq); > > + if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { > + virtqueue_disable_cb(sq->vq); > + napi_schedule(&sq->napi); > + } > + > return NETDEV_TX_OK; > } > > @@ -1138,8 +1170,10 @@ static int virtnet_close(struct net_device *dev) > /* Make sure refill_work doesn't re-enable napi! */ > cancel_delayed_work_sync(&vi->refill); > > - for (i = 0; i...
2014 Dec 19
1
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...t_subqueue(dev, qnum); > - virtqueue_disable_cb(sq->vq); > - } > - } > - } > > if (kick || netif_xmit_stopped(txq)) > virtqueue_kick(sq->vq); > > + if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { > + virtqueue_disable_cb(sq->vq); > + napi_schedule(&sq->napi); > + } > + > return NETDEV_TX_OK; > } > > @@ -1138,8 +1170,10 @@ static int virtnet_close(struct net_device *dev) > /* Make sure refill_work doesn't re-enable napi! */ > cancel_delayed_work_sync(&vi->refill); > > - for (i = 0; i...
2008 Feb 29
1
[PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
...ivers/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 = NE...
2008 Feb 29
1
[PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging
...ivers/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 = NE...
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c |
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c |
2012 Nov 27
4
[net-next rfc v7 0/3] Multiqueue virtio-net
Hi all: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please review and comments. A protype implementation of qemu-kvm support could by found in git://github.com/jasowang/qemu-kvm-mq.git. To start a guest with two queues, you could specify the queues
2012 Nov 27
4
[net-next rfc v7 0/3] Multiqueue virtio-net
Hi all: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please review and comments. A protype implementation of qemu-kvm support could by found in git://github.com/jasowang/qemu-kvm-mq.git. To start a guest with two queues, you could specify the queues
2012 Dec 04
3
[PATCH net-next 0/3] Multiqueue support for virtio-net
Hi all: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please review and comments. A protype implementation of qemu-kvm support could by found in git://github.com/jasowang/qemu-kvm-mq.git. To start a guest with two queues, you could specify the queues