Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_VIRTIO_NET_H |
| 8 | #define _UAPI_LINUX_VIRTIO_NET_H |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 9 | #include <linux/types.h> |
| 10 | #include <linux/virtio_ids.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #include <linux/virtio_config.h> |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 12 | #include <linux/virtio_types.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 13 | #include <linux/if_ether.h> |
| 14 | #define VIRTIO_NET_F_CSUM 0 |
| 15 | #define VIRTIO_NET_F_GUEST_CSUM 1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 16 | #define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 17 | #define VIRTIO_NET_F_MTU 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 18 | #define VIRTIO_NET_F_MAC 5 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 19 | #define VIRTIO_NET_F_GUEST_TSO4 7 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 20 | #define VIRTIO_NET_F_GUEST_TSO6 8 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 21 | #define VIRTIO_NET_F_GUEST_ECN 9 |
| 22 | #define VIRTIO_NET_F_GUEST_UFO 10 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 23 | #define VIRTIO_NET_F_HOST_TSO4 11 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 24 | #define VIRTIO_NET_F_HOST_TSO6 12 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | #define VIRTIO_NET_F_HOST_ECN 13 |
| 26 | #define VIRTIO_NET_F_HOST_UFO 14 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 27 | #define VIRTIO_NET_F_MRG_RXBUF 15 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 28 | #define VIRTIO_NET_F_STATUS 16 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | #define VIRTIO_NET_F_CTRL_VQ 17 |
| 30 | #define VIRTIO_NET_F_CTRL_RX 18 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 31 | #define VIRTIO_NET_F_CTRL_VLAN 19 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 32 | #define VIRTIO_NET_F_CTRL_RX_EXTRA 20 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 |
| 34 | #define VIRTIO_NET_F_MQ 22 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 35 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 |
Christopher Ferris | 7ac54f5 | 2024-08-07 21:07:12 +0000 | [diff] [blame^] | 36 | #define VIRTIO_NET_F_DEVICE_STATS 50 |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame] | 37 | #define VIRTIO_NET_F_VQ_NOTF_COAL 52 |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 38 | #define VIRTIO_NET_F_NOTF_COAL 53 |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 39 | #define VIRTIO_NET_F_GUEST_USO4 54 |
| 40 | #define VIRTIO_NET_F_GUEST_USO6 55 |
| 41 | #define VIRTIO_NET_F_HOST_USO 56 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 42 | #define VIRTIO_NET_F_HASH_REPORT 57 |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 43 | #define VIRTIO_NET_F_GUEST_HDRLEN 59 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 44 | #define VIRTIO_NET_F_RSS 60 |
| 45 | #define VIRTIO_NET_F_RSC_EXT 61 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 46 | #define VIRTIO_NET_F_STANDBY 62 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 47 | #define VIRTIO_NET_F_SPEED_DUPLEX 63 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 48 | #ifndef VIRTIO_NET_NO_LEGACY |
| 49 | #define VIRTIO_NET_F_GSO 6 |
| 50 | #endif |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 51 | #define VIRTIO_NET_S_LINK_UP 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | #define VIRTIO_NET_S_ANNOUNCE 2 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 53 | #define VIRTIO_NET_RSS_HASH_TYPE_IPv4 (1 << 0) |
| 54 | #define VIRTIO_NET_RSS_HASH_TYPE_TCPv4 (1 << 1) |
| 55 | #define VIRTIO_NET_RSS_HASH_TYPE_UDPv4 (1 << 2) |
| 56 | #define VIRTIO_NET_RSS_HASH_TYPE_IPv6 (1 << 3) |
| 57 | #define VIRTIO_NET_RSS_HASH_TYPE_TCPv6 (1 << 4) |
| 58 | #define VIRTIO_NET_RSS_HASH_TYPE_UDPv6 (1 << 5) |
| 59 | #define VIRTIO_NET_RSS_HASH_TYPE_IP_EX (1 << 6) |
| 60 | #define VIRTIO_NET_RSS_HASH_TYPE_TCP_EX (1 << 7) |
| 61 | #define VIRTIO_NET_RSS_HASH_TYPE_UDP_EX (1 << 8) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | struct virtio_net_config { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | __u8 mac[ETH_ALEN]; |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 64 | __virtio16 status; |
| 65 | __virtio16 max_virtqueue_pairs; |
| 66 | __virtio16 mtu; |
| 67 | __le32 speed; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 68 | __u8 duplex; |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 69 | __u8 rss_max_key_size; |
| 70 | __le16 rss_max_indirection_table_length; |
| 71 | __le32 supported_hash_types; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 72 | } __attribute__((packed)); |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 73 | struct virtio_net_hdr_v1 { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | #define VIRTIO_NET_HDR_F_DATA_VALID 2 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 76 | #define VIRTIO_NET_HDR_F_RSC_INFO 4 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 77 | __u8 flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | #define VIRTIO_NET_HDR_GSO_NONE 0 |
| 79 | #define VIRTIO_NET_HDR_GSO_TCPV4 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | #define VIRTIO_NET_HDR_GSO_UDP 3 |
| 81 | #define VIRTIO_NET_HDR_GSO_TCPV6 4 |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 82 | #define VIRTIO_NET_HDR_GSO_UDP_L4 5 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 | __u8 gso_type; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 85 | __virtio16 hdr_len; |
| 86 | __virtio16 gso_size; |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 87 | union { |
| 88 | struct { |
| 89 | __virtio16 csum_start; |
| 90 | __virtio16 csum_offset; |
| 91 | }; |
| 92 | struct { |
| 93 | __virtio16 start; |
| 94 | __virtio16 offset; |
| 95 | } csum; |
| 96 | struct { |
| 97 | __le16 segments; |
| 98 | __le16 dup_acks; |
| 99 | } rsc; |
| 100 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 101 | __virtio16 num_buffers; |
| 102 | }; |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 103 | struct virtio_net_hdr_v1_hash { |
| 104 | struct virtio_net_hdr_v1 hdr; |
| 105 | __le32 hash_value; |
| 106 | #define VIRTIO_NET_HASH_REPORT_NONE 0 |
| 107 | #define VIRTIO_NET_HASH_REPORT_IPv4 1 |
| 108 | #define VIRTIO_NET_HASH_REPORT_TCPv4 2 |
| 109 | #define VIRTIO_NET_HASH_REPORT_UDPv4 3 |
| 110 | #define VIRTIO_NET_HASH_REPORT_IPv6 4 |
| 111 | #define VIRTIO_NET_HASH_REPORT_TCPv6 5 |
| 112 | #define VIRTIO_NET_HASH_REPORT_UDPv6 6 |
| 113 | #define VIRTIO_NET_HASH_REPORT_IPv6_EX 7 |
| 114 | #define VIRTIO_NET_HASH_REPORT_TCPv6_EX 8 |
| 115 | #define VIRTIO_NET_HASH_REPORT_UDPv6_EX 9 |
| 116 | __le16 hash_report; |
| 117 | __le16 padding; |
| 118 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 119 | #ifndef VIRTIO_NET_NO_LEGACY |
| 120 | struct virtio_net_hdr { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 121 | __u8 flags; |
| 122 | __u8 gso_type; |
| 123 | __virtio16 hdr_len; |
| 124 | __virtio16 gso_size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 125 | __virtio16 csum_start; |
| 126 | __virtio16 csum_offset; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | }; |
| 128 | struct virtio_net_hdr_mrg_rxbuf { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 129 | struct virtio_net_hdr hdr; |
| 130 | __virtio16 num_buffers; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 132 | #endif |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 133 | struct virtio_net_ctrl_hdr { |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame] | 134 | __u8 __linux_class; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | __u8 cmd; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 136 | } __attribute__((packed)); |
| 137 | typedef __u8 virtio_net_ctrl_ack; |
| 138 | #define VIRTIO_NET_OK 0 |
| 139 | #define VIRTIO_NET_ERR 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 140 | #define VIRTIO_NET_CTRL_RX 0 |
| 141 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 |
| 142 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 |
| 143 | #define VIRTIO_NET_CTRL_RX_ALLUNI 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 144 | #define VIRTIO_NET_CTRL_RX_NOMULTI 3 |
| 145 | #define VIRTIO_NET_CTRL_RX_NOUNI 4 |
| 146 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 |
| 147 | struct virtio_net_ctrl_mac { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 148 | __virtio32 entries; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 149 | __u8 macs[][ETH_ALEN]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 150 | } __attribute__((packed)); |
| 151 | #define VIRTIO_NET_CTRL_MAC 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 152 | #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 |
| 153 | #define VIRTIO_NET_CTRL_MAC_ADDR_SET 1 |
| 154 | #define VIRTIO_NET_CTRL_VLAN 2 |
| 155 | #define VIRTIO_NET_CTRL_VLAN_ADD 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 156 | #define VIRTIO_NET_CTRL_VLAN_DEL 1 |
| 157 | #define VIRTIO_NET_CTRL_ANNOUNCE 3 |
| 158 | #define VIRTIO_NET_CTRL_ANNOUNCE_ACK 0 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 159 | #define VIRTIO_NET_CTRL_MQ 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 160 | struct virtio_net_ctrl_mq { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 161 | __virtio16 virtqueue_pairs; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 162 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 163 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 164 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1 |
| 165 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 166 | struct virtio_net_rss_config { |
| 167 | __le32 hash_types; |
| 168 | __le16 indirection_table_mask; |
| 169 | __le16 unclassified_queue; |
| 170 | __le16 indirection_table[1]; |
| 171 | __le16 max_tx_vq; |
| 172 | __u8 hash_key_length; |
| 173 | __u8 hash_key_data[]; |
| 174 | }; |
| 175 | #define VIRTIO_NET_CTRL_MQ_RSS_CONFIG 1 |
| 176 | struct virtio_net_hash_config { |
| 177 | __le32 hash_types; |
| 178 | __le16 reserved[4]; |
| 179 | __u8 hash_key_length; |
| 180 | __u8 hash_key_data[]; |
| 181 | }; |
| 182 | #define VIRTIO_NET_CTRL_MQ_HASH_CONFIG 2 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 183 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5 |
| 184 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0 |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 185 | #define VIRTIO_NET_CTRL_NOTF_COAL 6 |
| 186 | struct virtio_net_ctrl_coal_tx { |
| 187 | __le32 tx_max_packets; |
| 188 | __le32 tx_usecs; |
| 189 | }; |
| 190 | #define VIRTIO_NET_CTRL_NOTF_COAL_TX_SET 0 |
| 191 | struct virtio_net_ctrl_coal_rx { |
| 192 | __le32 rx_max_packets; |
| 193 | __le32 rx_usecs; |
| 194 | }; |
| 195 | #define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET 1 |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame] | 196 | #define VIRTIO_NET_CTRL_NOTF_COAL_VQ_SET 2 |
| 197 | #define VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET 3 |
| 198 | struct virtio_net_ctrl_coal { |
| 199 | __le32 max_packets; |
| 200 | __le32 max_usecs; |
| 201 | }; |
| 202 | struct virtio_net_ctrl_coal_vq { |
| 203 | __le16 vqn; |
| 204 | __le16 reserved; |
| 205 | struct virtio_net_ctrl_coal coal; |
| 206 | }; |
Christopher Ferris | 7ac54f5 | 2024-08-07 21:07:12 +0000 | [diff] [blame^] | 207 | #define VIRTIO_NET_CTRL_STATS 8 |
| 208 | #define VIRTIO_NET_CTRL_STATS_QUERY 0 |
| 209 | #define VIRTIO_NET_CTRL_STATS_GET 1 |
| 210 | struct virtio_net_stats_capabilities { |
| 211 | #define VIRTIO_NET_STATS_TYPE_CVQ (1ULL << 32) |
| 212 | #define VIRTIO_NET_STATS_TYPE_RX_BASIC (1ULL << 0) |
| 213 | #define VIRTIO_NET_STATS_TYPE_RX_CSUM (1ULL << 1) |
| 214 | #define VIRTIO_NET_STATS_TYPE_RX_GSO (1ULL << 2) |
| 215 | #define VIRTIO_NET_STATS_TYPE_RX_SPEED (1ULL << 3) |
| 216 | #define VIRTIO_NET_STATS_TYPE_TX_BASIC (1ULL << 16) |
| 217 | #define VIRTIO_NET_STATS_TYPE_TX_CSUM (1ULL << 17) |
| 218 | #define VIRTIO_NET_STATS_TYPE_TX_GSO (1ULL << 18) |
| 219 | #define VIRTIO_NET_STATS_TYPE_TX_SPEED (1ULL << 19) |
| 220 | __le64 supported_stats_types[1]; |
| 221 | }; |
| 222 | struct virtio_net_ctrl_queue_stats { |
| 223 | struct { |
| 224 | __le16 vq_index; |
| 225 | __le16 reserved[3]; |
| 226 | __le64 types_bitmap[1]; |
| 227 | } stats[1]; |
| 228 | }; |
| 229 | struct virtio_net_stats_reply_hdr { |
| 230 | #define VIRTIO_NET_STATS_TYPE_REPLY_CVQ 32 |
| 231 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_BASIC 0 |
| 232 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_CSUM 1 |
| 233 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_GSO 2 |
| 234 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_SPEED 3 |
| 235 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_BASIC 16 |
| 236 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_CSUM 17 |
| 237 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_GSO 18 |
| 238 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_SPEED 19 |
| 239 | __u8 type; |
| 240 | __u8 reserved; |
| 241 | __le16 vq_index; |
| 242 | __le16 reserved1; |
| 243 | __le16 size; |
| 244 | }; |
| 245 | struct virtio_net_stats_cvq { |
| 246 | struct virtio_net_stats_reply_hdr hdr; |
| 247 | __le64 command_num; |
| 248 | __le64 ok_num; |
| 249 | }; |
| 250 | struct virtio_net_stats_rx_basic { |
| 251 | struct virtio_net_stats_reply_hdr hdr; |
| 252 | __le64 rx_notifications; |
| 253 | __le64 rx_packets; |
| 254 | __le64 rx_bytes; |
| 255 | __le64 rx_interrupts; |
| 256 | __le64 rx_drops; |
| 257 | __le64 rx_drop_overruns; |
| 258 | }; |
| 259 | struct virtio_net_stats_tx_basic { |
| 260 | struct virtio_net_stats_reply_hdr hdr; |
| 261 | __le64 tx_notifications; |
| 262 | __le64 tx_packets; |
| 263 | __le64 tx_bytes; |
| 264 | __le64 tx_interrupts; |
| 265 | __le64 tx_drops; |
| 266 | __le64 tx_drop_malformed; |
| 267 | }; |
| 268 | struct virtio_net_stats_rx_csum { |
| 269 | struct virtio_net_stats_reply_hdr hdr; |
| 270 | __le64 rx_csum_valid; |
| 271 | __le64 rx_needs_csum; |
| 272 | __le64 rx_csum_none; |
| 273 | __le64 rx_csum_bad; |
| 274 | }; |
| 275 | struct virtio_net_stats_tx_csum { |
| 276 | struct virtio_net_stats_reply_hdr hdr; |
| 277 | __le64 tx_csum_none; |
| 278 | __le64 tx_needs_csum; |
| 279 | }; |
| 280 | struct virtio_net_stats_rx_gso { |
| 281 | struct virtio_net_stats_reply_hdr hdr; |
| 282 | __le64 rx_gso_packets; |
| 283 | __le64 rx_gso_bytes; |
| 284 | __le64 rx_gso_packets_coalesced; |
| 285 | __le64 rx_gso_bytes_coalesced; |
| 286 | }; |
| 287 | struct virtio_net_stats_tx_gso { |
| 288 | struct virtio_net_stats_reply_hdr hdr; |
| 289 | __le64 tx_gso_packets; |
| 290 | __le64 tx_gso_bytes; |
| 291 | __le64 tx_gso_segments; |
| 292 | __le64 tx_gso_segments_bytes; |
| 293 | __le64 tx_gso_packets_noseg; |
| 294 | __le64 tx_gso_bytes_noseg; |
| 295 | }; |
| 296 | struct virtio_net_stats_rx_speed { |
| 297 | struct virtio_net_stats_reply_hdr hdr; |
| 298 | __le64 rx_ratelimit_packets; |
| 299 | __le64 rx_ratelimit_bytes; |
| 300 | }; |
| 301 | struct virtio_net_stats_tx_speed { |
| 302 | struct virtio_net_stats_reply_hdr hdr; |
| 303 | __le64 tx_ratelimit_packets; |
| 304 | __le64 tx_ratelimit_bytes; |
| 305 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 306 | #endif |