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