1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 /* 3 * include/uapi/linux/ethtool_netlink.h - netlink interface for ethtool 4 * 5 * See Documentation/networking/ethtool-netlink.rst in kernel source tree for 6 * doucumentation of the interface. 7 */ 8 9 #ifndef _UAPI_LINUX_ETHTOOL_NETLINK_H_ 10 #define _UAPI_LINUX_ETHTOOL_NETLINK_H_ 11 12 #include <linux/ethtool.h> 13 14 /* message types - userspace to kernel */ 15 enum { 16 ETHTOOL_MSG_USER_NONE, 17 ETHTOOL_MSG_STRSET_GET, 18 ETHTOOL_MSG_LINKINFO_GET, 19 ETHTOOL_MSG_LINKINFO_SET, 20 ETHTOOL_MSG_LINKMODES_GET, 21 ETHTOOL_MSG_LINKMODES_SET, 22 ETHTOOL_MSG_LINKSTATE_GET, 23 ETHTOOL_MSG_DEBUG_GET, 24 ETHTOOL_MSG_DEBUG_SET, 25 ETHTOOL_MSG_WOL_GET, 26 ETHTOOL_MSG_WOL_SET, 27 ETHTOOL_MSG_FEATURES_GET, 28 ETHTOOL_MSG_FEATURES_SET, 29 ETHTOOL_MSG_PRIVFLAGS_GET, 30 ETHTOOL_MSG_PRIVFLAGS_SET, 31 ETHTOOL_MSG_RINGS_GET, 32 ETHTOOL_MSG_RINGS_SET, 33 ETHTOOL_MSG_CHANNELS_GET, 34 ETHTOOL_MSG_CHANNELS_SET, 35 ETHTOOL_MSG_COALESCE_GET, 36 ETHTOOL_MSG_COALESCE_SET, 37 ETHTOOL_MSG_PAUSE_GET, 38 ETHTOOL_MSG_PAUSE_SET, 39 ETHTOOL_MSG_EEE_GET, 40 ETHTOOL_MSG_EEE_SET, 41 ETHTOOL_MSG_TSINFO_GET, 42 ETHTOOL_MSG_CABLE_TEST_ACT, 43 ETHTOOL_MSG_CABLE_TEST_TDR_ACT, 44 ETHTOOL_MSG_TUNNEL_INFO_GET, 45 ETHTOOL_MSG_FEC_GET, 46 ETHTOOL_MSG_FEC_SET, 47 ETHTOOL_MSG_MODULE_EEPROM_GET, 48 ETHTOOL_MSG_STATS_GET, 49 ETHTOOL_MSG_PHC_VCLOCKS_GET, 50 ETHTOOL_MSG_MODULE_GET, 51 ETHTOOL_MSG_MODULE_SET, 52 53 /* add new constants above here */ 54 __ETHTOOL_MSG_USER_CNT, 55 ETHTOOL_MSG_USER_MAX = __ETHTOOL_MSG_USER_CNT - 1 56 }; 57 58 /* message types - kernel to userspace */ 59 enum { 60 ETHTOOL_MSG_KERNEL_NONE, 61 ETHTOOL_MSG_STRSET_GET_REPLY, 62 ETHTOOL_MSG_LINKINFO_GET_REPLY, 63 ETHTOOL_MSG_LINKINFO_NTF, 64 ETHTOOL_MSG_LINKMODES_GET_REPLY, 65 ETHTOOL_MSG_LINKMODES_NTF, 66 ETHTOOL_MSG_LINKSTATE_GET_REPLY, 67 ETHTOOL_MSG_DEBUG_GET_REPLY, 68 ETHTOOL_MSG_DEBUG_NTF, 69 ETHTOOL_MSG_WOL_GET_REPLY, 70 ETHTOOL_MSG_WOL_NTF, 71 ETHTOOL_MSG_FEATURES_GET_REPLY, 72 ETHTOOL_MSG_FEATURES_SET_REPLY, 73 ETHTOOL_MSG_FEATURES_NTF, 74 ETHTOOL_MSG_PRIVFLAGS_GET_REPLY, 75 ETHTOOL_MSG_PRIVFLAGS_NTF, 76 ETHTOOL_MSG_RINGS_GET_REPLY, 77 ETHTOOL_MSG_RINGS_NTF, 78 ETHTOOL_MSG_CHANNELS_GET_REPLY, 79 ETHTOOL_MSG_CHANNELS_NTF, 80 ETHTOOL_MSG_COALESCE_GET_REPLY, 81 ETHTOOL_MSG_COALESCE_NTF, 82 ETHTOOL_MSG_PAUSE_GET_REPLY, 83 ETHTOOL_MSG_PAUSE_NTF, 84 ETHTOOL_MSG_EEE_GET_REPLY, 85 ETHTOOL_MSG_EEE_NTF, 86 ETHTOOL_MSG_TSINFO_GET_REPLY, 87 ETHTOOL_MSG_CABLE_TEST_NTF, 88 ETHTOOL_MSG_CABLE_TEST_TDR_NTF, 89 ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY, 90 ETHTOOL_MSG_FEC_GET_REPLY, 91 ETHTOOL_MSG_FEC_NTF, 92 ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY, 93 ETHTOOL_MSG_STATS_GET_REPLY, 94 ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY, 95 ETHTOOL_MSG_MODULE_GET_REPLY, 96 ETHTOOL_MSG_MODULE_NTF, 97 98 /* add new constants above here */ 99 __ETHTOOL_MSG_KERNEL_CNT, 100 ETHTOOL_MSG_KERNEL_MAX = __ETHTOOL_MSG_KERNEL_CNT - 1 101 }; 102 103 /* request header */ 104 105 /* use compact bitsets in reply */ 106 #define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0) 107 /* provide optional reply for SET or ACT requests */ 108 #define ETHTOOL_FLAG_OMIT_REPLY (1 << 1) 109 /* request statistics, if supported by the driver */ 110 #define ETHTOOL_FLAG_STATS (1 << 2) 111 112 #define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \ 113 ETHTOOL_FLAG_OMIT_REPLY | \ 114 ETHTOOL_FLAG_STATS) 115 116 enum { 117 ETHTOOL_A_HEADER_UNSPEC, 118 ETHTOOL_A_HEADER_DEV_INDEX, /* u32 */ 119 ETHTOOL_A_HEADER_DEV_NAME, /* string */ 120 ETHTOOL_A_HEADER_FLAGS, /* u32 - ETHTOOL_FLAG_* */ 121 122 /* add new constants above here */ 123 __ETHTOOL_A_HEADER_CNT, 124 ETHTOOL_A_HEADER_MAX = __ETHTOOL_A_HEADER_CNT - 1 125 }; 126 127 /* bit sets */ 128 129 enum { 130 ETHTOOL_A_BITSET_BIT_UNSPEC, 131 ETHTOOL_A_BITSET_BIT_INDEX, /* u32 */ 132 ETHTOOL_A_BITSET_BIT_NAME, /* string */ 133 ETHTOOL_A_BITSET_BIT_VALUE, /* flag */ 134 135 /* add new constants above here */ 136 __ETHTOOL_A_BITSET_BIT_CNT, 137 ETHTOOL_A_BITSET_BIT_MAX = __ETHTOOL_A_BITSET_BIT_CNT - 1 138 }; 139 140 enum { 141 ETHTOOL_A_BITSET_BITS_UNSPEC, 142 ETHTOOL_A_BITSET_BITS_BIT, /* nest - _A_BITSET_BIT_* */ 143 144 /* add new constants above here */ 145 __ETHTOOL_A_BITSET_BITS_CNT, 146 ETHTOOL_A_BITSET_BITS_MAX = __ETHTOOL_A_BITSET_BITS_CNT - 1 147 }; 148 149 enum { 150 ETHTOOL_A_BITSET_UNSPEC, 151 ETHTOOL_A_BITSET_NOMASK, /* flag */ 152 ETHTOOL_A_BITSET_SIZE, /* u32 */ 153 ETHTOOL_A_BITSET_BITS, /* nest - _A_BITSET_BITS_* */ 154 ETHTOOL_A_BITSET_VALUE, /* binary */ 155 ETHTOOL_A_BITSET_MASK, /* binary */ 156 157 /* add new constants above here */ 158 __ETHTOOL_A_BITSET_CNT, 159 ETHTOOL_A_BITSET_MAX = __ETHTOOL_A_BITSET_CNT - 1 160 }; 161 162 /* string sets */ 163 164 enum { 165 ETHTOOL_A_STRING_UNSPEC, 166 ETHTOOL_A_STRING_INDEX, /* u32 */ 167 ETHTOOL_A_STRING_VALUE, /* string */ 168 169 /* add new constants above here */ 170 __ETHTOOL_A_STRING_CNT, 171 ETHTOOL_A_STRING_MAX = __ETHTOOL_A_STRING_CNT - 1 172 }; 173 174 enum { 175 ETHTOOL_A_STRINGS_UNSPEC, 176 ETHTOOL_A_STRINGS_STRING, /* nest - _A_STRINGS_* */ 177 178 /* add new constants above here */ 179 __ETHTOOL_A_STRINGS_CNT, 180 ETHTOOL_A_STRINGS_MAX = __ETHTOOL_A_STRINGS_CNT - 1 181 }; 182 183 enum { 184 ETHTOOL_A_STRINGSET_UNSPEC, 185 ETHTOOL_A_STRINGSET_ID, /* u32 */ 186 ETHTOOL_A_STRINGSET_COUNT, /* u32 */ 187 ETHTOOL_A_STRINGSET_STRINGS, /* nest - _A_STRINGS_* */ 188 189 /* add new constants above here */ 190 __ETHTOOL_A_STRINGSET_CNT, 191 ETHTOOL_A_STRINGSET_MAX = __ETHTOOL_A_STRINGSET_CNT - 1 192 }; 193 194 enum { 195 ETHTOOL_A_STRINGSETS_UNSPEC, 196 ETHTOOL_A_STRINGSETS_STRINGSET, /* nest - _A_STRINGSET_* */ 197 198 /* add new constants above here */ 199 __ETHTOOL_A_STRINGSETS_CNT, 200 ETHTOOL_A_STRINGSETS_MAX = __ETHTOOL_A_STRINGSETS_CNT - 1 201 }; 202 203 /* STRSET */ 204 205 enum { 206 ETHTOOL_A_STRSET_UNSPEC, 207 ETHTOOL_A_STRSET_HEADER, /* nest - _A_HEADER_* */ 208 ETHTOOL_A_STRSET_STRINGSETS, /* nest - _A_STRINGSETS_* */ 209 ETHTOOL_A_STRSET_COUNTS_ONLY, /* flag */ 210 211 /* add new constants above here */ 212 __ETHTOOL_A_STRSET_CNT, 213 ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1 214 }; 215 216 /* LINKINFO */ 217 218 enum { 219 ETHTOOL_A_LINKINFO_UNSPEC, 220 ETHTOOL_A_LINKINFO_HEADER, /* nest - _A_HEADER_* */ 221 ETHTOOL_A_LINKINFO_PORT, /* u8 */ 222 ETHTOOL_A_LINKINFO_PHYADDR, /* u8 */ 223 ETHTOOL_A_LINKINFO_TP_MDIX, /* u8 */ 224 ETHTOOL_A_LINKINFO_TP_MDIX_CTRL, /* u8 */ 225 ETHTOOL_A_LINKINFO_TRANSCEIVER, /* u8 */ 226 227 /* add new constants above here */ 228 __ETHTOOL_A_LINKINFO_CNT, 229 ETHTOOL_A_LINKINFO_MAX = __ETHTOOL_A_LINKINFO_CNT - 1 230 }; 231 232 /* LINKMODES */ 233 234 enum { 235 ETHTOOL_A_LINKMODES_UNSPEC, 236 ETHTOOL_A_LINKMODES_HEADER, /* nest - _A_HEADER_* */ 237 ETHTOOL_A_LINKMODES_AUTONEG, /* u8 */ 238 ETHTOOL_A_LINKMODES_OURS, /* bitset */ 239 ETHTOOL_A_LINKMODES_PEER, /* bitset */ 240 ETHTOOL_A_LINKMODES_SPEED, /* u32 */ 241 ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */ 242 ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG, /* u8 */ 243 ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE, /* u8 */ 244 ETHTOOL_A_LINKMODES_LANES, /* u32 */ 245 246 /* add new constants above here */ 247 __ETHTOOL_A_LINKMODES_CNT, 248 ETHTOOL_A_LINKMODES_MAX = __ETHTOOL_A_LINKMODES_CNT - 1 249 }; 250 251 /* LINKSTATE */ 252 253 enum { 254 ETHTOOL_A_LINKSTATE_UNSPEC, 255 ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */ 256 ETHTOOL_A_LINKSTATE_LINK, /* u8 */ 257 ETHTOOL_A_LINKSTATE_SQI, /* u32 */ 258 ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */ 259 ETHTOOL_A_LINKSTATE_EXT_STATE, /* u8 */ 260 ETHTOOL_A_LINKSTATE_EXT_SUBSTATE, /* u8 */ 261 262 /* add new constants above here */ 263 __ETHTOOL_A_LINKSTATE_CNT, 264 ETHTOOL_A_LINKSTATE_MAX = __ETHTOOL_A_LINKSTATE_CNT - 1 265 }; 266 267 /* DEBUG */ 268 269 enum { 270 ETHTOOL_A_DEBUG_UNSPEC, 271 ETHTOOL_A_DEBUG_HEADER, /* nest - _A_HEADER_* */ 272 ETHTOOL_A_DEBUG_MSGMASK, /* bitset */ 273 274 /* add new constants above here */ 275 __ETHTOOL_A_DEBUG_CNT, 276 ETHTOOL_A_DEBUG_MAX = __ETHTOOL_A_DEBUG_CNT - 1 277 }; 278 279 /* WOL */ 280 281 enum { 282 ETHTOOL_A_WOL_UNSPEC, 283 ETHTOOL_A_WOL_HEADER, /* nest - _A_HEADER_* */ 284 ETHTOOL_A_WOL_MODES, /* bitset */ 285 ETHTOOL_A_WOL_SOPASS, /* binary */ 286 287 /* add new constants above here */ 288 __ETHTOOL_A_WOL_CNT, 289 ETHTOOL_A_WOL_MAX = __ETHTOOL_A_WOL_CNT - 1 290 }; 291 292 /* FEATURES */ 293 294 enum { 295 ETHTOOL_A_FEATURES_UNSPEC, 296 ETHTOOL_A_FEATURES_HEADER, /* nest - _A_HEADER_* */ 297 ETHTOOL_A_FEATURES_HW, /* bitset */ 298 ETHTOOL_A_FEATURES_WANTED, /* bitset */ 299 ETHTOOL_A_FEATURES_ACTIVE, /* bitset */ 300 ETHTOOL_A_FEATURES_NOCHANGE, /* bitset */ 301 302 /* add new constants above here */ 303 __ETHTOOL_A_FEATURES_CNT, 304 ETHTOOL_A_FEATURES_MAX = __ETHTOOL_A_FEATURES_CNT - 1 305 }; 306 307 /* PRIVFLAGS */ 308 309 enum { 310 ETHTOOL_A_PRIVFLAGS_UNSPEC, 311 ETHTOOL_A_PRIVFLAGS_HEADER, /* nest - _A_HEADER_* */ 312 ETHTOOL_A_PRIVFLAGS_FLAGS, /* bitset */ 313 314 /* add new constants above here */ 315 __ETHTOOL_A_PRIVFLAGS_CNT, 316 ETHTOOL_A_PRIVFLAGS_MAX = __ETHTOOL_A_PRIVFLAGS_CNT - 1 317 }; 318 319 /* RINGS */ 320 321 enum { 322 ETHTOOL_TCP_DATA_SPLIT_UNKNOWN = 0, 323 ETHTOOL_TCP_DATA_SPLIT_DISABLED, 324 ETHTOOL_TCP_DATA_SPLIT_ENABLED, 325 }; 326 327 enum { 328 ETHTOOL_A_RINGS_UNSPEC, 329 ETHTOOL_A_RINGS_HEADER, /* nest - _A_HEADER_* */ 330 ETHTOOL_A_RINGS_RX_MAX, /* u32 */ 331 ETHTOOL_A_RINGS_RX_MINI_MAX, /* u32 */ 332 ETHTOOL_A_RINGS_RX_JUMBO_MAX, /* u32 */ 333 ETHTOOL_A_RINGS_TX_MAX, /* u32 */ 334 ETHTOOL_A_RINGS_RX, /* u32 */ 335 ETHTOOL_A_RINGS_RX_MINI, /* u32 */ 336 ETHTOOL_A_RINGS_RX_JUMBO, /* u32 */ 337 ETHTOOL_A_RINGS_TX, /* u32 */ 338 ETHTOOL_A_RINGS_RX_BUF_LEN, /* u32 */ 339 ETHTOOL_A_RINGS_TCP_DATA_SPLIT, /* u8 */ 340 ETHTOOL_A_RINGS_CQE_SIZE, /* u32 */ 341 ETHTOOL_A_RINGS_TX_PUSH, /* u8 */ 342 343 /* add new constants above here */ 344 __ETHTOOL_A_RINGS_CNT, 345 ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1) 346 }; 347 348 /* CHANNELS */ 349 350 enum { 351 ETHTOOL_A_CHANNELS_UNSPEC, 352 ETHTOOL_A_CHANNELS_HEADER, /* nest - _A_HEADER_* */ 353 ETHTOOL_A_CHANNELS_RX_MAX, /* u32 */ 354 ETHTOOL_A_CHANNELS_TX_MAX, /* u32 */ 355 ETHTOOL_A_CHANNELS_OTHER_MAX, /* u32 */ 356 ETHTOOL_A_CHANNELS_COMBINED_MAX, /* u32 */ 357 ETHTOOL_A_CHANNELS_RX_COUNT, /* u32 */ 358 ETHTOOL_A_CHANNELS_TX_COUNT, /* u32 */ 359 ETHTOOL_A_CHANNELS_OTHER_COUNT, /* u32 */ 360 ETHTOOL_A_CHANNELS_COMBINED_COUNT, /* u32 */ 361 362 /* add new constants above here */ 363 __ETHTOOL_A_CHANNELS_CNT, 364 ETHTOOL_A_CHANNELS_MAX = (__ETHTOOL_A_CHANNELS_CNT - 1) 365 }; 366 367 /* COALESCE */ 368 369 enum { 370 ETHTOOL_A_COALESCE_UNSPEC, 371 ETHTOOL_A_COALESCE_HEADER, /* nest - _A_HEADER_* */ 372 ETHTOOL_A_COALESCE_RX_USECS, /* u32 */ 373 ETHTOOL_A_COALESCE_RX_MAX_FRAMES, /* u32 */ 374 ETHTOOL_A_COALESCE_RX_USECS_IRQ, /* u32 */ 375 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ, /* u32 */ 376 ETHTOOL_A_COALESCE_TX_USECS, /* u32 */ 377 ETHTOOL_A_COALESCE_TX_MAX_FRAMES, /* u32 */ 378 ETHTOOL_A_COALESCE_TX_USECS_IRQ, /* u32 */ 379 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ, /* u32 */ 380 ETHTOOL_A_COALESCE_STATS_BLOCK_USECS, /* u32 */ 381 ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX, /* u8 */ 382 ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX, /* u8 */ 383 ETHTOOL_A_COALESCE_PKT_RATE_LOW, /* u32 */ 384 ETHTOOL_A_COALESCE_RX_USECS_LOW, /* u32 */ 385 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW, /* u32 */ 386 ETHTOOL_A_COALESCE_TX_USECS_LOW, /* u32 */ 387 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW, /* u32 */ 388 ETHTOOL_A_COALESCE_PKT_RATE_HIGH, /* u32 */ 389 ETHTOOL_A_COALESCE_RX_USECS_HIGH, /* u32 */ 390 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH, /* u32 */ 391 ETHTOOL_A_COALESCE_TX_USECS_HIGH, /* u32 */ 392 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH, /* u32 */ 393 ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL, /* u32 */ 394 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX, /* u8 */ 395 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX, /* u8 */ 396 397 /* add new constants above here */ 398 __ETHTOOL_A_COALESCE_CNT, 399 ETHTOOL_A_COALESCE_MAX = (__ETHTOOL_A_COALESCE_CNT - 1) 400 }; 401 402 /* PAUSE */ 403 404 enum { 405 ETHTOOL_A_PAUSE_UNSPEC, 406 ETHTOOL_A_PAUSE_HEADER, /* nest - _A_HEADER_* */ 407 ETHTOOL_A_PAUSE_AUTONEG, /* u8 */ 408 ETHTOOL_A_PAUSE_RX, /* u8 */ 409 ETHTOOL_A_PAUSE_TX, /* u8 */ 410 ETHTOOL_A_PAUSE_STATS, /* nest - _PAUSE_STAT_* */ 411 412 /* add new constants above here */ 413 __ETHTOOL_A_PAUSE_CNT, 414 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1) 415 }; 416 417 enum { 418 ETHTOOL_A_PAUSE_STAT_UNSPEC, 419 ETHTOOL_A_PAUSE_STAT_PAD, 420 421 ETHTOOL_A_PAUSE_STAT_TX_FRAMES, 422 ETHTOOL_A_PAUSE_STAT_RX_FRAMES, 423 424 /* add new constants above here 425 * adjust ETHTOOL_PAUSE_STAT_CNT if adding non-stats! 426 */ 427 __ETHTOOL_A_PAUSE_STAT_CNT, 428 ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1) 429 }; 430 431 /* EEE */ 432 433 enum { 434 ETHTOOL_A_EEE_UNSPEC, 435 ETHTOOL_A_EEE_HEADER, /* nest - _A_HEADER_* */ 436 ETHTOOL_A_EEE_MODES_OURS, /* bitset */ 437 ETHTOOL_A_EEE_MODES_PEER, /* bitset */ 438 ETHTOOL_A_EEE_ACTIVE, /* u8 */ 439 ETHTOOL_A_EEE_ENABLED, /* u8 */ 440 ETHTOOL_A_EEE_TX_LPI_ENABLED, /* u8 */ 441 ETHTOOL_A_EEE_TX_LPI_TIMER, /* u32 */ 442 443 /* add new constants above here */ 444 __ETHTOOL_A_EEE_CNT, 445 ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1) 446 }; 447 448 /* TSINFO */ 449 450 enum { 451 ETHTOOL_A_TSINFO_UNSPEC, 452 ETHTOOL_A_TSINFO_HEADER, /* nest - _A_HEADER_* */ 453 ETHTOOL_A_TSINFO_TIMESTAMPING, /* bitset */ 454 ETHTOOL_A_TSINFO_TX_TYPES, /* bitset */ 455 ETHTOOL_A_TSINFO_RX_FILTERS, /* bitset */ 456 ETHTOOL_A_TSINFO_PHC_INDEX, /* u32 */ 457 458 /* add new constants above here */ 459 __ETHTOOL_A_TSINFO_CNT, 460 ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) 461 }; 462 463 /* PHC VCLOCKS */ 464 465 enum { 466 ETHTOOL_A_PHC_VCLOCKS_UNSPEC, 467 ETHTOOL_A_PHC_VCLOCKS_HEADER, /* nest - _A_HEADER_* */ 468 ETHTOOL_A_PHC_VCLOCKS_NUM, /* u32 */ 469 ETHTOOL_A_PHC_VCLOCKS_INDEX, /* array, s32 */ 470 471 /* add new constants above here */ 472 __ETHTOOL_A_PHC_VCLOCKS_CNT, 473 ETHTOOL_A_PHC_VCLOCKS_MAX = (__ETHTOOL_A_PHC_VCLOCKS_CNT - 1) 474 }; 475 476 /* CABLE TEST */ 477 478 enum { 479 ETHTOOL_A_CABLE_TEST_UNSPEC, 480 ETHTOOL_A_CABLE_TEST_HEADER, /* nest - _A_HEADER_* */ 481 482 /* add new constants above here */ 483 __ETHTOOL_A_CABLE_TEST_CNT, 484 ETHTOOL_A_CABLE_TEST_MAX = __ETHTOOL_A_CABLE_TEST_CNT - 1 485 }; 486 487 /* CABLE TEST NOTIFY */ 488 enum { 489 ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC, 490 ETHTOOL_A_CABLE_RESULT_CODE_OK, 491 ETHTOOL_A_CABLE_RESULT_CODE_OPEN, 492 ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT, 493 ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT, 494 }; 495 496 enum { 497 ETHTOOL_A_CABLE_PAIR_A, 498 ETHTOOL_A_CABLE_PAIR_B, 499 ETHTOOL_A_CABLE_PAIR_C, 500 ETHTOOL_A_CABLE_PAIR_D, 501 }; 502 503 enum { 504 ETHTOOL_A_CABLE_RESULT_UNSPEC, 505 ETHTOOL_A_CABLE_RESULT_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */ 506 ETHTOOL_A_CABLE_RESULT_CODE, /* u8 ETHTOOL_A_CABLE_RESULT_CODE_ */ 507 508 __ETHTOOL_A_CABLE_RESULT_CNT, 509 ETHTOOL_A_CABLE_RESULT_MAX = (__ETHTOOL_A_CABLE_RESULT_CNT - 1) 510 }; 511 512 enum { 513 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC, 514 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */ 515 ETHTOOL_A_CABLE_FAULT_LENGTH_CM, /* u32 */ 516 517 __ETHTOOL_A_CABLE_FAULT_LENGTH_CNT, 518 ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1) 519 }; 520 521 enum { 522 ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC, 523 ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED, 524 ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED 525 }; 526 527 enum { 528 ETHTOOL_A_CABLE_NEST_UNSPEC, 529 ETHTOOL_A_CABLE_NEST_RESULT, /* nest - ETHTOOL_A_CABLE_RESULT_ */ 530 ETHTOOL_A_CABLE_NEST_FAULT_LENGTH, /* nest - ETHTOOL_A_CABLE_FAULT_LENGTH_ */ 531 __ETHTOOL_A_CABLE_NEST_CNT, 532 ETHTOOL_A_CABLE_NEST_MAX = (__ETHTOOL_A_CABLE_NEST_CNT - 1) 533 }; 534 535 enum { 536 ETHTOOL_A_CABLE_TEST_NTF_UNSPEC, 537 ETHTOOL_A_CABLE_TEST_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */ 538 ETHTOOL_A_CABLE_TEST_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */ 539 ETHTOOL_A_CABLE_TEST_NTF_NEST, /* nest - of results: */ 540 541 __ETHTOOL_A_CABLE_TEST_NTF_CNT, 542 ETHTOOL_A_CABLE_TEST_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_NTF_CNT - 1) 543 }; 544 545 /* CABLE TEST TDR */ 546 547 enum { 548 ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC, 549 ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST, /* u32 */ 550 ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST, /* u32 */ 551 ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP, /* u32 */ 552 ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR, /* u8 */ 553 554 /* add new constants above here */ 555 __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT, 556 ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1 557 }; 558 559 enum { 560 ETHTOOL_A_CABLE_TEST_TDR_UNSPEC, 561 ETHTOOL_A_CABLE_TEST_TDR_HEADER, /* nest - _A_HEADER_* */ 562 ETHTOOL_A_CABLE_TEST_TDR_CFG, /* nest - *_TDR_CFG_* */ 563 564 /* add new constants above here */ 565 __ETHTOOL_A_CABLE_TEST_TDR_CNT, 566 ETHTOOL_A_CABLE_TEST_TDR_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CNT - 1 567 }; 568 569 /* CABLE TEST TDR NOTIFY */ 570 571 enum { 572 ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC, 573 ETHTOOL_A_CABLE_AMPLITUDE_PAIR, /* u8 */ 574 ETHTOOL_A_CABLE_AMPLITUDE_mV, /* s16 */ 575 576 __ETHTOOL_A_CABLE_AMPLITUDE_CNT, 577 ETHTOOL_A_CABLE_AMPLITUDE_MAX = (__ETHTOOL_A_CABLE_AMPLITUDE_CNT - 1) 578 }; 579 580 enum { 581 ETHTOOL_A_CABLE_PULSE_UNSPEC, 582 ETHTOOL_A_CABLE_PULSE_mV, /* s16 */ 583 584 __ETHTOOL_A_CABLE_PULSE_CNT, 585 ETHTOOL_A_CABLE_PULSE_MAX = (__ETHTOOL_A_CABLE_PULSE_CNT - 1) 586 }; 587 588 enum { 589 ETHTOOL_A_CABLE_STEP_UNSPEC, 590 ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE, /* u32 */ 591 ETHTOOL_A_CABLE_STEP_LAST_DISTANCE, /* u32 */ 592 ETHTOOL_A_CABLE_STEP_STEP_DISTANCE, /* u32 */ 593 594 __ETHTOOL_A_CABLE_STEP_CNT, 595 ETHTOOL_A_CABLE_STEP_MAX = (__ETHTOOL_A_CABLE_STEP_CNT - 1) 596 }; 597 598 enum { 599 ETHTOOL_A_CABLE_TDR_NEST_UNSPEC, 600 ETHTOOL_A_CABLE_TDR_NEST_STEP, /* nest - ETHTTOOL_A_CABLE_STEP */ 601 ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE, /* nest - ETHTOOL_A_CABLE_AMPLITUDE */ 602 ETHTOOL_A_CABLE_TDR_NEST_PULSE, /* nest - ETHTOOL_A_CABLE_PULSE */ 603 604 __ETHTOOL_A_CABLE_TDR_NEST_CNT, 605 ETHTOOL_A_CABLE_TDR_NEST_MAX = (__ETHTOOL_A_CABLE_TDR_NEST_CNT - 1) 606 }; 607 608 enum { 609 ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC, 610 ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */ 611 ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */ 612 ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST, /* nest - of results: */ 613 614 /* add new constants above here */ 615 __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT, 616 ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1 617 }; 618 619 /* TUNNEL INFO */ 620 621 enum { 622 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN, 623 ETHTOOL_UDP_TUNNEL_TYPE_GENEVE, 624 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE, 625 626 __ETHTOOL_UDP_TUNNEL_TYPE_CNT 627 }; 628 629 enum { 630 ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC, 631 632 ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT, /* be16 */ 633 ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE, /* u32 */ 634 635 /* add new constants above here */ 636 __ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT, 637 ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = (__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT - 1) 638 }; 639 640 enum { 641 ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC, 642 643 ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE, /* u32 */ 644 ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES, /* bitset */ 645 ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY, /* nest - _UDP_ENTRY_* */ 646 647 /* add new constants above here */ 648 __ETHTOOL_A_TUNNEL_UDP_TABLE_CNT, 649 ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1) 650 }; 651 652 enum { 653 ETHTOOL_A_TUNNEL_UDP_UNSPEC, 654 655 ETHTOOL_A_TUNNEL_UDP_TABLE, /* nest - _UDP_TABLE_* */ 656 657 /* add new constants above here */ 658 __ETHTOOL_A_TUNNEL_UDP_CNT, 659 ETHTOOL_A_TUNNEL_UDP_MAX = (__ETHTOOL_A_TUNNEL_UDP_CNT - 1) 660 }; 661 662 enum { 663 ETHTOOL_A_TUNNEL_INFO_UNSPEC, 664 ETHTOOL_A_TUNNEL_INFO_HEADER, /* nest - _A_HEADER_* */ 665 666 ETHTOOL_A_TUNNEL_INFO_UDP_PORTS, /* nest - _UDP_TABLE */ 667 668 /* add new constants above here */ 669 __ETHTOOL_A_TUNNEL_INFO_CNT, 670 ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1) 671 }; 672 673 /* FEC */ 674 675 enum { 676 ETHTOOL_A_FEC_UNSPEC, 677 ETHTOOL_A_FEC_HEADER, /* nest - _A_HEADER_* */ 678 ETHTOOL_A_FEC_MODES, /* bitset */ 679 ETHTOOL_A_FEC_AUTO, /* u8 */ 680 ETHTOOL_A_FEC_ACTIVE, /* u32 */ 681 ETHTOOL_A_FEC_STATS, /* nest - _A_FEC_STAT */ 682 683 __ETHTOOL_A_FEC_CNT, 684 ETHTOOL_A_FEC_MAX = (__ETHTOOL_A_FEC_CNT - 1) 685 }; 686 687 enum { 688 ETHTOOL_A_FEC_STAT_UNSPEC, 689 ETHTOOL_A_FEC_STAT_PAD, 690 691 ETHTOOL_A_FEC_STAT_CORRECTED, /* array, u64 */ 692 ETHTOOL_A_FEC_STAT_UNCORR, /* array, u64 */ 693 ETHTOOL_A_FEC_STAT_CORR_BITS, /* array, u64 */ 694 695 /* add new constants above here */ 696 __ETHTOOL_A_FEC_STAT_CNT, 697 ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1) 698 }; 699 700 /* MODULE EEPROM */ 701 702 enum { 703 ETHTOOL_A_MODULE_EEPROM_UNSPEC, 704 ETHTOOL_A_MODULE_EEPROM_HEADER, /* nest - _A_HEADER_* */ 705 706 ETHTOOL_A_MODULE_EEPROM_OFFSET, /* u32 */ 707 ETHTOOL_A_MODULE_EEPROM_LENGTH, /* u32 */ 708 ETHTOOL_A_MODULE_EEPROM_PAGE, /* u8 */ 709 ETHTOOL_A_MODULE_EEPROM_BANK, /* u8 */ 710 ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS, /* u8 */ 711 ETHTOOL_A_MODULE_EEPROM_DATA, /* binary */ 712 713 __ETHTOOL_A_MODULE_EEPROM_CNT, 714 ETHTOOL_A_MODULE_EEPROM_MAX = (__ETHTOOL_A_MODULE_EEPROM_CNT - 1) 715 }; 716 717 /* STATS */ 718 719 enum { 720 ETHTOOL_A_STATS_UNSPEC, 721 ETHTOOL_A_STATS_PAD, 722 ETHTOOL_A_STATS_HEADER, /* nest - _A_HEADER_* */ 723 ETHTOOL_A_STATS_GROUPS, /* bitset */ 724 725 ETHTOOL_A_STATS_GRP, /* nest - _A_STATS_GRP_* */ 726 727 /* add new constants above here */ 728 __ETHTOOL_A_STATS_CNT, 729 ETHTOOL_A_STATS_MAX = (__ETHTOOL_A_STATS_CNT - 1) 730 }; 731 732 enum { 733 ETHTOOL_STATS_ETH_PHY, 734 ETHTOOL_STATS_ETH_MAC, 735 ETHTOOL_STATS_ETH_CTRL, 736 ETHTOOL_STATS_RMON, 737 738 /* add new constants above here */ 739 __ETHTOOL_STATS_CNT 740 }; 741 742 enum { 743 ETHTOOL_A_STATS_GRP_UNSPEC, 744 ETHTOOL_A_STATS_GRP_PAD, 745 746 ETHTOOL_A_STATS_GRP_ID, /* u32 */ 747 ETHTOOL_A_STATS_GRP_SS_ID, /* u32 */ 748 749 ETHTOOL_A_STATS_GRP_STAT, /* nest */ 750 751 ETHTOOL_A_STATS_GRP_HIST_RX, /* nest */ 752 ETHTOOL_A_STATS_GRP_HIST_TX, /* nest */ 753 754 ETHTOOL_A_STATS_GRP_HIST_BKT_LOW, /* u32 */ 755 ETHTOOL_A_STATS_GRP_HIST_BKT_HI, /* u32 */ 756 ETHTOOL_A_STATS_GRP_HIST_VAL, /* u64 */ 757 758 /* add new constants above here */ 759 __ETHTOOL_A_STATS_GRP_CNT, 760 ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1) 761 }; 762 763 enum { 764 /* 30.3.2.1.5 aSymbolErrorDuringCarrier */ 765 ETHTOOL_A_STATS_ETH_PHY_5_SYM_ERR, 766 767 /* add new constants above here */ 768 __ETHTOOL_A_STATS_ETH_PHY_CNT, 769 ETHTOOL_A_STATS_ETH_PHY_MAX = (__ETHTOOL_A_STATS_ETH_PHY_CNT - 1) 770 }; 771 772 enum { 773 /* 30.3.1.1.2 aFramesTransmittedOK */ 774 ETHTOOL_A_STATS_ETH_MAC_2_TX_PKT, 775 /* 30.3.1.1.3 aSingleCollisionFrames */ 776 ETHTOOL_A_STATS_ETH_MAC_3_SINGLE_COL, 777 /* 30.3.1.1.4 aMultipleCollisionFrames */ 778 ETHTOOL_A_STATS_ETH_MAC_4_MULTI_COL, 779 /* 30.3.1.1.5 aFramesReceivedOK */ 780 ETHTOOL_A_STATS_ETH_MAC_5_RX_PKT, 781 /* 30.3.1.1.6 aFrameCheckSequenceErrors */ 782 ETHTOOL_A_STATS_ETH_MAC_6_FCS_ERR, 783 /* 30.3.1.1.7 aAlignmentErrors */ 784 ETHTOOL_A_STATS_ETH_MAC_7_ALIGN_ERR, 785 /* 30.3.1.1.8 aOctetsTransmittedOK */ 786 ETHTOOL_A_STATS_ETH_MAC_8_TX_BYTES, 787 /* 30.3.1.1.9 aFramesWithDeferredXmissions */ 788 ETHTOOL_A_STATS_ETH_MAC_9_TX_DEFER, 789 /* 30.3.1.1.10 aLateCollisions */ 790 ETHTOOL_A_STATS_ETH_MAC_10_LATE_COL, 791 /* 30.3.1.1.11 aFramesAbortedDueToXSColls */ 792 ETHTOOL_A_STATS_ETH_MAC_11_XS_COL, 793 /* 30.3.1.1.12 aFramesLostDueToIntMACXmitError */ 794 ETHTOOL_A_STATS_ETH_MAC_12_TX_INT_ERR, 795 /* 30.3.1.1.13 aCarrierSenseErrors */ 796 ETHTOOL_A_STATS_ETH_MAC_13_CS_ERR, 797 /* 30.3.1.1.14 aOctetsReceivedOK */ 798 ETHTOOL_A_STATS_ETH_MAC_14_RX_BYTES, 799 /* 30.3.1.1.15 aFramesLostDueToIntMACRcvError */ 800 ETHTOOL_A_STATS_ETH_MAC_15_RX_INT_ERR, 801 802 /* 30.3.1.1.18 aMulticastFramesXmittedOK */ 803 ETHTOOL_A_STATS_ETH_MAC_18_TX_MCAST, 804 /* 30.3.1.1.19 aBroadcastFramesXmittedOK */ 805 ETHTOOL_A_STATS_ETH_MAC_19_TX_BCAST, 806 /* 30.3.1.1.20 aFramesWithExcessiveDeferral */ 807 ETHTOOL_A_STATS_ETH_MAC_20_XS_DEFER, 808 /* 30.3.1.1.21 aMulticastFramesReceivedOK */ 809 ETHTOOL_A_STATS_ETH_MAC_21_RX_MCAST, 810 /* 30.3.1.1.22 aBroadcastFramesReceivedOK */ 811 ETHTOOL_A_STATS_ETH_MAC_22_RX_BCAST, 812 /* 30.3.1.1.23 aInRangeLengthErrors */ 813 ETHTOOL_A_STATS_ETH_MAC_23_IR_LEN_ERR, 814 /* 30.3.1.1.24 aOutOfRangeLengthField */ 815 ETHTOOL_A_STATS_ETH_MAC_24_OOR_LEN, 816 /* 30.3.1.1.25 aFrameTooLongErrors */ 817 ETHTOOL_A_STATS_ETH_MAC_25_TOO_LONG_ERR, 818 819 /* add new constants above here */ 820 __ETHTOOL_A_STATS_ETH_MAC_CNT, 821 ETHTOOL_A_STATS_ETH_MAC_MAX = (__ETHTOOL_A_STATS_ETH_MAC_CNT - 1) 822 }; 823 824 enum { 825 /* 30.3.3.3 aMACControlFramesTransmitted */ 826 ETHTOOL_A_STATS_ETH_CTRL_3_TX, 827 /* 30.3.3.4 aMACControlFramesReceived */ 828 ETHTOOL_A_STATS_ETH_CTRL_4_RX, 829 /* 30.3.3.5 aUnsupportedOpcodesReceived */ 830 ETHTOOL_A_STATS_ETH_CTRL_5_RX_UNSUP, 831 832 /* add new constants above here */ 833 __ETHTOOL_A_STATS_ETH_CTRL_CNT, 834 ETHTOOL_A_STATS_ETH_CTRL_MAX = (__ETHTOOL_A_STATS_ETH_CTRL_CNT - 1) 835 }; 836 837 enum { 838 /* etherStatsUndersizePkts */ 839 ETHTOOL_A_STATS_RMON_UNDERSIZE, 840 /* etherStatsOversizePkts */ 841 ETHTOOL_A_STATS_RMON_OVERSIZE, 842 /* etherStatsFragments */ 843 ETHTOOL_A_STATS_RMON_FRAG, 844 /* etherStatsJabbers */ 845 ETHTOOL_A_STATS_RMON_JABBER, 846 847 /* add new constants above here */ 848 __ETHTOOL_A_STATS_RMON_CNT, 849 ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1) 850 }; 851 852 /* MODULE */ 853 854 enum { 855 ETHTOOL_A_MODULE_UNSPEC, 856 ETHTOOL_A_MODULE_HEADER, /* nest - _A_HEADER_* */ 857 ETHTOOL_A_MODULE_POWER_MODE_POLICY, /* u8 */ 858 ETHTOOL_A_MODULE_POWER_MODE, /* u8 */ 859 860 /* add new constants above here */ 861 __ETHTOOL_A_MODULE_CNT, 862 ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1) 863 }; 864 865 /* generic netlink info */ 866 #define ETHTOOL_GENL_NAME "ethtool" 867 #define ETHTOOL_GENL_VERSION 1 868 869 #define ETHTOOL_MCGRP_MONITOR_NAME "monitor" 870 871 #endif /* _UAPI_LINUX_ETHTOOL_NETLINK_H_ */ 872