The kernel signals when offload fails using the 'RTM_F_OFFLOAD_FAILED'
flag. Print it to help users understand the offload state of the route.
The "rt_" prefix is used in order to distinguish it from the offload state
of nexthops, similar to "rt_offload" and "r
>-Original Message-
>From: David Ahern
>Sent: Wednesday, January 27, 2021 7:03
>To: Ido Schimmel ; netdev@vger.kernel.org
>Cc: da...@davemloft.net; k...@kernel.org; Amit Cohen ;
>Roopa Prabhu ; Donald
>Sharp ; Benjamin Poirier ; mlxsw
>; Ido Schimmel
>
>S
>-Original Message-
>From: David Ahern
>Sent: Wednesday, January 27, 2021 6:33
>To: Ido Schimmel ; netdev@vger.kernel.org
>Cc: da...@davemloft.net; k...@kernel.org; Amit Cohen ;
>Roopa Prabhu ; Donald
>Sharp ; Benjamin Poirier ; mlxsw
>; Ido Schimmel
>
>S
From: Amit Cohen
Similar to other print functions we need to flush buffered data
in order to work with pipes and output redirects.
Without it, stdout output is buffered and not written to the disk.
This is useful when writing scripts that rely on devlink-monitor output.
Signed-off-by: Amit
-next snapshot
* Move helper functions from common.c to netlink/settings.c
* Use string tables for enum strings
* Report the numeric value in case of unknown value
* Use banner once, change print concept
Amit Cohen (3):
uapi: linux: update kernel UAPI header files
netlink: desc-ethtool.c
Print extended state in addition to link state.
In case that extended state is not provided, print state only.
If extended substate is provided in addition to the extended state,
print it also.
Signed-off-by: Amit Cohen
---
netlink/settings.c | 147
Add copies of kernel UAPI header files needed for link extended state:
uapi/linux/ethtool.h
uapi/linux/ethtool_netlink.h
The copies are taken from net-next tree,
commit ecc31c60240b ("ethtool: Add link extended state")
Signed-off-by: Amit Cohen
---
uapi/linux
Add ETHTOOL_A_LINKSTATE_EXT_STATE and ETHTOOL_A_LINKSTATE_EXT_SUBSTATE
format descriptions.
Signed-off-by: Amit Cohen
---
netlink/desc-ethtool.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c
index 98b898e..bce22e2 100644
--- a/netlink/desc
Add ETHTOOL_A_LINKSTATE_EXT_STATE to expose general extended state.
Add ETHTOOL_A_LINKSTATE_EXT_SUBSTATE to expose more information in
addition to the extended state.
Signed-off-by: Amit Cohen
---
netlink/desc-ethtool.c | 2 ++
uapi/linux/ethtool_netlink.h | 2 ++
2 files changed, 4
neral extended state, drivers can pass additional
information about the link state using the sub-state field. For example:
$ ethtool ethX
...
Link detected: no (Autoneg, No partner detected)
Amit Cohen (3):
netlink: expand ETHTOOL_LINKSTATE with extended state attributes
common: add infrastructu
Add enums and functions to covert extended state values sent from kernel to
appropriate strings to expose in userspace.
Signed-off-by: Amit Cohen
---
common.c | 171 +++
common.h | 2 +
2 files changed, 173 insertions(+)
diff --git a
Print extended state in addition to link state.
In case that extended state is not provided, print state only.
If extended substate is provided in addition to the extended state,
print it also.
Signed-off-by: Amit Cohen
---
netlink/settings.c | 59
On 24-Jun-20 22:07, Jacob Keller wrote:
>
>
> On 6/24/2020 1:19 AM, Ido Schimmel wrote:
>> From: Amit Cohen
>>
>> Add link extended state attributes.
>>
>> Signed-off-by: Amit Cohen
>> Reviewed-by: Petr Machata
>> Reviewed-by: Jiri Pirko
On 07-Jun-20 21:17, Florian Fainelli wrote:
>
>
> On 6/7/2020 7:59 AM, Amit Cohen wrote:
>> Currently, drivers can only tell whether the link is up/down using
>> LINKSTATE_GET, but no additional information is given.
>>
>> Add attributes to LINKSTATE_GET comman
On 07-Jun-20 21:25, Florian Fainelli wrote:
>
>
> On 6/7/2020 7:59 AM, Amit Cohen wrote:
>> Implement .get_down_ext_state() as part of ethtool_ops.
>> Query link down reason from PDDR register and convert it to ethtool
>> ext_state.
>>
>> In case that mo
On 07-Jun-20 22:11, Florian Fainelli wrote:
>
>
> On 6/7/2020 7:59 AM, Amit Cohen wrote:
>> Add link extended state attributes.
>>
>> Signed-off-by: Amit Cohen
>> Reviewed-by: Petr Machata
>> Reviewed-by: Jiri Pirko
>
> If you need to resubmit
Andrew Lunn writes:
>> +/**
>> + * enum ethtool_ext_substate_cable_issue - more information in
>> + * addition to ETHTOOL_EXT_STATE_CABLE_ISSUE.
>> + */
>> +enum ethtool_ext_substate_cable_issue {
>> +ETHTOOL_EXT_SUBSTATE_UNSUPPORTED_CABLE = 1,
>> +ETHTOOL_EXT_SUBSTATE_SHORTED_CABLE,
>> +
Andrew Lunn writes:
>> +Link extended states:
>> +
>> +
>> =
>> + ``Autoneg failure`` Failure during auto negotiation mechanism
>
>I think you need to define 'failure' here.
>
>Linux PHYs don't have this st
Move mlxsw_sp1_port_type_speed_ops and mlxsw_sp2_port_type_speed_ops
with the relevant code from spectrum.c to spectrum_ethtool.c.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
Reviewed-by: Jiri Pirko
---
.../net/ethernet/mellanox/mlxsw/spectrum.c| 660 --
.../net
Currently different_speeds_get() is used only by ethtool.sh tests.
The function can be useful for another tests that check ethtool
configurations.
Move the function to ethtool_lib in order to allow other tests to use
it.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
---
.../testing
The PDDR register enables to read the Phy debug database.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
Reviewed-by: Jiri Pirko
---
drivers/net/ethernet/mellanox/mlxsw/reg.h | 51 +++
1 file changed, 51 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw
Add tests to check ethtool report about extended state.
The tests configure several states and verify that the correct extended
state is reported by ethtool.
Check extended state with substate (Autoneg) and extended state without
substate (No cable).
Signed-off-by: Amit Cohen
Reviewed-by: Petr
Add link extended state attributes.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
Reviewed-by: Jiri Pirko
---
Documentation/networking/ethtool-netlink.rst | 56 ++--
1 file changed, 52 insertions(+), 4 deletions(-)
diff --git a/Documentation/networking/ethtool
Add NETIF_NO_CABLE port to tests topology.
The port can also be declared as an environment variable and tests can be
run like that:
NETIF_NO_CABLE=eth9 ./test.sh eth{1..8}
The NETIF_NO_CABLE port will be used by ethtool_extended_state test.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
nd omit the
substate attribute.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
Reviewed-by: Jiri Pirko
---
include/linux/ethtool.h | 22 +
include/uapi/linux/ethtool.h | 70
include/uapi/linux/ethtool_netlink.h | 2 +
net/ethtool
Implement .get_down_ext_state() as part of ethtool_ops.
Query link down reason from PDDR register and convert it to ethtool
ext_state.
In case that more information than common ext_state is provided,
fill ext_substate also with the appropriate value.
Signed-off-by: Amit Cohen
Reviewed-by: Petr
Add spectrum_ethtool.c file for ethtool code.
Move ethtool_ops and the relevant code from spectrum.c to
spectrum_ethtool.c.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
Reviewed-by: Jiri Pirko
---
drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 +-
.../net/ethernet/mellanox/mlxsw
, and not
only as static function in spectrum.c.
Signed-off-by: Amit Cohen
Reviewed-by: Petr Machata
Reviewed-by: Jiri Pirko
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw
curred, something like:
$ ethtool ethX
...
Link detected: yes (downshifted)
Patches #1-#3 Move mlxsw ethtool code to separate file
Patches #4-#5 Add infrastructure in ethtool
Patches #6-#7 Add support of extended state in mlxsw driver
Patches #8-#10 Add tests cases
Amit Cohen (10):
mlxsw: spectrum_dcb:
Andrew Lunn writes:
>On Wed, May 27, 2020 at 03:41:22PM +0000, Amit Cohen wrote:
>> Hi Andrew,
>>
>> We are planning to send a set that exposes link-down reason in ethtool.
>>
>> It seems that the ability of your set “Ethernet cable test support”
>>
30 matches
Mail list logo