Displaying 7 results from an estimated 7 matches for "virtnet_netdev_stat".
2017 Dec 25
2
[PATCH net-next] virtio_net: Add ethtool stats
On 2017/12/25 3:16, Stephen Hemminger 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) },...
2017 Dec 25
2
[PATCH net-next] virtio_net: Add ethtool stats
On 2017/12/25 3:16, Stephen Hemminger 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) },...
2017 Dec 20
4
[PATCH net-next] virtio_net: Add ethtool stats
...+65,31 @@
VIRTIO_NET_F_GUEST_UFO
};
-struct virtnet_stats {
- struct u64_stats_sync tx_syncp;
- struct u64_stats_sync rx_syncp;
- u64 tx_bytes;
- u64 tx_packets;
-
- u64 rx_bytes;
- u64 rx_packets;
+struct virtnet_gstats {
+ char stat_string[ETH_GSTRING_LEN];
+ int stat_offset;
+};
+
+#define VIRTNET_NETDEV_STAT(m) offsetof(struct rtnl_link_stats64, m)
+
+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) },
+ {...
2017 Dec 20
4
[PATCH net-next] virtio_net: Add ethtool stats
...+65,31 @@
VIRTIO_NET_F_GUEST_UFO
};
-struct virtnet_stats {
- struct u64_stats_sync tx_syncp;
- struct u64_stats_sync rx_syncp;
- u64 tx_bytes;
- u64 tx_packets;
-
- u64 rx_bytes;
- u64 rx_packets;
+struct virtnet_gstats {
+ char stat_string[ETH_GSTRING_LEN];
+ int stat_offset;
+};
+
+#define VIRTNET_NETDEV_STAT(m) offsetof(struct rtnl_link_stats64, m)
+
+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) },
+ {...
2017 Dec 24
0
[PATCH net-next] virtio_net: Add ethtool stats
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) },
> + { "r...
2017 Dec 26
0
[PATCH net-next] virtio_net: Add ethtool stats
...mminger 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", VIR...
2017 Dec 25
0
[PATCH net-next] virtio_net: Add ethtool stats
.../12/25 3:16, Stephen Hemminger 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...