                        Netlink interface for ethtool
                        =============================


Basic information
-----------------

Netlink interface for ethtool uses generic netlink family "ethtool" (userspace
application should use macros ETHTOOL_GENL_NAME and ETHTOOL_GENL_VERSION
defined in <linux/ethtool_netlink.h> uapi header). This family does not use
a specific header, all information in requests and replies is passed using
netlink attributes.

In requests, device can be identified by ifindex or by name; if both are used,
they must match. In replies, kernel fills both. The meaning of flags,
info_mask and index fields depends on request type.

The ethtool netlink interface uses extended ACK for error and warning
reporting, userspace application developers are encouraged to make these
messages available to user in a suitable way.

Requests can be divided into three categories: "get" (retrieving information),
"set" (setting parameters) and "action" (invoking an action).

All "set" and "action" type requests require admin privileges (CAP_NET_ADMIN
in the namespace). Most "get" type request are allowed for anyone but there
are exceptions (where the response contains sensitive information). In some
cases, the request as such is allowed for anyone but unprivileged users have
attributes with sensitive information (e.g. wake-on-lan password) omitted.


Conventions
-----------

Attributes which represent a boolean value usually use u8 type so that we can
distinguish three states: "on", "off" and "not present" (meaning the
information is not available in "get" requests or value is not to be changed
in "set" requests). For these attributes, the "true" value should be passed as
number 1 but any non-zero value should be understood as "true" by recipient.

Some request types allow passing an attribute named ETHA_*_INFOMASK with
a bitmask telling kernel that we are only interested in some parts of the
information. If info mask is omitted, all available information is returned.
Meaning of info mask bits depends on request type and is listed below.


Device identification
---------------------

When appropriate, network device is identified by a nested attribute named
ETHA_*_DEV. This attribute can contain

    ETHA_DEV_INDEX	(u32)		device ifindex
    ETHA_DEV_NAME	(string)	device name

In device related requests, one of these is sufficient; if both are used, they
must match (i.e. identify the same device). In device related replies both are
provided by kernel. In dump requests, device is not specified and kernel
replies with one message per network device (only those for which the request
is supported).

Bit sets
--------

For short bitmaps of (reasonably) fixed length, standard NLA_BITFIELD32 type
is used. For arbitrary length bitmaps, ethtool netlink uses a nested attribute
with contents of one of two forms: compact (two binary bitmaps representing
bit values and mask of affected bits) and bit-by-bit (list of bits identified
by either index or name).

Compact form: nested (bitset) atrribute contents:

    ETHA_BITSET_SIZE	(u32)		number of significant bits
    ETHA_BITSET_VALUE	(binary)	bitmap of bit values
    ETHA_BITSET_MASK	(binary)	bitmap of valid bits

Value and mask must have length at least ETHA_BITSET_SIZE bits rounded up to
a multiple of 32 bits. They consist of 32-bit words in host byt order, words
ordered from least significant to most significant (i.e. the same way as
bitmaps are passed with ioctl interface).

For compact form, ETHA_BITSET_SIZE and ETHA_BITSET_VALUE are mandatory.
Similar to BITFIELD32, a compact form bit set requests to set bits in the mask
to 1 (if set in value) or 0 (if not) and preserve the rest. If the mask is
omitted, it is supposed to be "all ones", i.e. set all bits according to
value.

Kernel bit set length may differ from userspace length if older application is
used on newer kernel or vice versa. If userspace bitmaps are longer, error is
only issued if request actually tries to set bits not implemented in kernel.

Bit-by-bit form: nested (bitset) attribute contents:

    ETHA_BITSET_SIZE	(u32)		number of significant bits (optional)
    ETHA_BITSET_BITS	(nested)	array of bits
	ETHA_BITSET_BIT
	    ETHA_BIT_INDEX	(u32)		bit index (0 for LSB)
            ETHA_BIT_NAME	(string)	bit name
	    ETHA_BIT_VALUE	(flag)		present if bit is set
        ETHA_BITSET_BIT
	...

Bit size is optional for bit-by-bit form. ETHA_BITSET_BITS nest can only
contain ETHA_BITS_BIT attributes but there can be an arbitrary number of them.
A bit may be identified by its index or by its name. When used in requests,
listed bits are set to 0 or 1 according to ETHA_BIT_VALUE, the rest is
preserved. A request fails if index exceeds kernel bit length or if name is
not recognized.

In requests, application can use either form. Form used by kernel in reply is
determined by a flag in flags field of request header. Semantics of value and
mask depends on the attribute. General idea is that flags control request
processing, info_mask control which parts of the information are returned in
"get" request and index identifies a particular subcommand or an object to
which the request applies.


List of message types
---------------------

    ETHNL_CMD_EVENT			notification only
    ETHNL_CMD_GET_STRSET
    ETHNL_CMD_SET_STRSET		response only
    ETHNL_CMD_GET_INFO
    ETHNL_CMD_SET_INFO			response only
    ETHNL_CMD_GET_SETTINGS
    ETHNL_CMD_SET_SETTINGS
    ETHNL_CMD_GET_PARAMS
    ETHNL_CMD_SET_PARAMS
    ETHNL_CMD_ACT_NWAY_RST

All constants use ETHNL_CMD_ prefix, usually followed by "GET", "SET" or "ACT"
to indicate the type.

Messages of type "get" are used by userspace to request information and
usually do not contain any attributes (that may be added later for dump
filtering). Kernel response is in the form of corresponding "set" message;
the same message can be also used to set (some of) the parameters, except for
messages marked as "response only" in the table above. "Get" messages with
NLM_F_DUMP flags and no device identification dump the information for all
devices supporting the request.

Type ETHNL_CMD_EVENT is special, these messages are never used in userspace
requests or kernel replies. They are only sent by kernel to sockets listening
to "monitor" multicast group to inform userspace about certain events.

Later sections describe the format and semantics of these request messages.


EVENT
-----

EVENT messages are only used in kernel multicast notifications. Atributes
correspond to specific event types, the same type can appear multiple times.

    ETHA_EVENT_NEWDEV		(nested)	new device was registered
       ETHA_NEWDEV_DEV			(nested)	new device
    ETHA_EVENT_DELDEV		(nested)	device was unregistered
       ETHA_DELDEV_DEV			(nested)	removed device

Userspace application must expect multiple events to be present in one message
and also multiple events of the same type (e.g. two or more newly registered
devices).


GET_INFO
--------

GET_INFO requests information provided by ioctl commands ETHTOOL_GDRVINFO,
ETHTOOL_GPERMADDR and ETHTOOL_GET_TS_INFO to provide basic device information.
Common pattern is that all information is read only so that SET_INFO message
exists but is only used by kernel for replies to GET_INFO requests. There is
also no corresponding notification.

Request contents:

    ETHA_INFO_DEV		(nested)	device identification
    ETHA_INFO_INFOMASK		(u32)		info mask
    ETHA_INFO_COMPACT		(flag)		request compact bitsets

Info mask bits meaning:

    ETH_INFO_IM_DRVINFO			driver info (GDRVINFO)
    ETH_INFO_IM_PERMADDR		permanent HW address (GPERMADDR)
    ETH_INFO_IM_TSINFO			timestamping info (GET_TS_INFO)

Kernel response contents:

    ETHA_INFO_DEV		(nested)	device identification
    ETHA_INFO_DRVINFO		(nested)	driver information
        ETHA_DRVINFO_DRIVER		(string)	driver name
        ETHA_DRVINFO_FWVERSION		(string)	firmware version
        ETHA_DRVINFO_BUSINFO		(string)	device bus address
        ETHA_DRVINFO_EROM_VER		(string)	expansion ROM version
    ETHA_INFO_PERMADDR		(nested)
        ETHA_PERMADDR_ADDRESS		(binary)	permanent HW address
        ETHA_PERMADDR_TYPE		(u16)		dev->type
    ETHA_INFO_TSINFO		(nested)	timestamping information
        ETHA_TSINFO_TIMESTAMPING	(bitset)	supported flags
        ETHA_TSINFO_PHC_INDEX		(u32)		associated PHC
        ETHA_TSINFO_TX_TYPES		(bitset)	Tx types
        ETHA_TSINFO_RX_FILTERS		(bitset)	Rx filters

The meaning of DRVINFO attributes follows the corresponding fields of
ETHTOOL_GDRVINFO response. Second part with various counts and sizes is
omitted as these are not really needed (and if they are, they can be easily
found by different means). Driver version is also omitted as it is rather
misleading in most cases.

There is no separate attribute for permanent address length as the length can
be determined from attribute length (nla_len()). ETHA_PERMADDR_TYPE provides
net_device::type value to give a hint about what kind of address device has.
ETHA_TSINFO_PHC_INDEX can be unsigned as there is no need for special value;
if no PHC is associated, the attribute is not present.

GET_INFO requests allow dumps.


GET_SETTINGS
------------

GET_SETTINGS request retrieves information provided by ETHTOOL_GLINKSETTINGS,
ETHTOOL_GWOL, ETHTOOL_GMSGLVL and ETHTOOL_GLINK ioctl requests. The request
doesn't use any attributes.

Request attributes:

    ETHA_SETTINGS_DEV		(nested)	device identification
    ETHA_SETTINGS_INFOMASK	(u32)		info mask
    ETHA_SETTINGS_COMPACT	(flag)		request compact bitsets

Info mask bits meaning:

    ETH_SETTINGS_IM_LINKINFO		link_ksettings except link modes
    ETH_SETTINGS_IM_LINKMODES		link modes from link_ksettings
    ETH_SETTINGS_IM_MSGLEVEL		msglevel
    ETH_SETTINGS_IM_WOLINFO		struct ethtool_wolinfo
    ETH_SETTINGS_IM_LINK		link state
    ETH_SETTINGS_IM_FEATURES		features
    ETH_SETTINGS_IM_PRIVFLAGS		device private flags

Response contents:

    ETHA_SETTINGS_DEV		(nested)	device identification
    ETHA_SETTINGS_SPEED		(u32)		link speed (Mb/s)
    ETHA_SETTINGS_DUPLEX	(u8)		duplex mode
    ETHA_SETTINGS_PORT		(u8)		physical port
    ETHA_SETTINGS_PHYADDR	(u8)		MDIO address of phy
    ETHA_SETTINGS_AUTONEG	(u8)		autoneotiation status
    ETHA_SETTINGS_TP_MDIX	(u8)		MDI(-X) status
    ETHA_SETTINGS_TP_MDIX_CTRL	(u8)		MDI(-X) control
    ETHA_SETTINGS_TRANSCEIVER	(u8)		transceiver
    ETHA_SETTINGS_WOL_MODES	(bitfield32)	wake-on-lan modes
    ETHA_SETTINGS_SOPASS	(binary)	SecureOn(tm) password
    ETHA_SETTINGS_MSGLVL	(bitfield32)	debug level
    ETHA_SETTINGS_LINK_MODES	(bitset)	device link modes
    ETHA_SETTINGS_PEER_MODES	(bitset)	link partner link modes
    ETHA_SETTINGS_LINK		(u8)		link state
    ETHA_SETTINGS_FEATURES	(nested)	device features
        ETHA_FEATURES_HW		(bitset)	dev->hw_features
        ETHA_FEATURES_WANTED		(bitset)	dev->wanted_features
        ETHA_FEATURES_ACTIVE		(bitset)	dev->features
        ETHA_FEATURES_NOCHANGE		(bitset)	NETIF_F_NEVER_CHANGE
    ETHA_SETTINGS_PRIV_FLAGS	(bitset)	device private flags

Most of the attributes have the same meaning (including values) as
corresponding members of ioctl structures. For ETHA_SETTINGS_MSGLVL, selector
reports flags supported by kernel. For ETHA_SETTINGS_WOL_MODES it reports
flags supported by the device. For ETHA_SETTINGS_LINK_MODES, value represent
advertised modes and mask represents supported modes. For
ETHA_SETTINGS_PEER_MODES, both value and mask represent partner advertised
link modes.

Bitmaps contained in ETHA_SETTINGS_FEATURES have the same meaning as bitmaps
used in ioctl interference but attribute names are different (they are based
on corresponding members of struct net_device). Legacy "flags" are not
provided, if userspace needs them (most likely only ethtool for backward
compatibility), it can calculate their values from related feature bits
itself. ETHA_FEATURES_HW uses mask consisting of all features recognized by
kernel (to provide all names when using verbose bitmap format), remaining
three use mask equal to value (to save space).

ETHA_SETTINGS_PRIV_FLAGS is a bitset with values of device private flags.
These flags are defined by driver, their number and names (as well as meaning)
are device dependent. For compact bitset format, names can be retrieved as
ETH_SS_PRIV_FLAGS string set.

GET_SETTINGS request is allowed for unprivileged user but ETHA_SETTINGS_SOPASS
is only provided by kernel in response to privileged (netns CAP_NET_ADMIN)
requests.

GET_SETTINGS requests allow dumps and messages in the same format as response
to them are broadcasted as notifications on change of these settings using
netlink or ioctl ethtool interface; feature notifications are also sent
whenever netdev_update_features() or netdev_change_features() is called.


SET_SETTINGS
------------

SET_SETTINGS request allows setting some of the data reported by GET_SETTINGS.
Request flags, info_mask and index are ignored. These attributes are allowed
to be passed with SET_SETTINGS request:

    ETHA_SETTINGS_DEV		(nested)	device identification
    ETHA_SETTINGS_SPEED         (u32)           link speed (Mb/s)
    ETHA_SETTINGS_DUPLEX        (u8)            duplex mode
    ETHA_SETTINGS_PORT          (u8)            physical port
    ETHA_SETTINGS_PHYADDR       (u8)            MDIO address of phy
    ETHA_SETTINGS_AUTONEG       (u8)            autoneotiation status
    ETHA_SETTINGS_TP_MDIX_CTRL  (u8)            MDI(-X) control
    ETHA_SETTINGS_WOL_MODES     (bitfield32)    wake-on-lan modes
    ETHA_SETTINGS_SOPASS        (binary)        SecureOn(tm) password
    ETHA_SETTINGS_MSGLVL        (bitfield32)    debug level
    ETHA_SETTINGS_LINK_MODES    (bitset)        device link modes
    ETHA_SETTINGS_FEATURES	(nested)	device features
        ETHA_FEATURES_WANTED		(bitset)	wanted features
        ETHA_FEATURES_WANT_DIFF		(flag)		actual diff
    ETHA_SETTINGS_PRIV_FLAGS	(bitset)	device private flags

For both bitfield32 types, value and selector work the usual way, i.e. bits
set in selector are set to corresponding bits from value and the rest is
preserved. In a similar fashion, ETHA_SETTINGS_LINK_MODES allows setting
advertised link modes.

If autonegotiation is on (either set now or kept from before), advertised
modes are not changed (no ETHA_SETTINGS_LINK_MODES attribute) and at least one
of speed and duplex is specified, kernel adjusts advertised modes to all
supported modes matching speed, duplex or both (whatever is specified). This
autoselection is done on ethtool side with ioctl interface, netlink interface
is supposed to allow requesting changes without knowing what exactly kernel
supports.

When changing device features, only ETHA_FEATURES_WANTED is passed. As usual,
mask defines which bits are to be set and value their values. If the request
has ETHA_FEATURES_WANT_DIFF flag set, reply will contain a message in the same
format as response to GET request, except only two bitsets are provided.
ETHA_FEATURES_WANTED shows difference between requested features and actual
result (dev->features after the operation); mask shows bits which differ and
value their values from the original request (new values are negated). Value
shows changes between old dev->features (before the operation) and new (after
the operation); mask shows bits which have been changed and value their new
values.


GET_PARAMS
----------

GET_PARAMS request retrieves information provided by legacy comands
ETHTOOL_GCOALESCE (coalescing setting), ETHTOOL_GRINGPARAM (ring parameters),
ETHTOOL_GPAUSEPARAM (pause parameters), ETHTOOL_GCHANNELS (channel settings),
ETHTOOL_GEEE (EEE settings) and ETHTOOL_GFECPARAM (FEC parameters). For each
of these, there is a bit in header info_mask so that only one type of
information can be requested.

Request contents:

    ETHA_PARAMS_DEV		(nested)	device identification
    ETHA_PARAMS_INFOMASK	(u32)		info mask
    ETHA_PARAMS_COMPACT		(flag)		request compact bitsets

Info mask bits:

    ETH_PARAMS_IM_COALESCE		coalescing settings
    ETH_PARAMS_IM_RING			ring parameters
    ETH_PARAMS_IM_PAUSE			pause parameters
    ETH_PARAMS_IM_CHANNELS		channel settings
    ETH_PARAMS_IM_EEE			EEE settings
    ETH_PARAMS_IM_FEC			FEC parameters

Response contents: On top level, there is one attribute for each of the
information categories, the information is nested in it.

    ETHA_PARAMS_DEV		(nested)	device identification
    ETHA_PARAMS_COALESCE	(nested)	coalescing
        ETHA_COALESCE_RX_USECS			(u32)
        ETHA_COALESCE_RX_MAXFRM			(u32)
        ETHA_COALESCE_RX_USECS_IRQ		(u32)
        ETHA_COALESCE_RX_MAXFRM_IRQ		(u32)
        ETHA_COALESCE_RX_USECS_LOW		(u32)
        ETHA_COALESCE_RX_MAXFRM_LOW		(u32)
        ETHA_COALESCE_RX_USECS_HIGH		(u32)
        ETHA_COALESCE_RX_MAXFRM_HIGH		(u32)
        ETHA_COALESCE_TX_USECS			(u32)
        ETHA_COALESCE_TX_MAXFRM			(u32)
        ETHA_COALESCE_TX_USECS_IRQ		(u32)
        ETHA_COALESCE_TX_MAXFRM_IRQ		(u32)
        ETHA_COALESCE_TX_USECS_LOW		(u32)
        ETHA_COALESCE_TX_MAXFRM_LOW		(u32)
        ETHA_COALESCE_TX_USECS_HIGH		(u32)
        ETHA_COALESCE_TX_MAXFRM_HIGH		(u32)
        ETHA_COALESCE_PKT_RATE_LOW		(u32)
        ETHA_COALESCE_PKT_RATE_HIGH		(u32)
        ETHA_COALESCE_RX_USE_ADAPTIVE		(bool)
        ETHA_COALESCE_TX_USE_ADAPTIVE		(bool)
        ETHA_COALESCE_RATE_SAMPLE_INTERVAL	(u32)
        ETHA_COALESCE_STATS_BLOCK_USECS		(u32)
    ETHA_PARAMS_RING		(nested)	ring parameters
        ETHA_RING_RX_MAX_PENDING		(u32)
        ETHA_RING_RX_MINI_MAX_PENDING		(u32)
        ETHA_RING_RX_JUMBO_MAX_PENDING		(u32)
        ETHA_RING_TX_MAX_PENDING		(u32)
        ETHA_RING_RX_PENDING			(u32)
        ETHA_RING_RX_MINI_PENDING		(u32)
        ETHA_RING_RX_JUMBO_PENDING		(u32)
        ETHA_RING_TX_PENDING			(u32)
    ETHA_PARAMS_PAUSE		(nested)	pause parameters
        ETHA_PAUSE_AUTONEG			(bool)
        ETHA_PAUSE_RX				(bool)
        ETHA_PAUSE_TX				(bool)
    ETHA_PARAMS_CHANNELS	(nested)	channel settings
        ETHA_CHANNELS_MAX_RX			(u32)
        ETHA_CHANNELS_MAX_TX			(u32)
        ETHA_CHANNELS_MAX_OTHER			(u32)
        ETHA_CHANNELS_MAX_COMBINED		(u32)
        ETHA_CHANNELS_RX_COUNT			(u32)
        ETHA_CHANNELS_TX_COUNT			(u32)
        ETHA_CHANNELS_OTHER_COUNT		(u32)
        ETHA_CHANNELS_COMBINED_COUNT		(u32)
    ETHA_PARAMS_EEE		(nested)	EEE settings
        ETHA_EEE_LINK_MODES			(bitset)
		- modes for which EEE is advertised (value) or supported (mask)
        ETHA_EEE_PEER_MODES			(bitset)
		- modes for which link partner advertises EEE
        ETHA_EEE_ACTIVE				(bool)
        ETHA_EEE_ENABLED			(bool)
        ETHA_EEE_TX_LPI_ENABLED			(bool)
        ETHA_EEE_TX_LPI_TIMER			(u32)
    ETHA_PARAMS_FEC		(nested)	FEC parameters
        ETHA_FEC_MODES				(bitfield32)
		- active (value) and configured (selector) FEC encodings

GET_PARAMS requests allow dumps and messages in the same format as response
to them are broadcasted as notifications on change of these settings using
netlink or ioctl ethtool interface.


SET_PARAMS
----------

SET_PARAMS request modifies the settings retrieved by GET_PARAMS, i.e. it
replaces ETHTOOL_SCOALESCE, ETHTOOL_SRINGPARAM, ETHTOOL_SPAUSEPARAM,
ETHTOOL_SCHANNELS, ETHTOOL_SEEE and ETHTOOL_SFECPARAM legacy commands. For
each of these, relevant data attributes are contained in a corresponding nest
attribute. Some of the attributes provided by GET_SETPARAMS are read only and
cannot be set by SET_PARAMS request.

    ETHA_PARAMS_COALESCE	(nested)	coalescing
        ETHA_COALESCE_RX_USECS			(u32)
        ETHA_COALESCE_RX_MAXFRM			(u32)
        ETHA_COALESCE_RX_USECS_IRQ		(u32)
        ETHA_COALESCE_RX_MAXFRM_IRQ		(u32)
        ETHA_COALESCE_RX_USECS_LOW		(u32)
        ETHA_COALESCE_RX_MAXFRM_LOW		(u32)
        ETHA_COALESCE_RX_USECS_HIGH		(u32)
        ETHA_COALESCE_RX_MAXFRM_HIGH		(u32)
        ETHA_COALESCE_TX_USECS			(u32)
        ETHA_COALESCE_TX_MAXFRM			(u32)
        ETHA_COALESCE_TX_USECS_IRQ		(u32)
        ETHA_COALESCE_TX_MAXFRM_IRQ		(u32)
        ETHA_COALESCE_TX_USECS_LOW		(u32)
        ETHA_COALESCE_TX_MAXFRM_LOW		(u32)
        ETHA_COALESCE_TX_USECS_HIGH		(u32)
        ETHA_COALESCE_TX_MAXFRM_HIGH		(u32)
        ETHA_COALESCE_PKT_RATE_LOW		(u32)
        ETHA_COALESCE_PKT_RATE_HIGH		(u32)
        ETHA_COALESCE_RX_USE_ADAPTIVE		(bool)
        ETHA_COALESCE_TX_USE_ADAPTIVE		(bool)
        ETHA_COALESCE_RATE_SAMPLE_INTERVAL	(u32)
        ETHA_COALESCE_STATS_BLOCK_USECS		(u32)
    ETHA_PARAMS_RING		(nested)	ring parameters
        ETHA_RING_RX_PENDING			(u32)
        ETHA_RING_RX_MINI_PENDING		(u32)
        ETHA_RING_RX_JUMBO_PENDING		(u32)
        ETHA_RING_TX_PENDING			(u32)
    ETHA_PARAMS_PAUSE		(nested)	pause parameters
        ETHA_PAUSE_AUTONEG			(bool)
        ETHA_PAUSE_RX				(bool)
        ETHA_PAUSE_TX				(bool)
    ETHA_PARAMS_CHANNELS	(nested)	channel settings
        ETHA_CHANNELS_RX_COUNT			(u32)
        ETHA_CHANNELS_TX_COUNT			(u32)
        ETHA_CHANNELS_OTHER_COUNT		(u32)
        ETHA_CHANNELS_COMBINED_COUNT		(u32)
    ETHA_PARAMS_EEE		(nested)	EEE settings
        ETHA_EEE_LINK_MODES			(bitset)
		- change modes for which EEE is advertised
        ETHA_EEE_ENABLED			(bool)
        ETHA_EEE_TX_LPI_ENABLED			(bool)
        ETHA_EEE_TX_LPI_TIMER			(u32)
    ETHA_PARAMS_FEC		(nested)	FEC parameters
        ETHA_FEC_MODES				(bitfield32)
		- change configured FEC encodings


ACT_NWAY_RST
------------

Request autonegotiation restart (equivalent of ETHTOOL_NWAY_RST).

Request contents:

    ETHA_NWAYRST_DEV		(nested)	device identification

If successful, a notification in the same format is sent.


ACT_PHYS_ID
-----------

Physical identification of a NIC (usually by blinking a LED. Equivalent of
ETHTOOL_PHYS_ID.

Request contents:

    ETHA_PHYSID_DEV		(nested)	device identification
    ETHA_PHYSID_LENGTH		(u32)		length in seconds

If length is omitted, maximum length is used. Processing is synchronous, there
is no reply until requested time expires (returns zero) or processing is
interrupted by a signal (returns EINTR). Two notifications are sent: one when
identification starts (with length actually used) and one when it stops (with
length of zero).

Processing of this message is exclusive. While identification is running, all
other ACT_PHYS_ID requests for any device fail with EBUSY. The same holds for
requests using ETHTOOL_PHYS_ID ioctl command.


ACT_RESET
---------

Reset whole device or selected components (equivalent of ETHTOOL_RESET).

Request contents:

    ETHA_RESET_DEV		(nested)	device identification
    ETHA_RESET_COMPACT		(flag)		request compact bitmaps
    ETHA_RESET_ALL		(flag)		reset all compontents
    ETHA_RESET_ALL_DEDICATED	(flag)		reset all dedicated components
    ETHA_RESET_DEDICATED	(bitset)	dedicated components to reset
    ETHA_RESET_SHARED		(bitset)	shared components to reset

Masks for both bitsets are ignored. When ETHA_RESET_ALL_DEDICATED flag is
present, it overrides ETHA_RESET_DEDICATED. When ETHA_RESET_ALL flag is
present, it overrides both ETHA_RESET_DEDICATED and ETHA_RESET_SHARED.

Ifi the request is successful, a message in the same format is returned,
indicating which components _were_ actually reset (this is different from
ioctl interface). The same message is also broadcasted as a notification.


Request translation
-------------------

The following table maps iosctl commands to netlink commands providing their
functionality. Entries with "n/a" in right column are commands which do not
have their netlink replacement yet.

ioctl command			netlink command
---------------------------------------------------------------------
ETHTOOL_GSET			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SSET			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GDRVINFO		ETHNL_CMD_GET_INFO
ETHTOOL_GREGS			n/a
ETHTOOL_GWOL			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SWOL			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GMSGLVL			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SMSGLVL			ETHNL_CMD_SET_SETTINGS
ETHTOOL_NWAY_RST		ETHNL_CMD_ACT_NWAY_RST
ETHTOOL_GLINK			ETHNL_CMD_GET_SETTINGS
ETHTOOL_GEEPROM			n/a
ETHTOOL_SEEPROM			n/a
ETHTOOL_GCOALESCE		ETHNL_CMD_GET_PARAMS
ETHTOOL_SCOALESCE		ETHNL_CMD_SET_PARAMS
ETHTOOL_GRINGPARAM		ETHNL_CMD_GET_PARAMS
ETHTOOL_SRINGPARAM		ETHNL_CMD_SET_PARAMS
ETHTOOL_GPAUSEPARAM		ETHNL_CMD_GET_PARAMS
ETHTOOL_SPAUSEPARAM		ETHNL_CMD_SET_PARAMS
ETHTOOL_GRXCSUM			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SRXCSUM			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GTXCSUM			ETHNL_CMD_GET_SETTINGS
ETHTOOL_STXCSUM			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GSG			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SSG			ETHNL_CMD_SET_SETTINGS
ETHTOOL_TEST			n/a
ETHTOOL_GSTRINGS		ETHNL_CMD_GET_STRSET
ETHTOOL_PHYS_ID			ETHNL_CMD_ACT_PHYS_ID
ETHTOOL_GSTATS			n/a
ETHTOOL_GTSO			ETHNL_CMD_GET_SETTINGS
ETHTOOL_STSO			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GPERMADDR		ETHNL_CMD_GET_INFO
ETHTOOL_GUFO			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SUFO			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GGSO			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SGSO			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GFLAGS			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SFLAGS			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GPFLAGS			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SPFLAGS			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GRXFH			n/a
ETHTOOL_SRXFH			n/a
ETHTOOL_GGRO			ETHNL_CMD_GET_SETTINGS
ETHTOOL_SGRO			ETHNL_CMD_SET_SETTINGS
ETHTOOL_GRXRINGS		ETHNL_CMD_GET_RXFLOW
ETHTOOL_GRXCLSRLCNT		n/a
ETHTOOL_GRXCLSRULE		n/a
ETHTOOL_GRXCLSRLALL		n/a
ETHTOOL_SRXCLSRLDEL		n/a
ETHTOOL_SRXCLSRLINS		n/a
ETHTOOL_FLASHDEV		n/a
ETHTOOL_RESET			ETHNL_CMD_ACT_RESET
ETHTOOL_SRXNTUPLE		n/a
ETHTOOL_GRXNTUPLE		n/a
ETHTOOL_GSSET_INFO		ETHNL_CMD_GET_STRSET
ETHTOOL_GRXFHINDIR		ETHNL_CMD_GET_RXFLOW
ETHTOOL_SRXFHINDIR		ETHNL_CMD_SET_RXFLOW
ETHTOOL_GFEATURES		ETHNL_CMD_GET_SETTINGS
ETHTOOL_SFEATURES		ETHNL_CMD_SET_SETTINGS
ETHTOOL_GCHANNELS		ETHNL_CMD_GET_PARAMS
ETHTOOL_SCHANNELS		ETHNL_CMD_SET_PARAMS
ETHTOOL_SET_DUMP		n/a
ETHTOOL_GET_DUMP_FLAG		n/a
ETHTOOL_GET_DUMP_DATA		n/a
ETHTOOL_GET_TS_INFO		ETHNL_CMD_GET_INFO
ETHTOOL_GMODULEINFO		n/a
ETHTOOL_GMODULEEEPROM		n/a
ETHTOOL_GEEE			ETHNL_CMD_GET_PARAMS
ETHTOOL_SEEE			ETHNL_CMD_SET_PARAMS
ETHTOOL_GRSSH			ETHNL_CMD_GET_RXFLOW
ETHTOOL_SRSSH			ETHNL_CMD_SET_RXFLOW
ETHTOOL_GTUNABLE		n/a
ETHTOOL_STUNABLE		n/a
ETHTOOL_GPHYSTATS		n/a
ETHTOOL_PERQUEUE		n/a
ETHTOOL_GLINKSETTINGS		ETHNL_CMD_GET_SETTINGS
ETHTOOL_SLINKSETTINGS		ETHNL_CMD_SET_SETTINGS
ETHTOOL_PHY_GTUNABLE		n/a
ETHTOOL_PHY_STUNABLE		n/a
ETHTOOL_GFECPARAM		ETHNL_CMD_GET_PARAMS
ETHTOOL_SFECPARAM		ETHNL_CMD_SET_PARAMS

