netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: netdev <netdev@vger.kernel.org>, Chris Healy <cphealy@gmail.com>
Subject: Re: [PATCH ethtool v4 0/6] ethtool(1) cable test support
Date: Sun, 5 Jul 2020 20:25:33 +0200	[thread overview]
Message-ID: <20200705182533.GA886548@lunn.ch> (raw)
In-Reply-To: <20200705004447.ook7vkzffa5ejb2v@lion.mk-sys.cz>

> Hello Andrew,
> 
> could you please test this update of netlink/desc-ethtool.c on top of
> your series? The userspace messages look as expected but I'm not sure if
> I have a device with cable test support available to test pretty
> printing of kernel messages. (And even if I do, I almost certainly won't
> have physical access to it.)

Tested-by: Andrew Lunn <andrew@lunn.ch>

/home/andrew/ethtool/ethtool --debug 0xff --cable-test-tdr lan2 first 10 last 12  
...
sending genetlink packet (56 bytes):
    msg length 56 ethool ETHTOOL_MSG_CABLE_TEST_TDR_ACT
    ETHTOOL_MSG_CABLE_TEST_TDR_ACT
        ETHTOOL_A_CABLE_TEST_TDR_HEADER
            ETHTOOL_A_HEADER_DEV_NAME = "lan2"
        ETHTOOL_A_CABLE_TEST_TDR_CFG
            ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST = 1000
            ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST = 1200
----------------	------------------
|  0000000056  |	| message length |
| 00020 | R-A- |	|  type | flags  |
|  0000000002  |	| sequence number|
|  0000000000  |	|     port ID    |
----------------	------------------
| 1b 01 00 00  |	|  extra header  |
|00016|N-|00001|	|len |flags| type|
|00009|--|00002|	|len |flags| type|
| 6c 61 6e 32  |	|      data      |	 l a n 2
| 00 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00008|--|00001|	|len |flags| type|
| e8 03 00 00  |	|      data      |	        
|00008|--|00002|	|len |flags| type|
| b0 04 00 00  |	|      data      |	        
----------------	------------------
received genetlink packet (52 bytes):
    msg length 52 ethool ETHTOOL_MSG_CABLE_TEST_TDR_NTF
    ETHTOOL_MSG_CABLE_TEST_TDR_NTF
        ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER
            ETHTOOL_A_HEADER_DEV_INDEX = 7
            ETHTOOL_A_HEADER_DEV_NAME = "lan2"
        ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS = 1
----------------	------------------
|  0000000052  |	| message length |
| 00020 | ---- |	|  type | flags  |
|  0000000036  |	| sequence number|
|  0000000000  |	|     port ID    |
----------------	------------------
| 1c 01 00 00  |	|  extra header  |
|00024|N-|00001|	|len |flags| type|
|00008|--|00001|	|len |flags| type|
| 07 00 00 00  |	|      data      |	        
|00009|--|00002|	|len |flags| type|
| 6c 61 6e 32  |	|      data      |	 l a n 2
| 00 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 01 00 00 00  |	|      data      |	        
----------------	------------------
Cable test TDR started for device lan2.
received genetlink packet (36 bytes):
    msg length 36 error errno=0
----------------	------------------
|  0000000036  |	| message length |
| 00002 | ---- |	|  type | flags  |
|  0000000002  |	| sequence number|
|  0000006959  |	|     port ID    |
----------------	------------------
| 00 00 00 00  |	|                |
| 38 00 00 00  |	|                |
| 14 00 05 00  |	|                |
| 02 00 00 00  |	|                |
| 00 00 00 00  |	|                |
----------------	------------------
received genetlink packet (336 bytes):
    msg length 336 ethool ETHTOOL_MSG_CABLE_TEST_TDR_NTF
    ETHTOOL_MSG_CABLE_TEST_TDR_NTF
        ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER
            ETHTOOL_A_HEADER_DEV_INDEX = 7
            ETHTOOL_A_HEADER_DEV_NAME = "lan2"
        ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS = 2
        ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST
            ETHTOOL_A_CABLE_TDR_NEST_PULSE
                ETHTOOL_A_CABLE_PULSE_mV = 1000
            ETHTOOL_A_CABLE_TDR_NEST_STEP
                ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE = 966
                ETHTOOL_A_CABLE_STEP_LAST_DISTANCE = 1127
                ETHTOOL_A_CABLE_STEP_STEP_DISTANCE = 80
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 0
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 46
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 1
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 117
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 2
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 85
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 3
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 93
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 0
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 7
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 1
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 15
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 2
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 23
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 3
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 31
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 0
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 148
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 1
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 156
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 2
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 320
            ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE
                ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 3
                ETHTOOL_A_CABLE_AMPLITUDE_mV = 39
----------------	------------------
|  0000000336  |	| message length |
| 00020 | ---- |	|  type | flags  |
|  0000000035  |	| sequence number|
|  0000000000  |	|     port ID    |
----------------	------------------
| 1c 01 00 00  |	|  extra header  |
|00024|N-|00001|	|len |flags| type|
|00008|--|00001|	|len |flags| type|
| 07 00 00 00  |	|      data      |	        
|00009|--|00002|	|len |flags| type|
| 6c 61 6e 32  |	|      data      |	 l a n 2
| 00 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00284|N-|00003|	|len |flags| type|
|00012|N-|00003|	|len |flags| type|
|00006|--|00001|	|len |flags| type|
| e8 03 00 00  |	|      data      |	        
|00028|N-|00001|	|len |flags| type|
|00008|--|00001|	|len |flags| type|
| c6 03 00 00  |	|      data      |	        
|00008|--|00002|	|len |flags| type|
| 67 04 00 00  |	|      data      |	 g      
|00008|--|00003|	|len |flags| type|
| 50 00 00 00  |	|      data      |	 P      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 00 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 2e 00 00 00  |	|      data      |	 .      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 01 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 75 00 00 00  |	|      data      |	 u      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 55 00 00 00  |	|      data      |	 U      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 03 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 5d 00 00 00  |	|      data      |	 ]      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 00 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 07 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 01 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 0f 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 17 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 03 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 1f 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 00 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 94 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 01 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 9c 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 40 01 00 00  |	|      data      |	 @      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 03 00 00 00  |	|      data      |	        
|00006|--|00002|	|len |flags| type|
| 27 00 00 00  |	|      data      |	 '      
----------------	------------------
Cable test TDR completed for device lan2.
TDR Pulse 1000mV
Step configuration: 9.66-11.27 meters in 0.80m steps
Pair A Amplitude   46
Pair B Amplitude  117
Pair C Amplitude   85
Pair D Amplitude   93
Pair A Amplitude    7
Pair B Amplitude   15
Pair C Amplitude   23
Pair D Amplitude   31
Pair A Amplitude  148
Pair B Amplitude  156
Pair C Amplitude  320
Pair D Amplitude   39


/home/andrew/ethtool/ethtool --debug 0xff --cable-test lan2
...
sending genetlink packet (36 bytes):
    msg length 36 ethool ETHTOOL_MSG_CABLE_TEST_ACT
    ETHTOOL_MSG_CABLE_TEST_ACT
        ETHTOOL_A_CABLE_TEST_HEADER
            ETHTOOL_A_HEADER_DEV_NAME = "lan2"
----------------	------------------
|  0000000036  |	| message length |
| 00020 | R-A- |	|  type | flags  |
|  0000000002  |	| sequence number|
|  0000000000  |	|     port ID    |
----------------	------------------
| 1a 01 00 00  |	|  extra header  |
|00016|N-|00001|	|len |flags| type|
|00009|--|00002|	|len |flags| type|
| 6c 61 6e 32  |	|      data      |	 l a n 2
| 00 00 00 00  |	|      data      |	        
----------------	------------------
received genetlink packet (52 bytes):
    msg length 52 ethool ETHTOOL_MSG_CABLE_TEST_NTF
    ETHTOOL_MSG_CABLE_TEST_NTF
        ETHTOOL_A_CABLE_TEST_NTF_HEADER
            ETHTOOL_A_HEADER_DEV_INDEX = 7
            ETHTOOL_A_HEADER_DEV_NAME = "lan2"
        ETHTOOL_A_CABLE_TEST_NTF_STATUS = 1
----------------	------------------
|  0000000052  |	| message length |
| 00020 | ---- |	|  type | flags  |
|  0000000034  |	| sequence number|
|  0000000000  |	|     port ID    |
----------------	------------------
| 1b 01 00 00  |	|  extra header  |
|00024|N-|00001|	|len |flags| type|
|00008|--|00001|	|len |flags| type|
| 07 00 00 00  |	|      data      |	        
|00009|--|00002|	|len |flags| type|
| 6c 61 6e 32  |	|      data      |	 l a n 2
| 00 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 01 00 00 00  |	|      data      |	        
----------------	------------------
Cable test started for device lan2.
received genetlink packet (36 bytes):
    msg length 36 error errno=0
----------------	------------------
|  0000000036  |	| message length |
| 00002 | ---- |	|  type | flags  |
|  0000000002  |	| sequence number|
|  0000006949  |	|     port ID    |
----------------	------------------
| 00 00 00 00  |	|                |
| 24 00 00 00  |	|                |
| 14 00 05 00  |	|                |
| 02 00 00 00  |	|                |
| 00 00 00 00  |	|                |
----------------	------------------
received genetlink packet (216 bytes):
    msg length 216 ethool ETHTOOL_MSG_CABLE_TEST_NTF
    ETHTOOL_MSG_CABLE_TEST_NTF
        ETHTOOL_A_CABLE_TEST_NTF_HEADER
            ETHTOOL_A_HEADER_DEV_INDEX = 7
            ETHTOOL_A_HEADER_DEV_NAME = "lan2"
        ETHTOOL_A_CABLE_TEST_NTF_STATUS = 2
        ETHTOOL_A_CABLE_TEST_NTF_NEST
            ETHTOOL_A_CABLE_NEST_RESULT
                ETHTOOL_A_CABLE_RESULT_PAIR = 0
                ETHTOOL_A_CABLE_RESULT_CODE = 2
            ETHTOOL_A_CABLE_NEST_RESULT
                ETHTOOL_A_CABLE_RESULT_PAIR = 1
                ETHTOOL_A_CABLE_RESULT_CODE = 2
            ETHTOOL_A_CABLE_NEST_RESULT
                ETHTOOL_A_CABLE_RESULT_PAIR = 2
                ETHTOOL_A_CABLE_RESULT_CODE = 2
            ETHTOOL_A_CABLE_NEST_RESULT
                ETHTOOL_A_CABLE_RESULT_PAIR = 3
                ETHTOOL_A_CABLE_RESULT_CODE = 2
            ETHTOOL_A_CABLE_NEST_FAULT_LENGTH
                ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0
                ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 2400
            ETHTOOL_A_CABLE_NEST_FAULT_LENGTH
                ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 1
                ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 2480
            ETHTOOL_A_CABLE_NEST_FAULT_LENGTH
                ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 2
                ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 2400
            ETHTOOL_A_CABLE_NEST_FAULT_LENGTH
                ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 3
                ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 2400
----------------	------------------
|  0000000216  |	| message length |
| 00020 | ---- |	|  type | flags  |
|  0000000033  |	| sequence number|
|  0000000000  |	|     port ID    |
----------------	------------------
| 1b 01 00 00  |	|  extra header  |
|00024|N-|00001|	|len |flags| type|
|00008|--|00001|	|len |flags| type|
| 07 00 00 00  |	|      data      |	        
|00009|--|00002|	|len |flags| type|
| 6c 61 6e 32  |	|      data      |	 l a n 2
| 00 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00164|N-|00003|	|len |flags| type|
|00020|N-|00001|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 00 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00020|N-|00001|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 01 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00020|N-|00001|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00020|N-|00001|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 03 00 00 00  |	|      data      |	        
|00005|--|00002|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 00 00 00 00  |	|      data      |	        
|00008|--|00002|	|len |flags| type|
| 60 09 00 00  |	|      data      |	 `      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 01 00 00 00  |	|      data      |	        
|00008|--|00002|	|len |flags| type|
| b0 09 00 00  |	|      data      |	        
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 02 00 00 00  |	|      data      |	        
|00008|--|00002|	|len |flags| type|
| 60 09 00 00  |	|      data      |	 `      
|00020|N-|00002|	|len |flags| type|
|00005|--|00001|	|len |flags| type|
| 03 00 00 00  |	|      data      |	        
|00008|--|00002|	|len |flags| type|
| 60 09 00 00  |	|      data      |	 `      
----------------	------------------
Cable test completed for device lan2.
Pair A code Open Circuit
Pair B code Open Circuit
Pair C code Open Circuit
Pair D code Open Circuit
Pair A, fault length: 24.00m
Pair B, fault length: 24.80m
Pair C, fault length: 24.00m
Pair D, fault length: 24.00m

    Andrew

  parent reply	other threads:[~2020-07-05 18:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  1:07 [PATCH ethtool v4 0/6] ethtool(1) cable test support Andrew Lunn
2020-07-01  1:07 ` [PATCH ethtool v4 1/6] Add " Andrew Lunn
2020-07-04 23:43   ` Michal Kubecek
2020-07-01  1:07 ` [PATCH ethtool v4 2/6] Add cable test TDR support Andrew Lunn
2020-07-04 23:58   ` Michal Kubecek
2020-07-01  1:07 ` [PATCH ethtool v4 3/6] json_writer/json_print: Import the iproute2 helper code for JSON output Andrew Lunn
2020-07-01  1:07 ` [PATCH ethtool v4 4/6] Add --json command line argument parsing Andrew Lunn
2020-07-01  1:07 ` [PATCH ethtool v4 5/6] ethtool.8.in: Document the cable test commands Andrew Lunn
2020-07-01  1:07 ` [PATCH ethtool v4 6/6] ethtool.8.in: Add --json option Andrew Lunn
2020-07-05  0:44 ` [PATCH ethtool v4 0/6] ethtool(1) cable test support Michal Kubecek
2020-07-05 16:24   ` Andrew Lunn
2020-07-05 23:26     ` Michal Kubecek
2020-07-05 18:25   ` Andrew Lunn [this message]
2020-07-05 23:27     ` Michal Kubecek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200705182533.GA886548@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).