search for: u64_stats_update_end

Displaying 20 results from an estimated 129 matches for "u64_stats_update_end".

2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
...d receive_buf(struct net_device *dev, void *buf, unsigned int len) hdr = skb_vnet_hdr(skb); u64_stats_update_begin(&stats->syncp); - stats->rx_bytes += skb->len; - stats->rx_packets++; + stats->data[VIRTNET_RX_BYTES] += skb->len; + stats->data[VIRTNET_RX_PACKETS]++; u64_stats_update_end(&stats->syncp); if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { @@ -566,8 +570,8 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi) pr_debug("Sent skb %p\n", skb); u64_stats_update_begin(&stats->syncp); - stats->tx_bytes += skb->...
2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
...d receive_buf(struct net_device *dev, void *buf, unsigned int len) hdr = skb_vnet_hdr(skb); u64_stats_update_begin(&stats->syncp); - stats->rx_bytes += skb->len; - stats->rx_packets++; + stats->data[VIRTNET_RX_BYTES] += skb->len; + stats->data[VIRTNET_RX_PACKETS]++; u64_stats_update_end(&stats->syncp); if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { @@ -566,8 +570,8 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi) pr_debug("Sent skb %p\n", skb); u64_stats_update_begin(&stats->syncp); - stats->tx_bytes += skb->...
2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...t; > 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_packe...
2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...t; > 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_packe...
2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...ge *get_a_page(struct virtnet_info *vi, gfp_t gfp_mask) static void skb_xmit_done(struct virtqueue *svq) { struct virtnet_info *vi = svq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + + u64_stats_update_begin(&stats->syncp); + stats->tx_callbacks++; + u64_stats_update_end(&stats->syncp); /* Suppress further interrupts. */ virtqueue_disable_cb(svq); @@ -461,6 +495,7 @@ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) { int err; bool oom; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); do { if (vi->mergeable_rx_bufs...
2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...ge *get_a_page(struct virtnet_info *vi, gfp_t gfp_mask) static void skb_xmit_done(struct virtqueue *svq) { struct virtnet_info *vi = svq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + + u64_stats_update_begin(&stats->syncp); + stats->tx_callbacks++; + u64_stats_update_end(&stats->syncp); /* Suppress further interrupts. */ virtqueue_disable_cb(svq); @@ -461,6 +495,7 @@ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) { int err; bool oom; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); do { if (vi->mergeable_rx_bufs...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...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_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); } static int xmit...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...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_packets =+ tx_packets; + u64_stats_update_end(&stats->tx_syncp); } static int xmit...
2017 Feb 17
0
[PATCH net-next] virtio-net: batch stats updating
...ve_buf(struct virtnet_info *vi, struct receive_queue *rq, skb = receive_small(dev, vi, rq, buf, len); if (unlikely(!skb)) - return; + return 0; hdr = skb_vnet_hdr(skb); - u64_stats_update_begin(&stats->rx_syncp); - stats->rx_bytes += skb->len; - stats->rx_packets++; - u64_stats_update_end(&stats->rx_syncp); + ret = skb->len; if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -775,11 +772,12 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq, ntohs(skb->protocol), skb->len, skb-&gt...
2017 Feb 17
0
[PATCH net-next] virtio-net: batch stats updating
...ve_buf(struct virtnet_info *vi, struct receive_queue *rq, skb = receive_small(dev, vi, rq, buf, len); if (unlikely(!skb)) - return; + return 0; hdr = skb_vnet_hdr(skb); - u64_stats_update_begin(&stats->rx_syncp); - stats->rx_bytes += skb->len; - stats->rx_packets++; - u64_stats_update_end(&stats->rx_syncp); + ret = skb->len; if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -775,11 +772,12 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq, ntohs(skb->protocol), skb->len, skb-&gt...
2012 Jun 06
9
[PATCH] virtio-net: fix a race on 32bit arches
...ts; @@ -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); stats->rx_bytes += skb->len; stats->rx_packets++; - u64_stats_update_end(&stats->syncp); + u64_stats_update_end(&stats->rx_syncp); if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { pr_debug("Needs csum!\n"); @@ -565,10 +566,10 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi) while ((skb = virtqueue_get_buf(vi-&...
2012 Jun 06
9
[PATCH] virtio-net: fix a race on 32bit arches
...ts; @@ -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); stats->rx_bytes += skb->len; stats->rx_packets++; - u64_stats_update_end(&stats->syncp); + u64_stats_update_end(&stats->rx_syncp); if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { pr_debug("Needs csum!\n"); @@ -565,10 +566,10 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi) while ((skb = virtqueue_get_buf(vi-&...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...n)) != 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
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...n)) != 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
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
2020 May 06
2
[PATCH] virtio_net: fix lockdep warning on 32 bit
...break; } while (rq->vq->num_free); if (virtqueue_kick_prepare(rq->vq) && virtqueue_notify(rq->vq)) { - u64_stats_update_begin(&rq->stats.syncp); + unsigned long flags; + + flags = u64_stats_update_begin_irqsave(&rq->stats.syncp); rq->stats.kicks++; - u64_stats_update_end(&rq->stats.syncp); + u64_stats_update_end_irqrestore(&rq->stats.syncp); } return !oom; -- MST
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...;> > + 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 = &...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...;> > + 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 = &...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...ve(struct receive_queue *rq, int budget, { struct virtnet_info *vi = rq->vq->vdev->priv; struct virtnet_rx_stats stats = {}; - struct send_queue *sq; unsigned int len; void *buf; int i; @@ -1351,12 +1326,6 @@ static int virtnet_receive(struct receive_queue *rq, int budget, } u64_stats_update_end(&rq->stats.syncp); - sq = virtnet_xdp_sq(vi); - u64_stats_update_begin(&sq->stats.syncp); - sq->stats.xdp_tx += stats.tx.xdp_tx; - sq->stats.xdp_tx_drops += stats.tx.xdp_tx_drops; - u64_stats_update_end(&sq->stats.syncp); - return stats.rx.packets; } -- 2.7.4