search for: netif_wake_subqueu

Displaying 20 results from an estimated 99 matches for "netif_wake_subqueu".

Did you mean: netif_wake_subqueue
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...>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)); >> > + if (napi_schedule_prep(&sq->napi)) { >> > + __napi_schedule(&sq->napi); >> > + } >> > } >> > >> > static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) >> > @@ -774,...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...>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)); >> > + if (napi_schedule_prep(&sq->napi)) { >> > + __napi_schedule(&sq->napi); >> > + } >> > } >> > >> > static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) >> > @@ -774,...
2017 Apr 02
5
[PATCH net-next 0/3] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com> Add napi for virtio-net transmit completion processing. Based on previous patchsets by Jason Wang: [RFC V7 PATCH 0/7] enable tx interrupts for virtio-net http://lkml.iu.edu/hypermail/linux/kernel/1505.3/00245.html Changes: RFC -> v1: - dropped vhost interrupt moderation patch: not needed and likely expensive at light
2017 Apr 02
5
[PATCH net-next 0/3] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com> Add napi for virtio-net transmit completion processing. Based on previous patchsets by Jason Wang: [RFC V7 PATCH 0/7] enable tx interrupts for virtio-net http://lkml.iu.edu/hypermail/linux/kernel/1505.3/00245.html Changes: RFC -> v1: - dropped vhost interrupt moderation patch: not needed and likely expensive at light
2014 Oct 14
4
[PATCH RFC] virtio_net: enable tx interrupt
...urn sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_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)); + if (napi_schedule_prep(&sq->napi)) { + __napi_schedule(&sq->napi); + } } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -766,6 +791,37 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi,...
2014 Oct 14
4
[PATCH RFC] virtio_net: enable tx interrupt
...urn sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_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)); + if (napi_schedule_prep(&sq->napi)) { + __napi_schedule(&sq->napi); + } } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -766,6 +791,37 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi,...
2017 Apr 03
0
[PATCH net-next 2/3] virtio-net: transmit napi
...queue *vq) > { > struct virtnet_info *vi = vq->vdev->priv; > + struct napi_struct *napi = &vi->sq[vq2txq(vq)].napi; > > /* Suppress further interrupts. */ > virtqueue_disable_cb(vq); > > - /* We were probably waiting for more output buffers. */ > - netif_wake_subqueue(vi->dev, vq2txq(vq)); > + if (napi->weight) > + virtqueue_napi_schedule(napi, vq); > + else > + /* We were probably waiting for more output buffers. */ > + netif_wake_subqueue(vi->dev, vq2txq(vq)); > } > > static unsigned int mergeable_ctx_to_buf_truesize(un...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
..._packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_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)); + if (napi_schedule_prep(&sq->napi)) { + __napi_schedule(&sq->napi); + } } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -774,7 +801,39 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi,...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
..._packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_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)); + if (napi_schedule_prep(&sq->napi)) { + __napi_schedule(&sq->napi); + } } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -774,7 +801,39 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi,...
2017 Apr 02
1
[PATCH net-next 2/3] virtio-net: transmit napi
...*napi, static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct napi_struct *napi = &vi->sq[vq2txq(vq)].napi; /* Suppress further interrupts. */ virtqueue_disable_cb(vq); - /* We were probably waiting for more output buffers. */ - netif_wake_subqueue(vi->dev, vq2txq(vq)); + if (napi->weight) + virtqueue_napi_schedule(napi, vq); + else + /* We were probably waiting for more output buffers. */ + netif_wake_subqueue(vi->dev, vq2txq(vq)); } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -961,6 +968,9 @@...
2014 Oct 15
1
[PATCH RFC v2 1/3] virtio_net: enable tx interrupt
...packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_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)); + if (napi_schedule_prep(&sq->napi)) + __napi_schedule(&sq->napi); } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -774,6 +798,37 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi, int bu...
2014 Oct 15
1
[PATCH RFC v2 1/3] virtio_net: enable tx interrupt
...packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_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)); + if (napi_schedule_prep(&sq->napi)) + __napi_schedule(&sq->napi); } static unsigned int mergeable_ctx_to_buf_truesize(unsigned long mrg_ctx) @@ -774,6 +798,37 @@ again: return received; } +static int virtnet_poll_tx(struct napi_struct *napi, int bu...
2017 Apr 02
1
[PATCH net-next 3/3] virtio-net: clean tx descriptors from rx napi
...ueue *sq = &vi->sq[index]; + struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, index); + + if (!sq->napi.weight) + return; + + __netif_tx_lock(txq, smp_processor_id()); + free_old_xmit_skbs(sq); + __netif_tx_unlock(txq); + + if (sq->vq->num_free >= 2 + MAX_SKB_FRAGS) + netif_wake_subqueue(vi->dev, vq2txq(sq->vq)); +} + static int virtnet_poll(struct napi_struct *napi, int budget) { struct receive_queue *rq = container_of(napi, struct receive_queue, napi); unsigned int received; + virtnet_poll_cleantx(rq); + received = virtnet_receive(rq, budget); /* Out of pa...
2017 Apr 20
0
[PATCH net-next v2 2/5] virtio-net: transmit napi
...*vq) > { > struct virtnet_info *vi = vq->vdev->priv; > + struct napi_struct *napi = &vi->sq[vq2txq(vq)].napi; > > /* Suppress further interrupts. */ > virtqueue_disable_cb(vq); > > - /* We were probably waiting for more output buffers. */ > - netif_wake_subqueue(vi->dev, vq2txq(vq)); > + if (napi->weight) > + virtqueue_napi_schedule(napi, vq); > + else > + /* We were probably waiting for more output buffers. */ > + netif_wake_subqueue(vi->dev, vq2txq(vq)); > } > > static unsigned int mergeable_ctx_to_buf_truesize...
2014 Oct 15
0
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...t; + 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)); > >> > + if (napi_schedule_prep(&sq->napi)) { > >> > + __napi_schedule(&sq->napi); > >> > + } > >> > } > >> > > >> > static unsigned int mergeable_ctx_to_buf_truesize(unsigned long m...
2015 Mar 15
2
virtio-net: tx queue was stopped
...this the condition you describe? if (sq->vq->num_free < 2+MAX_SKB_FRAGS) { ---> at this point, skb_xmit_done runs. this does: /* Suppress further interrupts. */ virtqueue_disable_cb(vq); /* We were probably waiting for more output buffers. */ netif_wake_subqueue(vi->dev, vq2txq(vq)); ---> netif_stop_subqueue(dev, qnum); ---> queue is now stopped if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { ----> this re-enables interrupts, after an interrupt skb_xmit_done will run again....
2015 Mar 15
2
virtio-net: tx queue was stopped
...this the condition you describe? if (sq->vq->num_free < 2+MAX_SKB_FRAGS) { ---> at this point, skb_xmit_done runs. this does: /* Suppress further interrupts. */ virtqueue_disable_cb(vq); /* We were probably waiting for more output buffers. */ netif_wake_subqueue(vi->dev, vq2txq(vq)); ---> netif_stop_subqueue(dev, qnum); ---> queue is now stopped if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { ----> this re-enables interrupts, after an interrupt skb_xmit_done will run again....
2013 Nov 20
1
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...> > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 7bab4de..24fd502 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -222,6 +222,17 @@ static void skb_xmit_done(struct virtqueue *vq) > > netif_wake_subqueue(vi->dev, vq2txq(vq)); > > } > > > > +static void drop_mergeable_buffer(struct receive_queue *rq, int num_buf) > > +{ > > + char *buf; > > + int len; > > + > > + while (--num_buf && (buf = virtqueue_get_buf(rq->vq, &len)) != NULL)...
2013 Nov 20
1
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...> > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 7bab4de..24fd502 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -222,6 +222,17 @@ static void skb_xmit_done(struct virtqueue *vq) > > netif_wake_subqueue(vi->dev, vq2txq(vq)); > > } > > > > +static void drop_mergeable_buffer(struct receive_queue *rq, int num_buf) > > +{ > > + char *buf; > > + int len; > > + > > + while (--num_buf && (buf = virtqueue_get_buf(rq->vq, &len)) != NULL)...
2017 Jul 18
1
[PATCH net-next 2/5] virtio-net: pack headroom into ctx for mergeable buffer
..., 24 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 1f8c15c..8fae9a8 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -270,6 +270,23 @@ static void skb_xmit_done(struct virtqueue *vq) > netif_wake_subqueue(vi->dev, vq2txq(vq)); > } > > +#define MRG_CTX_HEADER_SHIFT 22 > +static void *mergeable_len_to_ctx(unsigned int truesize, > + unsigned int headroom) > +{ > + return (void *)(unsigned long)((headroom << MRG_CTX_HEADER_SHIFT) | truesize); > +} > + > +s...