search for: tx_packets

Displaying 20 results from an estimated 132 matches for "tx_packets".

2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...eceive_queue *rq, gfp_t gfp_mask) return p; } +static int free_old_xmit_skbs(struct send_queue *sq, int budget) +{ + struct sk_buff *skb; + unsigned int len; + struct virtnet_info *vi = sq->vq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + u64 tx_bytes = 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); + st...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...eceive_queue *rq, gfp_t gfp_mask) return p; } +static int free_old_xmit_skbs(struct send_queue *sq, int budget) +{ + struct sk_buff *skb; + unsigned int len; + struct virtnet_info *vi = sq->vq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + u64 tx_bytes = 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); + st...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...ruct send_queue *sq, int budget) >> > +{ >> > + struct sk_buff *skb; >> > + unsigned int len; >> > + struct virtnet_info *vi = sq->vq->vdev->priv; >> > + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); >> > + u64 tx_bytes = 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_pac...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...ruct send_queue *sq, int budget) >> > +{ >> > + struct sk_buff *skb; >> > + unsigned int len; >> > + struct virtnet_info *vi = sq->vq->vdev->priv; >> > + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); >> > + u64 tx_bytes = 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_pac...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...o receive and transmit stats and are maintained on a per receive_queue and send_queue basis. virtnet_stats() is modified to aggregate interface level statistics from per-queue statistics. Sample output below: NIC statistics: rxq0: rx_packets: 4357802 rxq0: rx_bytes: 292642052 txq0: tx_packets: 824540 txq0: tx_bytes: 55256404 rxq1: rx_packets: 0 rxq1: rx_bytes: 0 txq1: tx_packets: 1094268 txq1: tx_bytes: 73328316 rxq2: rx_packets: 0 rxq2: rx_bytes: 0 txq2: tx_packets: 1091466 txq2: tx_bytes: 73140566 rxq3: rx_packets: 0 rxq3: rx_byte...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...o receive and transmit stats and are maintained on a per receive_queue and send_queue basis. virtnet_stats() is modified to aggregate interface level statistics from per-queue statistics. Sample output below: NIC statistics: rxq0: rx_packets: 4357802 rxq0: rx_bytes: 292642052 txq0: tx_packets: 824540 txq0: tx_bytes: 55256404 rxq1: rx_packets: 0 rxq1: rx_bytes: 0 txq1: tx_packets: 1094268 txq1: tx_bytes: 73328316 rxq2: rx_packets: 0 rxq2: rx_bytes: 0 txq2: tx_packets: 1091466 txq2: tx_bytes: 73140566 rxq3: rx_packets: 0 rxq3: rx_byte...
2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...S. Tsirkin <mst at redhat.com> > > Signed-off-by: Jason Wang <jasowang at redhat.com> > > Not sure how much it's worth but since Eric suggested it ... Probably depends on the actual cost of u64_stats_update_begin/end against the likely extra saving of the tx_bytes and tx_packets values onto the stack across the call to dev_kfree_skb_any(). (Which depends on the number of caller saved registers.) > Acked-by: Michael S. Tsirkin <mst at redhat.com> > > > --- > > drivers/net/virtio_net.c | 12 ++++++++---- > > 1 files changed, 8 insertions(+)...
2014 Oct 15
2
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...S. Tsirkin <mst at redhat.com> > > Signed-off-by: Jason Wang <jasowang at redhat.com> > > Not sure how much it's worth but since Eric suggested it ... Probably depends on the actual cost of u64_stats_update_begin/end against the likely extra saving of the tx_bytes and tx_packets values onto the stack across the call to dev_kfree_skb_any(). (Which depends on the number of caller saved registers.) > Acked-by: Michael S. Tsirkin <mst at redhat.com> > > > --- > > drivers/net/virtio_net.c | 12 ++++++++---- > > 1 files changed, 8 insertions(+)...
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
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...Signed-off-by: Jason Wang <jasowang at redhat.com> > > > > > > Not sure how much it's worth but since Eric suggested it ... > > > > Probably depends on the actual cost of u64_stats_update_begin/end > > against the likely extra saving of the tx_bytes and tx_packets > > values onto the stack across the call to dev_kfree_skb_any(). > > (Which depends on the number of caller saved registers.) > > Yea, some benchmark results would be nice to see. I there are likely to be multiple skb on the queue the fastest code would probably do one 'vir...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...Signed-off-by: Jason Wang <jasowang at redhat.com> > > > > > > Not sure how much it's worth but since Eric suggested it ... > > > > Probably depends on the actual cost of u64_stats_update_begin/end > > against the likely extra saving of the tx_bytes and tx_packets > > values onto the stack across the call to dev_kfree_skb_any(). > > (Which depends on the number of caller saved registers.) > > Yea, some benchmark results would be nice to see. I there are likely to be multiple skb on the queue the fastest code would probably do one 'vir...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...0644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -833,17 +833,21 @@ static void free_old_xmit_skbs(struct send_queue *sq) unsigned int len; struct virtnet_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...
2014 Oct 15
1
[RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()
...0644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -833,17 +833,21 @@ static void free_old_xmit_skbs(struct send_queue *sq) unsigned int len; struct virtnet_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...
2014 Oct 15
0
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...t) > >> > +{ > >> > + struct sk_buff *skb; > >> > + unsigned int len; > >> > + struct virtnet_info *vi = sq->vq->vdev->priv; > >> > + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); > >> > + u64 tx_bytes = 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-&g...
2014 Oct 15
0
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...ng wrote: ... > +static int free_old_xmit_skbs(struct send_queue *sq, int budget) > +{ > + struct sk_buff *skb; > + unsigned int len; > + struct virtnet_info *vi = sq->vq->vdev->priv; > + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); > + u64 tx_bytes = 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); > + } > +...
2017 Dec 20
4
[PATCH net-next] virtio_net: Add ethtool stats
The main purpose of this patch is adding a way of checking per-queue stats. It's useful to debug performance problems on multiqueue environment. $ ethtool -S ens10 NIC statistics: rx_packets: 4172939 tx_packets: 5855538 rx_bytes: 6317757408 tx_bytes: 8865151846 rx_dropped: 0 rx_length_errors: 0 rx_frame_errors: 0 tx_dropped: 0 tx_fifo_errors: 0 rx_queue_0_packets: 2090408 rx_queue_0_bytes: 3164825094 rx_queue_1_packets: 2082531 rx_queue_1_bytes: 31529...
2017 Dec 20
4
[PATCH net-next] virtio_net: Add ethtool stats
The main purpose of this patch is adding a way of checking per-queue stats. It's useful to debug performance problems on multiqueue environment. $ ethtool -S ens10 NIC statistics: rx_packets: 4172939 tx_packets: 5855538 rx_bytes: 6317757408 tx_bytes: 8865151846 rx_dropped: 0 rx_length_errors: 0 rx_frame_errors: 0 tx_dropped: 0 tx_fifo_errors: 0 rx_queue_0_packets: 2090408 rx_queue_0_bytes: 3164825094 rx_queue_1_packets: 2082531 rx_queue_1_bytes: 31529...
2014 Oct 15
0
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...> } > > +static int free_old_xmit_skbs(struct send_queue *sq, int budget) > +{ > + struct sk_buff *skb; > + unsigned int len; > + struct virtnet_info *vi = sq->vq->vdev->priv; > + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); > + u64 tx_bytes = 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); > + } > +...
2017 Dec 25
2
[PATCH net-next] virtio_net: Add ethtool stats
...wrote: > On Wed, 20 Dec 2017 13:40:37 +0900 > Toshiaki Makita <makita.toshiaki at lab.ntt.co.jp> wrote: > >> + >> +static const struct virtnet_gstats virtnet_gstrings_stats[] = { >> + { "rx_packets", VIRTNET_NETDEV_STAT(rx_packets) }, >> + { "tx_packets", VIRTNET_NETDEV_STAT(tx_packets) }, >> + { "rx_bytes", VIRTNET_NETDEV_STAT(rx_bytes) }, >> + { "tx_bytes", VIRTNET_NETDEV_STAT(tx_bytes) }, >> + { "rx_dropped", VIRTNET_NETDEV_STAT(rx_dropped) }, >> + { "rx_length_errors", VI...