search for: tx_syncp

Displaying 20 results from an estimated 106 matches for "tx_syncp".

2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...; tx_packets need only be 'unsigned int'. The same is almost certainly true of tx_bytes. David > > while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { > > pr_debug("Sent skb %p\n", skb); > > > > - u64_stats_update_begin(&stats->tx_syncp); > > - stats->tx_bytes += skb->len; > > - stats->tx_packets++; > > - u64_stats_update_end(&stats->tx_syncp); > > + tx_bytes += skb->len; > > + tx_packets++; > > > > dev_kfree_skb_any(skb); > > } > > + > > + u6...
2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...; tx_packets need only be 'unsigned int'. The same is almost certainly true of tx_bytes. David > > while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { > > pr_debug("Sent skb %p\n", skb); > > > > - u64_stats_update_begin(&stats->tx_syncp); > > - stats->tx_bytes += skb->len; > > - stats->tx_packets++; > > - u64_stats_update_end(&stats->tx_syncp); > > + tx_bytes += skb->len; > > + tx_packets++; > > > > dev_kfree_skb_any(skb); > > } > > + > > + u6...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...irtnet_info *vi = sq->vq->vdev->priv; struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + u64 tx_bytes = 0, tx_packets = 0; while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { pr_debug("Sent skb %p\n", skb); - u64_stats_update_begin(&stats->tx_syncp); - stats->tx_bytes += skb->len; - stats->tx_packets++; - u64_stats_update_end(&stats->tx_syncp); + tx_bytes += skb->len; + tx_packets++; dev_kfree_skb_any(skb); } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_pa...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...irtnet_info *vi = sq->vq->vdev->priv; struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + u64 tx_bytes = 0, tx_packets = 0; while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { pr_debug("Sent skb %p\n", skb); - u64_stats_update_begin(&stats->tx_syncp); - stats->tx_bytes += skb->len; - stats->tx_packets++; - u64_stats_update_end(&stats->tx_syncp); + tx_bytes += skb->len; + tx_packets++; dev_kfree_skb_any(skb); } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_pa...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...t certainly true of tx_bytes. > > > > David > > > > > > while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { > > > > pr_debug("Sent skb %p\n", skb); > > > > > > > > - u64_stats_update_begin(&stats->tx_syncp); > > > > - stats->tx_bytes += skb->len; > > > > - stats->tx_packets++; > > > > - u64_stats_update_end(&stats->tx_syncp); > > > > + tx_bytes += skb->len; > > > > + tx_packets++; > > > > > > > &g...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3c23fdc..3c58c52 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -41,15 +41,46 @@ module_param(gso, bool, 0444); #define VIRTNET_DRIVER_VERSION "1.0.0" -struct virtnet_stats { - struct u64_stats_sync tx_syncp; +struct virtnet_rx_stats { struct u64_stats_sync rx_syncp; - u64 tx_bytes; + u64 rx_packets; + u64 rx_bytes; +}; + +struct virtnet_tx_stats { + struct u64_stats_sync tx_syncp; u64 tx_packets; + u64 tx_bytes; +}; - u64 rx_bytes; - u64 rx_packets; +struct virtnet_ethtool_stats { + char desc[ET...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3c23fdc..3c58c52 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -41,15 +41,46 @@ module_param(gso, bool, 0444); #define VIRTNET_DRIVER_VERSION "1.0.0" -struct virtnet_stats { - struct u64_stats_sync tx_syncp; +struct virtnet_rx_stats { struct u64_stats_sync rx_syncp; - u64 tx_bytes; + u64 rx_packets; + u64 rx_bytes; +}; + +struct virtnet_tx_stats { + struct u64_stats_sync tx_syncp; u64 tx_packets; + u64 tx_bytes; +}; - u64 rx_bytes; - u64 rx_packets; +struct virtnet_ethtool_stats { + char desc[ET...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...t certainly true of tx_bytes. > > > > David > > > > > > while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { > > > > pr_debug("Sent skb %p\n", skb); > > > > > > > > - u64_stats_update_begin(&stats->tx_syncp); > > > > - stats->tx_bytes += skb->len; > > > > - stats->tx_packets++; > > > > - u64_stats_update_end(&stats->tx_syncp); > > > > + tx_bytes += skb->len; > > > > + tx_packets++; > > > > > > > &g...
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...ULL) { >> > + pr_debug("Sent skb %p\n", skb); >> > + >> > + tx_bytes += skb->len; >> > + tx_packets++; >> > + >> > + dev_kfree_skb_any(skb); >> > + } >> > + >> > + u64_stats_update_begin(&stats->tx_syncp); >> > + stats->tx_bytes += tx_bytes; >> > + stats->tx_packets =+ tx_packets; >> > + u64_stats_update_end(&stats->tx_syncp); >> > + >> > + return tx_packets; >> > +} >> > + >> > static void skb_xmit_done(struct vi...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...ULL) { >> > + pr_debug("Sent skb %p\n", skb); >> > + >> > + tx_bytes += skb->len; >> > + tx_packets++; >> > + >> > + dev_kfree_skb_any(skb); >> > + } >> > + >> > + u64_stats_update_begin(&stats->tx_syncp); >> > + stats->tx_bytes += tx_bytes; >> > + stats->tx_packets =+ tx_packets; >> > + u64_stats_update_end(&stats->tx_syncp); >> > + >> > + return tx_packets; >> > +} >> > + >> > static void skb_xmit_done(struct vi...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...= 0, tx_packets = 0; + + while (tx_packets < budget && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + tx_bytes += skb->len; + tx_packets++; + + dev_kfree_skb_any(skb); + } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); + + return tx_packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2tx...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...= 0, tx_packets = 0; + + while (tx_packets < budget && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + tx_bytes += skb->len; + tx_packets++; + + dev_kfree_skb_any(skb); + } + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += tx_bytes; + stats->tx_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); + + return tx_packets; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_queue *sq = &vi->sq[vq2tx...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...sq->vq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + int sent = 0; + + while (sent < budget && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + sent++; + } + + return sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...sq->vq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + int sent = 0; + + while (sent < budget && + (skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { + pr_debug("Sent skb %p\n", skb); + + u64_stats_update_begin(&stats->tx_syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_end(&stats->tx_syncp); + + dev_kfree_skb_any(skb); + sent++; + } + + return sent; +} + static void skb_xmit_done(struct virtqueue *vq) { struct virtnet_info *vi = vq->vdev->priv; + struct send_...
2012 Jun 06
9
[PATCH] virtio-net: fix a race on 32bit arches
...b/drivers/net/virtio_net.c index 5214b1e..f18149a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -42,7 +42,8 @@ module_param(gso, bool, 0444); #define VIRTNET_DRIVER_VERSION "1.0.0" struct virtnet_stats { - struct u64_stats_sync syncp; + struct u64_stats_sync tx_syncp; + struct u64_stats_sync rx_syncp; u64 tx_bytes; u64 tx_packets; @@ -300,10 +301,10 @@ static void receive_buf(struct net_device *dev, void *buf, unsigned int len) hdr = skb_vnet_hdr(skb); - u64_stats_update_begin(&stats->syncp); + u64_stats_update_begin(&stats->rx_syncp);...
2012 Jun 06
9
[PATCH] virtio-net: fix a race on 32bit arches
...b/drivers/net/virtio_net.c index 5214b1e..f18149a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -42,7 +42,8 @@ module_param(gso, bool, 0444); #define VIRTNET_DRIVER_VERSION "1.0.0" struct virtnet_stats { - struct u64_stats_sync syncp; + struct u64_stats_sync tx_syncp; + struct u64_stats_sync rx_syncp; u64 tx_bytes; u64 tx_packets; @@ -300,10 +301,10 @@ static void receive_buf(struct net_device *dev, void *buf, unsigned int len) hdr = skb_vnet_hdr(skb); - u64_stats_update_begin(&stats->syncp); + u64_stats_update_begin(&stats->rx_syncp);...
2014 Oct 15
0
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...v->priv; > struct virtnet_stats *stats = this_cpu_ptr(vi->stats); > + u64 tx_bytes = 0, tx_packets = 0; > > while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { > pr_debug("Sent skb %p\n", skb); > > - u64_stats_update_begin(&stats->tx_syncp); > - stats->tx_bytes += skb->len; > - stats->tx_packets++; > - u64_stats_update_end(&stats->tx_syncp); > + tx_bytes += skb->len; > + tx_packets++; > > dev_kfree_skb_any(skb); > } > + > + u64_stats_update_begin(&stats->tx_syncp); &...
2014 Oct 15
0
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...int'. > The same is almost certainly true of tx_bytes. > > David > > > > while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { > > > pr_debug("Sent skb %p\n", skb); > > > > > > - u64_stats_update_begin(&stats->tx_syncp); > > > - stats->tx_bytes += skb->len; > > > - stats->tx_packets++; > > > - u64_stats_update_end(&stats->tx_syncp); > > > + tx_bytes += skb->len; > > > + tx_packets++; > > > > > > dev_kfree_skb_any(skb); >...