Thread (3 messages) flat view 3 messages, 3 authors, 2021-10-27

Re: [EXT] Re: [net-next PATCH 1/2] octeontx2-pf: Add devlink param to init and de-init serdes

From: Ido Schimmel <hidden>
Date: 2021-10-27 18:12:11

On Wed, Oct 27, 2021 at 10:08:57AM -0700, Jakub Kicinski wrote:
On Wed, 27 Oct 2021 22:13:32 +0530 sundeep subbaraya wrote:
quoted
quoted
On Wed, 27 Oct 2021 16:01:14 +0530 Subbaraya Sundeep wrote:  
quoted
From: Rakesh Babu <redacted>

The physical/SerDes link of an netdev interface is not
toggled on interface bring up and bring down. This is
because the same link is shared between PFs and its VFs.
This patch adds devlink param to toggle physical link so
that it is useful in cases where a physical link needs to
be re-initialized.  
So it's a reset? Or are there cases where user wants the link
to stay down?  
There are cases where the user wants the link to stay down and debug.
We are adding this to help customers to debug issues wrt physical links.
Intel has a similar thing, they keep adding a ethtool priv flag called 
"link-down-on-close" to all their drivers.
This is the list I compiled the previous time we discussed it:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c3880bd159d431d06b687b0b5ab22e24e6ef0070
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5ec9e2ce41ac198de2ee18e0e529b7ebbc67408
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ab4ab73fc1ec6dec548fa36c5e383ef5faa7b4c1

It seems that various drivers default to not shutting down the link upon
ndo_stop(), but some users want to override it. I hit that too as it
breaks ECMP (switch thinks the link is up).
Maybe others do this, too.  It's time we added a standard API for
this.
The new parameter sounds like a reset, but it can also be achieved by:

# ethtool --set-priv-flags eth0 link-down-on-close on
# ip link set dev eth0 down
# ip link set dev eth0 up

Where the first command is replaced by a more standard ethtool API.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help