23 Sep, 2020
1 commit
-
Two minor conflicts:
1) net/ipv4/route.c, adding a new local variable while
moving another local variable and removing it's
initial assignment.2) drivers/net/dsa/microchip/ksz9477.c, overlapping changes.
One pretty prints the port mode differently, whilst another
changes the driver to try and obtain the port mode from
the port node rather than the switch node.Signed-off-by: David S. Miller
18 Sep, 2020
1 commit
-
Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd
field in genetlink header) for replies to tunnel info netlink request, i.e.
the same value as the request have. This is a problem because we are using
two separate enums for userspace to kernel and kernel to userspace message
types so that this ETHTOOL_MSG_TUNNEL_INFO_GET (28) collides with
ETHTOOL_MSG_CABLE_TEST_TDR_NTF which is what message type 28 means for
kernel to userspace messages.As the tunnel info request reached mainline in 5.9 merge window, we should
still be able to fix the reply message type without breaking backward
compatibility.Fixes: c7d759eb7b12 ("ethtool: add tunnel info interface")
Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller
16 Sep, 2020
1 commit
-
Currently drivers have to report their pause frames statistics
via ethtool -S, and there is a wide variety of names used for
these statistics.Add the two statistics defined in IEEE 802.3x to the standard
API. Create a new ethtool request header flag for including
statistics in the response to GET commands.Always create the ETHTOOL_A_PAUSE_STATS nest in replies when
flag is set. Testing if driver declares the op is not a reliable
way of checking if any stats will actually be included and therefore
we don't want to give the impression that presence of
ETHTOOL_A_PAUSE_STATS indicates driver support.Note that this patch does not include PFC counters, which may fit
better in dcbnl? But mostly I don't need them/have a setup to test
them so I haven't looked deeply into exposing them :)v3:
- add a helper for "uninitializing" stats, rather than a cryptic
memset() (Andrew)Signed-off-by: Jakub Kicinski
Reviewed-by: Saeed Mahameed
Signed-off-by: David S. Miller
04 Aug, 2020
1 commit
-
mlx5 has the IANA VXLAN port (4789) hard coded by the device,
instead of being added dynamically when tunnels are created.To support this add a workaround flag to struct udp_tunnel_nic_info.
Skipping updates for the port is fairly trivial, dumping the hard
coded port via ethtool requires some code duplication. The port
is not a part of any real table, we dump it in a special table
which has no tunnel types supported and only one entry.This is the last known workaround / hack needed to convert
all drivers to the new infra.Signed-off-by: Jakub Kicinski
Signed-off-by: Saeed Mahameed
11 Jul, 2020
1 commit
-
Add an interface to report offloaded UDP ports via ethtool netlink.
Now that core takes care of tracking which UDP tunnel ports the NICs
are aware of we can quite easily export this information out to
user space.The responsibility of writing the netlink dumps is split between
ethtool code and udp_tunnel_nic.c - since udp_tunnel module may
not always be loaded, yet we should always report the capabilities
of the NIC.$ ethtool --show-tunnels eth0
Tunnel information for eth0:
UDP port table 0:
Size: 4
Types: vxlan
No entries
UDP port table 1:
Size: 4
Types: geneve, vxlan-gpe
Entries (1):
port 1230, vxlan-gpev4:
- back to v2, build fix is now directly in udp_tunnel.h
v3:
- don't compile ETHTOOL_MSG_TUNNEL_INFO_GET in if CONFIG_INET
not set.
v2:
- fix string set count,
- reorder enums in the uAPI,
- fix type of ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES to bitset
in docs and comments.Signed-off-by: Jakub Kicinski
Signed-off-by: David S. Miller
08 Jul, 2020
1 commit
-
Fix table formatting to eliminate warnings.
Documentation/networking/ethtool-netlink.rst:509: WARNING: Malformed table.
Documentation/networking/ethtool-netlink.rst:522: WARNING: Malformed table.
Documentation/networking/ethtool-netlink.rst:543: WARNING: Malformed table.
Documentation/networking/ethtool-netlink.rst:555: WARNING: Malformed table.
Documentation/networking/ethtool-netlink.rst:591: WARNING: Malformed table.Signed-off-by: Randy Dunlap
Signed-off-by: David S. Miller
30 Jun, 2020
1 commit
-
Add link extended state attributes.
Signed-off-by: Amit Cohen
Reviewed-by: Jiri Pirko
Reviewed-by: Jacob Keller
Reviewed-by: Petr Machata
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller
11 Jun, 2020
1 commit
-
Sphinx appears to get upset at extra spaces at the end of a literal:
Documentation/networking/ethtool-netlink.rst:1032: WARNING: Inline literal start-string without end-string.
Documentation/networking/ethtool-netlink.rst:1034: WARNING: Inline literal start-string without end-string.
Documentation/networking/ethtool-netlink.rst:1036: WARNING: Inline literal start-string without end-string.
Documentation/networking/ethtool-netlink.rst:1089: WARNING: Inline literal start-string without end-string.
Documentation/networking/ethtool-netlink.rst:1091: WARNING: Inline literal start-string without end-string.
Documentation/networking/ethtool-netlink.rst:1093: WARNING: Inline literal start-string without end-string.Fixes: f2bc8ad31a7f ("net: ethtool: Allow PHY cable test TDR data to configured")
Fixes: a331172b156b ("net: ethtool: Add attributes for cable test TDR data")
Signed-off-by: Jakub Kicinski
Signed-off-by: David S. Miller
27 May, 2020
2 commits
-
Allow the user to configure where on the cable the TDR data should be
retrieved, in terms of first and last sample, and the step between
samples. Also add the ability to ask for TDR data for just one pair.If this configuration is not provided, it defaults to 1-150m at 1m
intervals for all pairs.Signed-off-by: Andrew Lunn
v3:
Move the TDR configuration into a structure
Add a range check on step
Use NL_SET_ERR_MSG_ATTR() when appropriate
Move TDR configuration into a nest
Document attributes in the requestSigned-off-by: David S. Miller
-
Some Ethernet PHYs can return the raw time domain reflectromatry data.
Add the attributes to allow this data to be requested and returned via
netlink ethtool.Signed-off-by: Andrew Lunn
v2:
m -> cm
Report what the PHY actually used for start/stop/step.Signed-off-by: David S. Miller
22 May, 2020
1 commit
-
Signal Quality Index is a mandatory value required by "OPEN Alliance
SIG" for the 100Base-T1 PHYs [1]. This indicator can be used for cable
integrity diagnostic and investigating other noise sources and
implement by at least two vendors: NXP[2] and TI[3].[1] http://www.opensig.org/download/document/218/Advanced_PHY_features_for_automotive_Ethernet_V1.0.pdf
[2] https://www.nxp.com/docs/en/data-sheet/TJA1100.pdf
[3] https://www.ti.com/product/DP83TC811R-Q1Signed-off-by: Oleksij Rempel
Reviewed-by: Andrew Lunn
Reviewed-by: Michal Kubecek
Signed-off-by: David S. Miller
11 May, 2020
2 commits
-
Add the attributes needed to report cable test results to userspace.
The reports are expected to be per twisted pair. A nested property per
pair can report the result of the cable test. A nested property can
also report the length of the cable to any fault.v2:
Grammar fixes
Change length from u16 to u32
s/DEV/HEADER/g
Add status attributes
Rename pairs from numbers to letters.v3:
Fixed example in document
Add ETHTOOL_A_CABLE_NEST_* enum
Add ETHTOOL_MSG_CABLE_TEST_NTF to documentationSigned-off-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Reviewed-by: Michal Kubecek
Signed-off-by: Jakub Kicinski -
Add new ethtool netlink calls to trigger the starting of a PHY cable
test.Add Kconfig'ury to ETHTOOL_NETLINK so that PHYLIB is not a module when
ETHTOOL_NETLINK is builtin, which would result in kernel linking errors.v2:
Remove unwanted white space change
Remove ethnl_cable_test_act_ops and use doit handler
Rename cable_test_set_policy cable_test_act_policy
Remove ETHTOOL_MSG_CABLE_TEST_ACT_REPLYv3:
Remove ETHTOOL_MSG_CABLE_TEST_ACT_REPLY from documentation
Remove unused cable_test_get_policy
Add Reviewed-by tagsv4:
Remove unwanted blank lineSigned-off-by: Andrew Lunn
Reviewed-by: Michal Kubecek
Reviewed-by: Florian Fainelli
Signed-off-by: Jakub Kicinski
07 May, 2020
1 commit
-
This UAPI is needed for BroadR-Reach 100BASE-T1 devices. Due to lack of
auto-negotiation support, we needed to be able to configure the
MASTER-SLAVE role of the port manually or from an application in user
space.The same UAPI can be used for 1000BASE-T or MultiGBASE-T devices to
force MASTER or SLAVE role. See IEEE 802.3-2018:
22.2.4.3.7 MASTER-SLAVE control register (Register 9)
22.2.4.3.8 MASTER-SLAVE status register (Register 10)
40.5.2 MASTER-SLAVE configuration resolution
45.2.1.185.1 MASTER-SLAVE config value (1.2100.14)
45.2.7.10 MultiGBASE-T AN control 1 register (Register 7.32)The MASTER-SLAVE role affects the clock configuration:
-------------------------------------------------------------------------------
When the PHY is configured as MASTER, the PMA Transmit function shall
source TX_TCLK from a local clock source. When configured as SLAVE, the
PMA Transmit function shall source TX_TCLK from the clock recovered from
data stream provided by MASTER.iMX6Q KSZ9031 XXX
------\ /-----------\ /------------\
| | | | |
MAC || PHY Slave || PHY Master |
|
Reviewed-by: Andrew Lunn
Signed-off-by: David S. Miller
30 Mar, 2020
10 commits
-
Implement TSINFO_GET request to get timestamping information for a network
device. This is traditionally available via ETHTOOL_GET_TS_INFO ioctl
request.Move part of ethtool_get_ts_info() into common.c so that ioctl and netlink
code use the same logic to get timestamping information from the device.v3: use "TSINFO" rather than "TIMESTAMP", suggested by Richard Cochran
Signed-off-by: Michal Kubecek
Acked-by: Richard Cochran
Signed-off-by: David S. Miller -
Send ETHTOOL_MSG_EEE_NTF notification whenever EEE settings of a network
device are modified using ETHTOOL_MSG_EEE_SET netlink message or
ETHTOOL_SEEE ioctl request.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement EEE_SET netlink request to set EEE settings of a network device.
These are traditionally set with ETHTOOL_SEEE ioctl request.The netlink interface allows setting the EEE status for all link modes
supported by kernel but only first 32 link modes can be set at the moment
as only those are supported by the ethtool_ops callback.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement EEE_GET request to get EEE settings of a network device. These
are traditionally available via ETHTOOL_GEEE ioctl request.The netlink interface allows reporting EEE status for all link modes
supported by kernel but only first 32 link modes are provided at the moment
as only those are reported by the ethtool_ops callback and drivers.v2: fix alignment (whitespace only)
Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Send ETHTOOL_MSG_PAUSE_NTF notification whenever pause parameters of
a network device are modified using ETHTOOL_MSG_PAUSE_SET netlink message
or ETHTOOL_SPAUSEPARAM ioctl request.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement PAUSE_SET netlink request to set pause parameters of a network
device. Thease are traditionally set with ETHTOOL_SPAUSEPARAM ioctl
request.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement PAUSE_GET request to get pause parameters of a network device.
These are traditionally available via ETHTOOL_GPAUSEPARAM ioctl request.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Send ETHTOOL_MSG_COALESCE_NTF notification whenever coalescing parameters
of a network device are modified using ETHTOOL_MSG_COALESCE_SET netlink
message or ETHTOOL_SCOALESCE ioctl request.Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Implement COALESCE_SET netlink request to set coalescing parameters of
a network device. These are traditionally set with ETHTOOL_SCOALESCE ioctl
request. This commit adds only support for device coalescing parameters,
not per queue coalescing parameters.Like the ioctl implementation, the generic ethtool code checks if only
supported parameters are modified; if not, first offending attribute is
reported using extack.v2: fix alignment (whitespace only)
Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Implement COALESCE_GET request to get coalescing parameters of a network
device. These are traditionally available via ETHTOOL_GCOALESCE ioctl
request. This commit adds only support for device coalescing parameters,
not per queue coalescing parameters.Omit attributes with zero values unless they are declared as supported
(i.e. the corresponding bit in ethtool_ops::supported_coalesce_params is
set).Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller
13 Mar, 2020
11 commits
-
Send ETHTOOL_MSG_CHANNELS_NTF notification whenever channel counts of
a network device are modified using ETHTOOL_MSG_CHANNELS_SET netlink
message or ETHTOOL_SCHANNELS ioctl request.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement CHANNELS_SET netlink request to set channel counts of a network
device. These are traditionally set with ETHTOOL_SCHANNELS ioctl request.Like the ioctl implementation, the generic ethtool code checks if supplied
values do not exceed driver defined limits; if they do, first offending
attribute is reported using extack. Checks preventing removing channels
used for RX indirection table or zerocopy AF_XDP socket are also
implemented.Move ethtool_get_max_rxfh_channel() helper into common.c so that it can be
used by both ioctl and netlink code.v2:
- fix netdev reference leak in error path (found by Jakub Kicinsky)Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Implement CHANNELS_GET request to get channel counts of a network device.
These are traditionally available via ETHTOOL_GCHANNELS ioctl request.Omit attributes for channel types which are not supported by driver or
device (zero reported for maximum).v2: (all suggested by Jakub Kicinski)
- minor cleanup in channels_prepare_data()
- more descriptive channels_reply_size()
- omit attributes with zero max countSigned-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Send ETHTOOL_MSG_RINGS_NTF notification whenever ring sizes of a network
device are modified using ETHTOOL_MSG_RINGS_SET netlink message or
ETHTOOL_SRINGPARAM ioctl request.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement RINGS_SET netlink request to set ring sizes of a network device.
These are traditionally set with ETHTOOL_SRINGPARAM ioctl request.Like the ioctl implementation, the generic ethtool code checks if supplied
values do not exceed driver defined limits; if they do, first offending
attribute is reported using extack.v2:
- fix netdev reference leak in error path (found by Jakub Kicinsky)Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Implement RINGS_GET request to get ring sizes of a network device. These
are traditionally available via ETHTOOL_GRINGPARAM ioctl request.Omit attributes for ring types which are not supported by driver or device
(zero reported for maximum).v2: (all suggested by Jakub Kicinski)
- minor cleanup in rings_prepare_data()
- more descriptive rings_reply_size()
- omit attributes with zero max sizeSigned-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Implement PRIVFLAGS_SET netlink request to set private flags of a network
device. These are traditionally set with ETHTOOL_SPFLAGS ioctl request.Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Implement PRIVFLAGS_GET request to get private flags for a network device.
These are traditionally available via ETHTOOL_GPFLAGS ioctl request.Signed-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller -
Send ETHTOOL_MSG_FEATURES_NTF notification whenever network device features
are modified using ETHTOOL_MSG_FEATURES_SET netlink message, ethtool ioctl
request or any other way resulting in call to netdev_update_features() or
netdev_change_features()Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement FEATURES_SET netlink request to set network device features.
These are traditionally set using ETHTOOL_SFEATURES ioctl request.Actual change is subject to netdev_change_features() sanity checks so that
it can differ from what was requested. Unlike with most other SET requests,
in addition to error code and optional extack, kernel provides an optional
reply message (ETHTOOL_MSG_FEATURES_SET_REPLY) in the same format but with
different semantics: information about difference between user request and
actual result and difference between old and new state of dev->features.
This reply message can be suppressed by setting ETHTOOL_FLAG_OMIT_REPLY
flag in request header.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement FEATURES_GET request to get network device features. These are
traditionally available via ETHTOOL_GFEATURES ioctl request.v2:
- style cleanup suggested by Jakub KicinskiSigned-off-by: Michal Kubecek
Reviewed-by: Jakub Kicinski
Signed-off-by: David S. Miller
27 Jan, 2020
5 commits
-
Send ETHTOOL_MSG_WOL_NTF notification whenever wake-on-lan settings of
a device are modified using ETHTOOL_MSG_WOL_SET netlink message or
ETHTOOL_SWOL ioctl request.As notifications can be received by anyone, do not include SecureOn(tm)
password in notification messages.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement WOL_SET netlink request to set wake-on-lan settings. This is
equivalent to ETHTOOL_SWOL ioctl request.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller -
Implement WOL_GET request to get wake-on-lan settings for a device,
traditionally available via ETHTOOL_GWOL ioctl request.As part of the implementation, provide symbolic names for wake-on-line
modes as ETH_SS_WOL_MODES string set.Signed-off-by: Michal Kubecek
Reviewed-by: Andrew Lunn
Signed-off-by: David S. Miller -
Send ETHTOOL_MSG_DEBUG_NTF notification message whenever debugging message
mask for a device are modified using ETHTOOL_MSG_DEBUG_SET netlink message
or ETHTOOL_SMSGLVL ioctl request.The notification message has the same format as reply to DEBUG_GET request.
As with other ethtool notifications, netlink requests only trigger the
notification if the mask is actually changed while ioctl request trigger it
whenever the request results in calling the ethtool_ops handler.Signed-off-by: Michal Kubecek
Reviewed-by: Andrew Lunn
Signed-off-by: David S. Miller -
Implement DEBUG_SET netlink request to set debugging settings for a device.
At the moment, only message mask corresponding to message level as set by
ETHTOOL_SMSGLVL ioctl request can be set. (It is called message level in
ioctl interface but almost all drivers interpret it as a bit mask.)Signed-off-by: Michal Kubecek
Reviewed-by: Andrew Lunn
Signed-off-by: David S. Miller