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