Displaying 20 results from an estimated 41 matches for "virtnet_poll_cleantx".
2017 Apr 02
1
[PATCH net-next 3/3] virtio-net: clean tx descriptors from rx napi
.../virtio_net.c
index 95d938e82080..af830eb212bf 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1030,12 +1030,34 @@ static int virtnet_receive(struct receive_queue *rq, int budget)
return received;
}
+static void free_old_xmit_skbs(struct send_queue *sq);
+
+static void virtnet_poll_cleantx(struct receive_queue *rq)
+{
+ struct virtnet_info *vi = rq->vq->vdev->priv;
+ unsigned int index = vq2rxq(rq->vq);
+ struct send_queue *sq = &vi->sq[index];
+ struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, index);
+
+ if (!sq->napi.weight)
+ return;
+
+ __netif_t...
2017 Apr 03
0
[PATCH net-next 3/3] virtio-net: clean tx descriptors from rx napi
.../net/virtio_net.c
> @@ -1030,12 +1030,34 @@ static int virtnet_receive(struct receive_queue *rq, int budget)
> return received;
> }
>
> +static void free_old_xmit_skbs(struct send_queue *sq);
> +
Could you pls re-arrange code to avoid forward declarations?
> +static void virtnet_poll_cleantx(struct receive_queue *rq)
> +{
> + struct virtnet_info *vi = rq->vq->vdev->priv;
> + unsigned int index = vq2rxq(rq->vq);
> + struct send_queue *sq = &vi->sq[index];
> + struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, index);
> +
> + if (!sq->na...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...if (!packets)
> return;
>
> + if (use_napi)
> + netdev_tx_completed_queue(txq, packets, bytes);
> +
> u64_stats_update_begin(&sq->stats.syncp);
> sq->stats.bytes += bytes;
> sq->stats.packets += packets;
> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> return;
>
> if (__netif_tx_trylock(txq)) {
> - free_old_xmit_skbs(sq);
> + free_old_xmit_skbs(sq, txq, true);
> __netif_tx_unlock(txq);
> }
>
> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...if (!packets)
> return;
>
> + if (use_napi)
> + netdev_tx_completed_queue(txq, packets, bytes);
> +
> u64_stats_update_begin(&sq->stats.syncp);
> sq->stats.bytes += bytes;
> sq->stats.packets += packets;
> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> return;
>
> if (__netif_tx_trylock(txq)) {
> - free_old_xmit_skbs(sq);
> + free_old_xmit_skbs(sq, txq, true);
> __netif_tx_unlock(txq);
> }
>
> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int...
2023 Apr 16
4
[PATCH net] virtio-net: reject small vring sizes
...S + 2.
At the moment, any vring size is accepted. This is problematic because
it may result in attempting to transmit a packet with more fragments
than there are descriptors in the ring.
Furthermore, it leads to an immediate bug:
The condition: (sq->vq->num_free >= 2 + MAX_SKB_FRAGS) in
virtnet_poll_cleantx and virtnet_poll_tx always evaluates to false,
so netif_tx_wake_queue is not called, leading to TX timeouts.
Signed-off-by: Alvaro Karsz <alvaro.karsz at solid-run.com>
---
drivers/net/virtio_net.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/net/vir...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...(use_napi)
>>> + netdev_tx_completed_queue(txq, packets, bytes);
>>> +
>>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int v...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...(use_napi)
>>> + netdev_tx_completed_queue(txq, packets, bytes);
>>> +
>>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int v...
2018 Dec 05
3
[PATCH RFC 0/2] virtio-net: interrupt related improvements
Now that we have brought the virtio overhead way down with a fast packed
ring implementation, we seem to be actually observing TCP drops
indicative of bufferbloat. So let's try to enable TSQ. Note: it isn't
clear that the default pacing is great for the virt usecase. It's worth
trying to play with sk_pacing_shift_update to see what happens.
For this reason, and for a more important
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
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...(use_napi)
>>> + netdev_tx_completed_queue(txq, packets, bytes);
>>> +
>>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int v...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...(use_napi)
>>> + netdev_tx_completed_queue(txq, packets, bytes);
>>> +
>>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int v...
2018 Apr 13
1
[PATCH net] virtio-net: add missing virtqueue kick when flushing packets
...virtnet_poll(struct napi_struct *napi, int budget)
{
struct receive_queue *rq =
container_of(napi, struct receive_queue, napi);
- unsigned int received;
+ struct virtnet_info *vi = rq->vq->vdev->priv;
+ struct send_queue *sq;
+ unsigned int received, qp;
bool xdp_xmit = false;
virtnet_poll_cleantx(rq);
@@ -1280,8 +1282,13 @@ static int virtnet_poll(struct napi_struct *napi, int budget)
if (received < budget)
virtqueue_napi_complete(napi, rq->vq, received);
- if (xdp_xmit)
+ if (xdp_xmit) {
+ qp = vi->curr_queue_pairs - vi->xdp_queue_pairs +
+ smp_processor_id();
+...
2018 Dec 05
0
[PATCH RFC 1/2] virtio-net: bql support
...tic void free_old_xmit_skbs(struct send_queue *sq)
if (!packets)
return;
+ if (use_napi)
+ netdev_tx_completed_queue(txq, packets, bytes);
+
u64_stats_update_begin(&sq->stats.syncp);
sq->stats.bytes += bytes;
sq->stats.packets += packets;
@@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
return;
if (__netif_tx_trylock(txq)) {
- free_old_xmit_skbs(sq);
+ free_old_xmit_skbs(sq, txq, true);
__netif_tx_unlock(txq);
}
@@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
struct netdev_queue *txq = netdev_get_tx...
2019 Jan 02
2
[PATCH RFC 1/2] virtio-net: bql support
...eted_queue(txq, packets, bytes);
>>>>> +
>>>>> u64_stats_update_begin(&sq->stats.syncp);
>>>>> sq->stats.bytes += bytes;
>>>>> sq->stats.packets += packets;
>>>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>>>> return;
>>>>> if (__netif_tx_trylock(txq)) {
>>>>> - free_old_xmit_skbs(sq);
>>>>> + free_old_xmit_skbs(sq, txq, true);
>>>>> __netif_tx_unlock(txq);
>>>>>...
2019 Jan 02
2
[PATCH RFC 1/2] virtio-net: bql support
...eted_queue(txq, packets, bytes);
>>>>> +
>>>>> u64_stats_update_begin(&sq->stats.syncp);
>>>>> sq->stats.bytes += bytes;
>>>>> sq->stats.packets += packets;
>>>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>>>> return;
>>>>> if (__netif_tx_trylock(txq)) {
>>>>> - free_old_xmit_skbs(sq);
>>>>> + free_old_xmit_skbs(sq, txq, true);
>>>>> __netif_tx_unlock(txq);
>>>>>...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...eturn;
> > + if (use_napi)
> > + netdev_tx_completed_queue(txq, packets, bytes);
> > +
> > u64_stats_update_begin(&sq->stats.syncp);
> > sq->stats.bytes += bytes;
> > sq->stats.packets += packets;
> > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > return;
> > if (__netif_tx_trylock(txq)) {
> > - free_old_xmit_skbs(sq);
> > + free_old_xmit_skbs(sq, txq, true);
> > __netif_tx_unlock(txq);
> > }
> > @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct nap...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...eturn;
> > + if (use_napi)
> > + netdev_tx_completed_queue(txq, packets, bytes);
> > +
> > u64_stats_update_begin(&sq->stats.syncp);
> > sq->stats.bytes += bytes;
> > sq->stats.packets += packets;
> > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > return;
> > if (__netif_tx_trylock(txq)) {
> > - free_old_xmit_skbs(sq);
> > + free_old_xmit_skbs(sq, txq, true);
> > __netif_tx_unlock(txq);
> > }
> > @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct nap...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...eturn;
> > + if (use_napi)
> > + netdev_tx_completed_queue(txq, packets, bytes);
> > +
> > u64_stats_update_begin(&sq->stats.syncp);
> > sq->stats.bytes += bytes;
> > sq->stats.packets += packets;
> > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > return;
> > if (__netif_tx_trylock(txq)) {
> > - free_old_xmit_skbs(sq);
> > + free_old_xmit_skbs(sq, txq, true);
> > __netif_tx_unlock(txq);
> > }
> > @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct nap...
2018 Dec 30
0
[PATCH RFC 1/2] virtio-net: bql support
...tx_completed_queue(txq, packets, bytes);
> > > > +
> > > > u64_stats_update_begin(&sq->stats.syncp);
> > > > sq->stats.bytes += bytes;
> > > > sq->stats.packets += packets;
> > > > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > > > return;
> > > > if (__netif_tx_trylock(txq)) {
> > > > - free_old_xmit_skbs(sq);
> > > > + free_old_xmit_skbs(sq, txq, true);
> > > > __netif_tx_unlock(txq);
> > > > }
>...