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