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_A_RINGS_UNSPEC, 323 ETHTOOL_A_RINGS_HEADER, /* nest - _A_HEADER_* */ 324 ETHTOOL_A_RINGS_RX_MAX, /* u32 */ 325 ETHTOOL_A_RINGS_RX_MINI_MAX, /* u32 */ 326 ETHTOOL_A_RINGS_RX_JUMBO_MAX, /* u32 */ 327 ETHTOOL_A_RINGS_TX_MAX, /* u32 */ 328 ETHTOOL_A_RINGS_RX, /* u32 */ 329 ETHTOOL_A_RINGS_RX_MINI, /* u32 */ 330 ETHTOOL_A_RINGS_RX_JUMBO, /* u32 */ 331 ETHTOOL_A_RINGS_TX, /* u32 */ 332 333 /* add new constants above here */ 334 __ETHTOOL_A_RINGS_CNT, 335 ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1) 336 }; 337 338 /* CHANNELS */ 339 340 enum { 341 ETHTOOL_A_CHANNELS_UNSPEC, 342 ETHTOOL_A_CHANNELS_HEADER, /* nest - _A_HEADER_* */ 343 ETHTOOL_A_CHANNELS_RX_MAX, /* u32 */ 344 ETHTOOL_A_CHANNELS_TX_MAX, /* u32 */ 345 ETHTOOL_A_CHANNELS_OTHER_MAX, /* u32 */ 346 ETHTOOL_A_CHANNELS_COMBINED_MAX, /* u32 */ 347 ETHTOOL_A_CHANNELS_RX_COUNT, /* u32 */ 348 ETHTOOL_A_CHANNELS_TX_COUNT, /* u32 */ 349 ETHTOOL_A_CHANNELS_OTHER_COUNT, /* u32 */ 350 ETHTOOL_A_CHANNELS_COMBINED_COUNT, /* u32 */ 351 352 /* add new constants above here */ 353 __ETHTOOL_A_CHANNELS_CNT, 354 ETHTOOL_A_CHANNELS_MAX = (__ETHTOOL_A_CHANNELS_CNT - 1) 355 }; 356 357 /* COALESCE */ 358 359 enum { 360 ETHTOOL_A_COALESCE_UNSPEC, 361 ETHTOOL_A_COALESCE_HEADER, /* nest - _A_HEADER_* */ 362 ETHTOOL_A_COALESCE_RX_USECS, /* u32 */ 363 ETHTOOL_A_COALESCE_RX_MAX_FRAMES, /* u32 */ 364 ETHTOOL_A_COALESCE_RX_USECS_IRQ, /* u32 */ 365 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ, /* u32 */ 366 ETHTOOL_A_COALESCE_TX_USECS, /* u32 */ 367 ETHTOOL_A_COALESCE_TX_MAX_FRAMES, /* u32 */ 368 ETHTOOL_A_COALESCE_TX_USECS_IRQ, /* u32 */ 369 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ, /* u32 */ 370 ETHTOOL_A_COALESCE_STATS_BLOCK_USECS, /* u32 */ 371 ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX, /* u8 */ 372 ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX, /* u8 */ 373 ETHTOOL_A_COALESCE_PKT_RATE_LOW, /* u32 */ 374 ETHTOOL_A_COALESCE_RX_USECS_LOW, /* u32 */ 375 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW, /* u32 */ 376 ETHTOOL_A_COALESCE_TX_USECS_LOW, /* u32 */ 377 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW, /* u32 */ 378 ETHTOOL_A_COALESCE_PKT_RATE_HIGH, /* u32 */ 379 ETHTOOL_A_COALESCE_RX_USECS_HIGH, /* u32 */ 380 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH, /* u32 */ 381 ETHTOOL_A_COALESCE_TX_USECS_HIGH, /* u32 */ 382 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH, /* u32 */ 383 ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL, /* u32 */ 384 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX, /* u8 */ 385 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX, /* u8 */ 386 387 /* add new constants above here */ 388 __ETHTOOL_A_COALESCE_CNT, 389 ETHTOOL_A_COALESCE_MAX = (__ETHTOOL_A_COALESCE_CNT - 1) 390 }; 391 392 /* PAUSE */ 393 394 enum { 395 ETHTOOL_A_PAUSE_UNSPEC, 396 ETHTOOL_A_PAUSE_HEADER, /* nest - _A_HEADER_* */ 397 ETHTOOL_A_PAUSE_AUTONEG, /* u8 */ 398 ETHTOOL_A_PAUSE_RX, /* u8 */ 399 ETHTOOL_A_PAUSE_TX, /* u8 */ 400 ETHTOOL_A_PAUSE_STATS, /* nest - _PAUSE_STAT_* */ 401 402 /* add new constants above here */ 403 __ETHTOOL_A_PAUSE_CNT, 404 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1) 405 }; 406 407 enum { 408 ETHTOOL_A_PAUSE_STAT_UNSPEC, 409 ETHTOOL_A_PAUSE_STAT_PAD, 410 411 ETHTOOL_A_PAUSE_STAT_TX_FRAMES, 412 ETHTOOL_A_PAUSE_STAT_RX_FRAMES, 413 414 /* add new constants above here 415 * adjust ETHTOOL_PAUSE_STAT_CNT if adding non-stats! 416 */ 417 __ETHTOOL_A_PAUSE_STAT_CNT, 418 ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1) 419 }; 420 421 /* EEE */ 422 423 enum { 424 ETHTOOL_A_EEE_UNSPEC, 425 ETHTOOL_A_EEE_HEADER, /* nest - _A_HEADER_* */ 426 ETHTOOL_A_EEE_MODES_OURS, /* bitset */ 427 ETHTOOL_A_EEE_MODES_PEER, /* bitset */ 428 ETHTOOL_A_EEE_ACTIVE, /* u8 */ 429 ETHTOOL_A_EEE_ENABLED, /* u8 */ 430 ETHTOOL_A_EEE_TX_LPI_ENABLED, /* u8 */ 431 ETHTOOL_A_EEE_TX_LPI_TIMER, /* u32 */ 432 433 /* add new constants above here */ 434 __ETHTOOL_A_EEE_CNT, 435 ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1) 436 }; 437 438 /* TSINFO */ 439 440 enum { 441 ETHTOOL_A_TSINFO_UNSPEC, 442 ETHTOOL_A_TSINFO_HEADER, /* nest - _A_HEADER_* */ 443 ETHTOOL_A_TSINFO_TIMESTAMPING, /* bitset */ 444 ETHTOOL_A_TSINFO_TX_TYPES, /* bitset */ 445 ETHTOOL_A_TSINFO_RX_FILTERS, /* bitset */ 446 ETHTOOL_A_TSINFO_PHC_INDEX, /* u32 */ 447 448 /* add new constants above here */ 449 __ETHTOOL_A_TSINFO_CNT, 450 ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) 451 }; 452 453 /* PHC VCLOCKS */ 454 455 enum { 456 ETHTOOL_A_PHC_VCLOCKS_UNSPEC, 457 ETHTOOL_A_PHC_VCLOCKS_HEADER, /* nest - _A_HEADER_* */ 458 ETHTOOL_A_PHC_VCLOCKS_NUM, /* u32 */ 459 ETHTOOL_A_PHC_VCLOCKS_INDEX, /* array, s32 */ 460 461 /* add new constants above here */ 462 __ETHTOOL_A_PHC_VCLOCKS_CNT, 463 ETHTOOL_A_PHC_VCLOCKS_MAX = (__ETHTOOL_A_PHC_VCLOCKS_CNT - 1) 464 }; 465 466 /* CABLE TEST */ 467 468 enum { 469 ETHTOOL_A_CABLE_TEST_UNSPEC, 470 ETHTOOL_A_CABLE_TEST_HEADER, /* nest - _A_HEADER_* */ 471 472 /* add new constants above here */ 473 __ETHTOOL_A_CABLE_TEST_CNT, 474 ETHTOOL_A_CABLE_TEST_MAX = __ETHTOOL_A_CABLE_TEST_CNT - 1 475 }; 476 477 /* CABLE TEST NOTIFY */ 478 enum { 479 ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC, 480 ETHTOOL_A_CABLE_RESULT_CODE_OK, 481 ETHTOOL_A_CABLE_RESULT_CODE_OPEN, 482 ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT, 483 ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT, 484 }; 485 486 enum { 487 ETHTOOL_A_CABLE_PAIR_A, 488 ETHTOOL_A_CABLE_PAIR_B, 489 ETHTOOL_A_CABLE_PAIR_C, 490 ETHTOOL_A_CABLE_PAIR_D, 491 }; 492 493 enum { 494 ETHTOOL_A_CABLE_RESULT_UNSPEC, 495 ETHTOOL_A_CABLE_RESULT_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */ 496 ETHTOOL_A_CABLE_RESULT_CODE, /* u8 ETHTOOL_A_CABLE_RESULT_CODE_ */ 497 498 __ETHTOOL_A_CABLE_RESULT_CNT, 499 ETHTOOL_A_CABLE_RESULT_MAX = (__ETHTOOL_A_CABLE_RESULT_CNT - 1) 500 }; 501 502 enum { 503 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC, 504 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */ 505 ETHTOOL_A_CABLE_FAULT_LENGTH_CM, /* u32 */ 506 507 __ETHTOOL_A_CABLE_FAULT_LENGTH_CNT, 508 ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1) 509 }; 510 511 enum { 512 ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC, 513 ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED, 514 ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED 515 }; 516 517 enum { 518 ETHTOOL_A_CABLE_NEST_UNSPEC, 519 ETHTOOL_A_CABLE_NEST_RESULT, /* nest - ETHTOOL_A_CABLE_RESULT_ */ 520 ETHTOOL_A_CABLE_NEST_FAULT_LENGTH, /* nest - ETHTOOL_A_CABLE_FAULT_LENGTH_ */ 521 __ETHTOOL_A_CABLE_NEST_CNT, 522 ETHTOOL_A_CABLE_NEST_MAX = (__ETHTOOL_A_CABLE_NEST_CNT - 1) 523 }; 524 525 enum { 526 ETHTOOL_A_CABLE_TEST_NTF_UNSPEC, 527 ETHTOOL_A_CABLE_TEST_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */ 528 ETHTOOL_A_CABLE_TEST_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */ 529 ETHTOOL_A_CABLE_TEST_NTF_NEST, /* nest - of results: */ 530 531 __ETHTOOL_A_CABLE_TEST_NTF_CNT, 532 ETHTOOL_A_CABLE_TEST_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_NTF_CNT - 1) 533 }; 534 535 /* CABLE TEST TDR */ 536 537 enum { 538 ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC, 539 ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST, /* u32 */ 540 ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST, /* u32 */ 541 ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP, /* u32 */ 542 ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR, /* u8 */ 543 544 /* add new constants above here */ 545 __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT, 546 ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1 547 }; 548 549 enum { 550 ETHTOOL_A_CABLE_TEST_TDR_UNSPEC, 551 ETHTOOL_A_CABLE_TEST_TDR_HEADER, /* nest - _A_HEADER_* */ 552 ETHTOOL_A_CABLE_TEST_TDR_CFG, /* nest - *_TDR_CFG_* */ 553 554 /* add new constants above here */ 555 __ETHTOOL_A_CABLE_TEST_TDR_CNT, 556 ETHTOOL_A_CABLE_TEST_TDR_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CNT - 1 557 }; 558 559 /* CABLE TEST TDR NOTIFY */ 560 561 enum { 562 ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC, 563 ETHTOOL_A_CABLE_AMPLITUDE_PAIR, /* u8 */ 564 ETHTOOL_A_CABLE_AMPLITUDE_mV, /* s16 */ 565 566 __ETHTOOL_A_CABLE_AMPLITUDE_CNT, 567 ETHTOOL_A_CABLE_AMPLITUDE_MAX = (__ETHTOOL_A_CABLE_AMPLITUDE_CNT - 1) 568 }; 569 570 enum { 571 ETHTOOL_A_CABLE_PULSE_UNSPEC, 572 ETHTOOL_A_CABLE_PULSE_mV, /* s16 */ 573 574 __ETHTOOL_A_CABLE_PULSE_CNT, 575 ETHTOOL_A_CABLE_PULSE_MAX = (__ETHTOOL_A_CABLE_PULSE_CNT - 1) 576 }; 577 578 enum { 579 ETHTOOL_A_CABLE_STEP_UNSPEC, 580 ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE, /* u32 */ 581 ETHTOOL_A_CABLE_STEP_LAST_DISTANCE, /* u32 */ 582 ETHTOOL_A_CABLE_STEP_STEP_DISTANCE, /* u32 */ 583 584 __ETHTOOL_A_CABLE_STEP_CNT, 585 ETHTOOL_A_CABLE_STEP_MAX = (__ETHTOOL_A_CABLE_STEP_CNT - 1) 586 }; 587 588 enum { 589 ETHTOOL_A_CABLE_TDR_NEST_UNSPEC, 590 ETHTOOL_A_CABLE_TDR_NEST_STEP, /* nest - ETHTTOOL_A_CABLE_STEP */ 591 ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE, /* nest - ETHTOOL_A_CABLE_AMPLITUDE */ 592 ETHTOOL_A_CABLE_TDR_NEST_PULSE, /* nest - ETHTOOL_A_CABLE_PULSE */ 593 594 __ETHTOOL_A_CABLE_TDR_NEST_CNT, 595 ETHTOOL_A_CABLE_TDR_NEST_MAX = (__ETHTOOL_A_CABLE_TDR_NEST_CNT - 1) 596 }; 597 598 enum { 599 ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC, 600 ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */ 601 ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */ 602 ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST, /* nest - of results: */ 603 604 /* add new constants above here */ 605 __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT, 606 ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1 607 }; 608 609 /* TUNNEL INFO */ 610 611 enum { 612 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN, 613 ETHTOOL_UDP_TUNNEL_TYPE_GENEVE, 614 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE, 615 616 __ETHTOOL_UDP_TUNNEL_TYPE_CNT 617 }; 618 619 enum { 620 ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC, 621 622 ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT, /* be16 */ 623 ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE, /* u32 */ 624 625 /* add new constants above here */ 626 __ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT, 627 ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = (__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT - 1) 628 }; 629 630 enum { 631 ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC, 632 633 ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE, /* u32 */ 634 ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES, /* bitset */ 635 ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY, /* nest - _UDP_ENTRY_* */ 636 637 /* add new constants above here */ 638 __ETHTOOL_A_TUNNEL_UDP_TABLE_CNT, 639 ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1) 640 }; 641 642 enum { 643 ETHTOOL_A_TUNNEL_UDP_UNSPEC, 644 645 ETHTOOL_A_TUNNEL_UDP_TABLE, /* nest - _UDP_TABLE_* */ 646 647 /* add new constants above here */ 648 __ETHTOOL_A_TUNNEL_UDP_CNT, 649 ETHTOOL_A_TUNNEL_UDP_MAX = (__ETHTOOL_A_TUNNEL_UDP_CNT - 1) 650 }; 651 652 enum { 653 ETHTOOL_A_TUNNEL_INFO_UNSPEC, 654 ETHTOOL_A_TUNNEL_INFO_HEADER, /* nest - _A_HEADER_* */ 655 656 ETHTOOL_A_TUNNEL_INFO_UDP_PORTS, /* nest - _UDP_TABLE */ 657 658 /* add new constants above here */ 659 __ETHTOOL_A_TUNNEL_INFO_CNT, 660 ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1) 661 }; 662 663 /* FEC */ 664 665 enum { 666 ETHTOOL_A_FEC_UNSPEC, 667 ETHTOOL_A_FEC_HEADER, /* nest - _A_HEADER_* */ 668 ETHTOOL_A_FEC_MODES, /* bitset */ 669 ETHTOOL_A_FEC_AUTO, /* u8 */ 670 ETHTOOL_A_FEC_ACTIVE, /* u32 */ 671 ETHTOOL_A_FEC_STATS, /* nest - _A_FEC_STAT */ 672 673 __ETHTOOL_A_FEC_CNT, 674 ETHTOOL_A_FEC_MAX = (__ETHTOOL_A_FEC_CNT - 1) 675 }; 676 677 enum { 678 ETHTOOL_A_FEC_STAT_UNSPEC, 679 ETHTOOL_A_FEC_STAT_PAD, 680 681 ETHTOOL_A_FEC_STAT_CORRECTED, /* array, u64 */ 682 ETHTOOL_A_FEC_STAT_UNCORR, /* array, u64 */ 683 ETHTOOL_A_FEC_STAT_CORR_BITS, /* array, u64 */ 684 685 /* add new constants above here */ 686 __ETHTOOL_A_FEC_STAT_CNT, 687 ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1) 688 }; 689 690 /* MODULE EEPROM */ 691 692 enum { 693 ETHTOOL_A_MODULE_EEPROM_UNSPEC, 694 ETHTOOL_A_MODULE_EEPROM_HEADER, /* nest - _A_HEADER_* */ 695 696 ETHTOOL_A_MODULE_EEPROM_OFFSET, /* u32 */ 697 ETHTOOL_A_MODULE_EEPROM_LENGTH, /* u32 */ 698 ETHTOOL_A_MODULE_EEPROM_PAGE, /* u8 */ 699 ETHTOOL_A_MODULE_EEPROM_BANK, /* u8 */ 700 ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS, /* u8 */ 701 ETHTOOL_A_MODULE_EEPROM_DATA, /* binary */ 702 703 __ETHTOOL_A_MODULE_EEPROM_CNT, 704 ETHTOOL_A_MODULE_EEPROM_MAX = (__ETHTOOL_A_MODULE_EEPROM_CNT - 1) 705 }; 706 707 /* STATS */ 708 709 enum { 710 ETHTOOL_A_STATS_UNSPEC, 711 ETHTOOL_A_STATS_PAD, 712 ETHTOOL_A_STATS_HEADER, /* nest - _A_HEADER_* */ 713 ETHTOOL_A_STATS_GROUPS, /* bitset */ 714 715 ETHTOOL_A_STATS_GRP, /* nest - _A_STATS_GRP_* */ 716 717 /* add new constants above here */ 718 __ETHTOOL_A_STATS_CNT, 719 ETHTOOL_A_STATS_MAX = (__ETHTOOL_A_STATS_CNT - 1) 720 }; 721 722 enum { 723 ETHTOOL_STATS_ETH_PHY, 724 ETHTOOL_STATS_ETH_MAC, 725 ETHTOOL_STATS_ETH_CTRL, 726 ETHTOOL_STATS_RMON, 727 728 /* add new constants above here */ 729 __ETHTOOL_STATS_CNT 730 }; 731 732 enum { 733 ETHTOOL_A_STATS_GRP_UNSPEC, 734 ETHTOOL_A_STATS_GRP_PAD, 735 736 ETHTOOL_A_STATS_GRP_ID, /* u32 */ 737 ETHTOOL_A_STATS_GRP_SS_ID, /* u32 */ 738 739 ETHTOOL_A_STATS_GRP_STAT, /* nest */ 740 741 ETHTOOL_A_STATS_GRP_HIST_RX, /* nest */ 742 ETHTOOL_A_STATS_GRP_HIST_TX, /* nest */ 743 744 ETHTOOL_A_STATS_GRP_HIST_BKT_LOW, /* u32 */ 745 ETHTOOL_A_STATS_GRP_HIST_BKT_HI, /* u32 */ 746 ETHTOOL_A_STATS_GRP_HIST_VAL, /* u64 */ 747 748 /* add new constants above here */ 749 __ETHTOOL_A_STATS_GRP_CNT, 750 ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1) 751 }; 752 753 enum { 754 /* 30.3.2.1.5 aSymbolErrorDuringCarrier */ 755 ETHTOOL_A_STATS_ETH_PHY_5_SYM_ERR, 756 757 /* add new constants above here */ 758 __ETHTOOL_A_STATS_ETH_PHY_CNT, 759 ETHTOOL_A_STATS_ETH_PHY_MAX = (__ETHTOOL_A_STATS_ETH_PHY_CNT - 1) 760 }; 761 762 enum { 763 /* 30.3.1.1.2 aFramesTransmittedOK */ 764 ETHTOOL_A_STATS_ETH_MAC_2_TX_PKT, 765 /* 30.3.1.1.3 aSingleCollisionFrames */ 766 ETHTOOL_A_STATS_ETH_MAC_3_SINGLE_COL, 767 /* 30.3.1.1.4 aMultipleCollisionFrames */ 768 ETHTOOL_A_STATS_ETH_MAC_4_MULTI_COL, 769 /* 30.3.1.1.5 aFramesReceivedOK */ 770 ETHTOOL_A_STATS_ETH_MAC_5_RX_PKT, 771 /* 30.3.1.1.6 aFrameCheckSequenceErrors */ 772 ETHTOOL_A_STATS_ETH_MAC_6_FCS_ERR, 773 /* 30.3.1.1.7 aAlignmentErrors */ 774 ETHTOOL_A_STATS_ETH_MAC_7_ALIGN_ERR, 775 /* 30.3.1.1.8 aOctetsTransmittedOK */ 776 ETHTOOL_A_STATS_ETH_MAC_8_TX_BYTES, 777 /* 30.3.1.1.9 aFramesWithDeferredXmissions */ 778 ETHTOOL_A_STATS_ETH_MAC_9_TX_DEFER, 779 /* 30.3.1.1.10 aLateCollisions */ 780 ETHTOOL_A_STATS_ETH_MAC_10_LATE_COL, 781 /* 30.3.1.1.11 aFramesAbortedDueToXSColls */ 782 ETHTOOL_A_STATS_ETH_MAC_11_XS_COL, 783 /* 30.3.1.1.12 aFramesLostDueToIntMACXmitError */ 784 ETHTOOL_A_STATS_ETH_MAC_12_TX_INT_ERR, 785 /* 30.3.1.1.13 aCarrierSenseErrors */ 786 ETHTOOL_A_STATS_ETH_MAC_13_CS_ERR, 787 /* 30.3.1.1.14 aOctetsReceivedOK */ 788 ETHTOOL_A_STATS_ETH_MAC_14_RX_BYTES, 789 /* 30.3.1.1.15 aFramesLostDueToIntMACRcvError */ 790 ETHTOOL_A_STATS_ETH_MAC_15_RX_INT_ERR, 791 792 /* 30.3.1.1.18 aMulticastFramesXmittedOK */ 793 ETHTOOL_A_STATS_ETH_MAC_18_TX_MCAST, 794 /* 30.3.1.1.19 aBroadcastFramesXmittedOK */ 795 ETHTOOL_A_STATS_ETH_MAC_19_TX_BCAST, 796 /* 30.3.1.1.20 aFramesWithExcessiveDeferral */ 797 ETHTOOL_A_STATS_ETH_MAC_20_XS_DEFER, 798 /* 30.3.1.1.21 aMulticastFramesReceivedOK */ 799 ETHTOOL_A_STATS_ETH_MAC_21_RX_MCAST, 800 /* 30.3.1.1.22 aBroadcastFramesReceivedOK */ 801 ETHTOOL_A_STATS_ETH_MAC_22_RX_BCAST, 802 /* 30.3.1.1.23 aInRangeLengthErrors */ 803 ETHTOOL_A_STATS_ETH_MAC_23_IR_LEN_ERR, 804 /* 30.3.1.1.24 aOutOfRangeLengthField */ 805 ETHTOOL_A_STATS_ETH_MAC_24_OOR_LEN, 806 /* 30.3.1.1.25 aFrameTooLongErrors */ 807 ETHTOOL_A_STATS_ETH_MAC_25_TOO_LONG_ERR, 808 809 /* add new constants above here */ 810 __ETHTOOL_A_STATS_ETH_MAC_CNT, 811 ETHTOOL_A_STATS_ETH_MAC_MAX = (__ETHTOOL_A_STATS_ETH_MAC_CNT - 1) 812 }; 813 814 enum { 815 /* 30.3.3.3 aMACControlFramesTransmitted */ 816 ETHTOOL_A_STATS_ETH_CTRL_3_TX, 817 /* 30.3.3.4 aMACControlFramesReceived */ 818 ETHTOOL_A_STATS_ETH_CTRL_4_RX, 819 /* 30.3.3.5 aUnsupportedOpcodesReceived */ 820 ETHTOOL_A_STATS_ETH_CTRL_5_RX_UNSUP, 821 822 /* add new constants above here */ 823 __ETHTOOL_A_STATS_ETH_CTRL_CNT, 824 ETHTOOL_A_STATS_ETH_CTRL_MAX = (__ETHTOOL_A_STATS_ETH_CTRL_CNT - 1) 825 }; 826 827 enum { 828 /* etherStatsUndersizePkts */ 829 ETHTOOL_A_STATS_RMON_UNDERSIZE, 830 /* etherStatsOversizePkts */ 831 ETHTOOL_A_STATS_RMON_OVERSIZE, 832 /* etherStatsFragments */ 833 ETHTOOL_A_STATS_RMON_FRAG, 834 /* etherStatsJabbers */ 835 ETHTOOL_A_STATS_RMON_JABBER, 836 837 /* add new constants above here */ 838 __ETHTOOL_A_STATS_RMON_CNT, 839 ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1) 840 }; 841 842 /* MODULE */ 843 844 enum { 845 ETHTOOL_A_MODULE_UNSPEC, 846 ETHTOOL_A_MODULE_HEADER, /* nest - _A_HEADER_* */ 847 ETHTOOL_A_MODULE_POWER_MODE_POLICY, /* u8 */ 848 ETHTOOL_A_MODULE_POWER_MODE, /* u8 */ 849 850 /* add new constants above here */ 851 __ETHTOOL_A_MODULE_CNT, 852 ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1) 853 }; 854 855 /* generic netlink info */ 856 #define ETHTOOL_GENL_NAME "ethtool" 857 #define ETHTOOL_GENL_VERSION 1 858 859 #define ETHTOOL_MCGRP_MONITOR_NAME "monitor" 860 861 #endif /* _UAPI_LINUX_ETHTOOL_NETLINK_H_ */ 862