search for: virtnet_rx_stat

Displaying 10 results from an estimated 10 matches for "virtnet_rx_stat".

Did you mean: virtnet_rx_stats
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...---------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 1880c86..72d3f68 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -105,10 +105,6 @@ struct virtnet_rq_stats { struct virtnet_rx_stats { struct virtnet_rq_stat_items rx; - struct { - unsigned int xdp_tx; - unsigned int xdp_tx_drops; - } tx; }; #define VIRTNET_SQ_STAT(m) offsetof(struct virtnet_sq_stats, m) @@ -485,22 +481,6 @@ static struct send_queue *virtnet_xdp_sq(struct virtnet_info *vi) return &vi->sq[qp];...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...---------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 1880c86..72d3f68 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -105,10 +105,6 @@ struct virtnet_rq_stats { struct virtnet_rx_stats { struct virtnet_rq_stat_items rx; - struct { - unsigned int xdp_tx; - unsigned int xdp_tx_drops; - } tx; }; #define VIRTNET_SQ_STAT(m) offsetof(struct virtnet_sq_stats, m) @@ -485,22 +481,6 @@ static struct send_queue *virtnet_xdp_sq(struct virtnet_info *vi) return &vi->sq[qp];...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...tio_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[ETH_GSTRING_LEN]; + int typ...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...tio_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[ETH_GSTRING_LEN]; + int typ...
2018 Jul 31
2
[PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
...tnet_rq_stats { > - struct u64_stats_sync syncp; > - struct virtnet_rq_stat_items items; > -}; I'm not thinking removing sq stat is needed but even if it is I want to keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on stack in virtnet_receive. I would just remove virtnet_rx_stats if necessary. > - > -struct virtnet_rx_stats { > - struct virtnet_rq_stat_items rx; > -}; > - -- Toshiaki Makita
2018 Jul 31
2
[PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
...tnet_rq_stats { > - struct u64_stats_sync syncp; > - struct virtnet_rq_stat_items items; > -}; I'm not thinking removing sq stat is needed but even if it is I want to keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on stack in virtnet_receive. I would just remove virtnet_rx_stats if necessary. > - > -struct virtnet_rx_stats { > - struct virtnet_rq_stat_items rx; > -}; > - -- Toshiaki Makita
2018 Jul 31
0
[PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
...rtnet_rq_stat_items { +struct virtnet_rq_stats { + struct u64_stats_sync syncp; u64 packets; u64 bytes; u64 drops; @@ -98,17 +99,8 @@ struct virtnet_rq_stat_items { u64 kicks; }; -struct virtnet_rq_stats { - struct u64_stats_sync syncp; - struct virtnet_rq_stat_items items; -}; - -struct virtnet_rx_stats { - struct virtnet_rq_stat_items rx; -}; - #define VIRTNET_SQ_STAT(m) offsetof(struct virtnet_sq_stats, m) -#define VIRTNET_RQ_STAT(m) offsetof(struct virtnet_rq_stat_items, m) +#define VIRTNET_RQ_STAT(m) offsetof(struct virtnet_rq_stats, m) static const struct virtnet_stat_desc virtnet_sq_sta...
2018 Aug 01
1
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...which can counts >> TX XDP counter itself and remove the unnecessary tx stats embedded in >> rx stats. > Thanks for fixing this. > I wanted to avoid calling u64_stats_update_begin() (i.e. smp_wmb() in 32 > bit systems) for every packet. So I'd like to keep sq stats in > virtnet_rx_stats. > We can optimize this by adding batching on top. (virtnet_xdp_xmit() accepts an array of xdp frames). If you like, please send a patch for this. Thanks
2018 Aug 01
0
[PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
...struct u64_stats_sync syncp; >> - struct virtnet_rq_stat_items items; >> -}; > I'm not thinking removing sq stat is needed but even if it is I want to > keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on > stack in virtnet_receive. I would just remove virtnet_rx_stats if necessary. It's a nop on 64bit machines. And an unsigned on 32bit. So it's overhead could be ignored I think. Thanks >> - >> -struct virtnet_rx_stats { >> - struct virtnet_rq_stat_items rx; >> -}; >> -
2018 Jul 31
0
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...rtnet_xdp_xmit() for XDP_TX which can counts > TX XDP counter itself and remove the unnecessary tx stats embedded in > rx stats. Thanks for fixing this. I wanted to avoid calling u64_stats_update_begin() (i.e. smp_wmb() in 32 bit systems) for every packet. So I'd like to keep sq stats in virtnet_rx_stats. -- Toshiaki Makita