[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAHZX3B_JrgbXhEv0FqvmZfVv0qy4W5shjupMj2CzSLHmGstxuA@mail.gmail.com>
Date: Wed, 23 Dec 2020 16:31:52 +0800
From: Bruce Liu <ccieliu@...il.com>
To: mkubecek@...e.cz, netdev@...r.kernel.org
Cc: shlei@...co.com
Subject: Re: "ethtool" missing "master-slave" args in "do_sset" function.[TEXT/PLAIN]
Hi Michal Kubecek and Network dev team,
Good day! Hope you are doing well.
This is Bruce from China, and please allow me to cc Rudy from Cisco
Systems in China team.
We are facing a weird behavior about "master-slave configuration"
function in ethtool.
Please correct me if I am wrong....
As you know, start from ethtool 5.8, "master/slave configuration
support" added.
https://lwn.net/Articles/828044/
========================================================================
Appeal:
Confirm and discuss workaround
========================================================================
Issue description:
As we test in lab, no "master-slave" option supported.
========================================================================
Issue reproduce:
root@...pberrypi:~# ethtool -s eth0 master-slave master-preferred
ethtool: bad command line argument(s)
For more information run ethtool -h
========================================================================
Environment:
debian-live-10.7.0-amd64-standard.iso
Kernel 5.4.79
ethtool 5.10
Source code: https://mirrors.edge.kernel.org/pub/software/network/ethtool/ethtool-5.10.tar.xz
========================================================================
Troubleshooting:
root@...pberrypi:~# ethtool -h
ethtool version 5.10
Usage:
ethtool [ FLAGS ] DEVNAME Display standard information
about device
ethtool [ FLAGS ] -s|--change DEVNAME Change generic options
[ speed %d ]
[ duplex half|full ]
[ port tp|aui|bnc|mii|fibre|da ]
[ mdix auto|on|off ]
[ autoneg on|off ]
[ advertise %x[/%x] | mode on|off ... [--] ]
[ phyad %d ]
[ xcvr internal|external ]
[ wol %d[/%d] | p|u|m|b|a|g|s|f|d... ]
[ sopass %x:%x:%x:%x:%x:%x ]
[ msglvl %d[/%d] | type on|off ... [--] ]
[ master-slave
master-preferred|slave-preferred|master-force|slave-force ]
root@...pberrypi:~# ethtool -s eth0 [double tab here]
advertise autoneg duplex mdix msglvl phyad port
speed wol xcvr
========================================
Review 5.10 source code:
ethtool.c line:5616
static const struct option args[] = {
{
.opts = "-s|--change",
.func = do_sset,
.nlfunc = nl_sset,
.help = "Change generic options",
.xhelp = " [ speed %d ]\n"
" [ duplex half|full ]\n"
" [ port tp|aui|bnc|mii|fibre|da ]\n"
" [ mdix auto|on|off ]\n"
" [ autoneg on|off ]\n"
" [ advertise %x[/%x] | mode on|off ... [--] ]\n"
" [ phyad %d ]\n"
" [ xcvr internal|external ]\n"
" [ wol %d[/%d] | p|u|m|b|a|g|s|f|d... ]\n"
" [ sopass %x:%x:%x:%x:%x:%x ]\n"
" [ msglvl %d[/%d] | type on|off ... [--] ]\n"
" [ master-slave master-preferred|slave-preferred|master-force|slave-force ]\n"
},
========================================
ethtool.c line:2912 do_sset function
There is NOT an "else if" to catch "master-slave" option, and the
options matched final else, and print an error message "ethtool: bad
command line argument(s)\n""For more information run ethtool -h\n""
ethtool.c line: 3069
} else {
exit_bad_args();
========================================
root@...pberrypi:~# ethtool -s eth0 master-slave master-preferred
ethtool: bad command line argument(s)
For more information run ethtool -h
Look forward to your reply.
Cheers!
Bruce Liu (UTC +08)
Email: ccieliu@...il.com
Cheers!
Bruce Liu (UTC +08)
Email: ccieliu@...il.com
Cheers!
Bruce Liu (UTC +08)
Email: ccieliu@...il.com
On Wed, Dec 23, 2020 at 3:49 PM Bruce Liu <ccieliu@...il.com> wrote:
>
> Hi Michal Kubecek and Network dev team,
>
> Good day! Hope you are doing well.
> This is Bruce from China, and please allow me to cc Rudy from Cisco Systems in China team.
>
> We are facing a weird behavior about "master-slave configuration" function in ethtool.
> Please correct me if I am wrong....
>
> As you know, start from ethtool 5.8, "master/slave configuration support" added.
> https://lwn.net/Articles/828044/
>
> ========================================================================
> Appeal:
> Confirm and discuss workaround
>
> ========================================================================
> Issue description:
> As we test in lab, no "master-slave" option supported.
>
> ========================================================================
> Issue reproduce:
> root@...pberrypi:~# ethtool -s eth0 master-slave master-preferred
> ethtool: bad command line argument(s)
> For more information run ethtool -h
>
> ========================================================================
> Environment:
> debian-live-10.7.0-amd64-standard.iso
> Kernel 5.4.79
> ethtool 5.10
> Source code: https://mirrors.edge.kernel.org/pub/software/network/ethtool/ethtool-5.10.tar.xz
>
> ========================================================================
> Troubleshooting:
> root@...pberrypi:~# ethtool -h
> ethtool version 5.10
> Usage:
> ethtool [ FLAGS ] DEVNAME Display standard information about device
> ethtool [ FLAGS ] -s|--change DEVNAME Change generic options
> [ speed %d ]
> [ duplex half|full ]
> [ port tp|aui|bnc|mii|fibre|da ]
> [ mdix auto|on|off ]
> [ autoneg on|off ]
> [ advertise %x[/%x] | mode on|off ... [--] ]
> [ phyad %d ]
> [ xcvr internal|external ]
> [ wol %d[/%d] | p|u|m|b|a|g|s|f|d... ]
> [ sopass %x:%x:%x:%x:%x:%x ]
> [ msglvl %d[/%d] | type on|off ... [--] ]
> [ master-slave master-preferred|slave-preferred|master-force|slave-force ]
>
> root@...pberrypi:~# ethtool -s eth0 [double tab here]
> advertise autoneg duplex mdix msglvl phyad port speed wol xcvr
>
> ========================================
> Review 5.10 source code:
> ethtool.c line:5616
>
> static const struct option args[] = {
> {
> .opts = "-s|--change",
> .func = do_sset,
> .nlfunc = nl_sset,
> .help = "Change generic options",
> .xhelp = " [ speed %d ]\n"
> " [ duplex half|full ]\n"
> " [ port tp|aui|bnc|mii|fibre|da ]\n"
> " [ mdix auto|on|off ]\n"
> " [ autoneg on|off ]\n"
> " [ advertise %x[/%x] | mode on|off ... [--] ]\n"
> " [ phyad %d ]\n"
> " [ xcvr internal|external ]\n"
> " [ wol %d[/%d] | p|u|m|b|a|g|s|f|d... ]\n"
> " [ sopass %x:%x:%x:%x:%x:%x ]\n"
> " [ msglvl %d[/%d] | type on|off ... [--] ]\n"
> " [ master-slave master-preferred|slave-preferred|master-force|slave-force ]\n"
> },
>
> ========================================
> ethtool.c line:2912 do_sset function
> There is NOT an "else if" to catch "master-slave" option, and the options matched final else, and print an error message "ethtool: bad command line argument(s)\n""For more information run ethtool -h\n""
>
> ethtool.c line: 3069
>
> } else {
> exit_bad_args();
>
> ========================================
> root@...pberrypi:~# ethtool -s eth0 master-slave master-preferred
> ethtool: bad command line argument(s)
> For more information run ethtool -h
>
> Look forward to your reply.
>
> Cheers!
> Bruce Liu (UTC +08)
> Email: ccieliu@...il.com
Powered by blists - more mailing lists