public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	sundeep subbaraya <sundeep.lkml@gmail.com>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Hariprasad Kelam <hkelam@marvell.com>,
	Geethasowjanya Akula <gakula@marvell.com>,
	Subbaraya Sundeep Bhatta <sbhatta@marvell.com>,
	Rakesh Babu Saladi <rsaladi2@marvell.com>,
	Saeed Mahameed <saeed@kernel.org>,
	"anthony.l.nguyen@intel.com" <anthony.l.nguyen@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [EXT] Re: [net-next PATCH 1/2] octeontx2-pf: Add devlink param to init and de-init serdes
Date: Thu, 28 Oct 2021 01:24:58 +0300	[thread overview]
Message-ID: <YXnRup1EJaF5Gwua@shredder> (raw)
In-Reply-To: <BY3PR18MB473794E01049EC94156E2858C6859@BY3PR18MB4737.namprd18.prod.outlook.com>

On Wed, Oct 27, 2021 at 06:43:00PM +0000, Sunil Kovvuri Goutham wrote:
> 
> > ________________________________
> > From: Ido Schimmel <idosch@idosch.org>
> > Sent: Wednesday, October 27, 2021 11:41 PM
> > To: Jakub Kicinski <kuba@kernel.org>
> > Cc: sundeep subbaraya <sundeep.lkml@gmail.com>; David Miller <davem@davemloft.net>; netdev@vger.kernel.org <netdev@vger.kernel.org>; Hariprasad Kelam <hkelam@marvell.com>; Geethasowjanya Akula <gakula@marvell.com>; Sunil Kovvuri Goutham <sgoutham@marvell.com>; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>; Rakesh Babu Saladi <rsaladi2@marvell.com>; Saeed Mahameed <saeed@kernel.org>; anthony.l.nguyen@intel.com <anthony.l.nguyen@intel.com>; Jesse Brandeburg <jesse.brandeburg@intel.com>; Andrew Lunn <andrew@lunn.ch>
> > Subject: Re: [EXT] Re: [net-next PATCH 1/2] octeontx2-pf: Add devlink param to init and de-init serdes
> >
> > 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:
> > > > > On Wed, 27 Oct 2021 16:01:14 +0530 Subbaraya Sundeep wrote:
> > > > > > From: Rakesh Babu <rsaladi2@marvell.com>
> > > > > >
> > > > > > 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://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_pub_scm_linux_kernel_git_torvalds_linux.git_commit_-3Fid-3Dc3880bd159d431d06b687b0b5ab22e24e6ef0070&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=q3VKxXQKiboRw_F01ggTzHuhwawxR1P9_tMCN2FODU4&m=4xGR8HuIRKUriC93QV4GmQBJ6KVwRgGZ05Syzpq2CAM&s=fvl1aLwL55CWIsG2NT5i3QsP4o_GTEsGhA6Epjz7ZAk&e=
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_pub_scm_linux_kernel_git_torvalds_linux.git_commit_-3Fid-3Dd5ec9e2ce41ac198de2ee18e0e529b7ebbc67408&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=q3VKxXQKiboRw_F01ggTzHuhwawxR1P9_tMCN2FODU4&m=4xGR8HuIRKUriC93QV4GmQBJ6KVwRgGZ05Syzpq2CAM&s=kH50Qq3h75xREveyWvCUn35wXagtt4uv1QRK0wMBEdk&e=
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_pub_scm_linux_kernel_git_torvalds_linux.git_commit_-3Fid-3Dab4ab73fc1ec6dec548fa36c5e383ef5faa7b4c1&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=q3VKxXQKiboRw_F01ggTzHuhwawxR1P9_tMCN2FODU4&m=4xGR8HuIRKUriC93QV4GmQBJ6KVwRgGZ05Syzpq2CAM&s=Uc3yY-5HjS7TgRBl4DPLsJ19XiHDD_PvF8hA38K4XwI&e=
> >
> > 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.
> 
> The intention here is provide an option to the user to toggle the serdes configuration
> as and when he wants to.

But why? What is the motivation? The commit message basically says that
you are adding a param to toggle the physical link because it is useful
to toggle the physical link.

> There is no dependency with logical interface's status.

But there is and the commit message explains why you are not doing it as
part of ndo_{stop,open}(): "because the same link is shared between PFs
and its VFs"

Such constraints also apply to other drivers and you can see that in the
"link-down-on-close" private flag. I'm also aware of propriety tools to
toggle device bits which prevent the physical link from going down upon
ndo_stop().

> Having a standard API to select bringing down physical interface upon logical interface's close call
> is a good idea. But this patch is not for that.

IIUC, your default behavior is not to take the physical link down upon
ndo_stop() and now you want to toggle the link. If you have a standard
API to change the default behavior, then the commands I showed will
toggle the link, no?

  parent reply	other threads:[~2021-10-27 22:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 10:31 [net-next PATCH 0/2] Add a devlink param and documentation Subbaraya Sundeep
2021-10-27 10:31 ` [net-next PATCH 1/2] octeontx2-pf: Add devlink param to init and de-init serdes Subbaraya Sundeep
2021-10-27 15:38   ` Jakub Kicinski
     [not found]     ` <PH0PR18MB4671C22DB7C8E5C46647860FA1859@PH0PR18MB4671.namprd18.prod.outlook.com>
2021-10-27 16:43       ` Fw: [EXT] " sundeep subbaraya
2021-10-27 17:08         ` Jakub Kicinski
2021-10-27 18:11           ` Ido Schimmel
     [not found]             ` <BY3PR18MB473794E01049EC94156E2858C6859@BY3PR18MB4737.namprd18.prod.outlook.com>
2021-10-27 22:24               ` Ido Schimmel [this message]
2021-10-28 12:18                 ` sundeep subbaraya
2021-10-28 13:51                   ` Ido Schimmel
2021-10-30  7:25                     ` sundeep subbaraya
2021-11-07  9:21                       ` Ido Schimmel
2021-11-08 15:54                         ` Jakub Kicinski
2021-11-11 14:51                           ` Ido Schimmel
2021-11-11 16:47                             ` Jakub Kicinski
2021-11-14  8:38                               ` Ido Schimmel
2021-11-15  4:19                                 ` Roopa Prabhu
2021-11-15 15:11                                   ` Jakub Kicinski
2021-11-19 10:47                                     ` sundeep subbaraya
2021-11-19 14:09                                       ` Jakub Kicinski
2021-11-19 14:26                                         ` sundeep subbaraya
2021-11-19 14:49                                           ` Jakub Kicinski
2021-10-27 10:31 ` [net-next PATCH 2/2] devlink: add documentation for octeontx2 driver Subbaraya Sundeep
2021-10-27 15:39   ` Jakub Kicinski
     [not found]     ` <PH0PR18MB46711B24C7305B8488266C8CA1859@PH0PR18MB4671.namprd18.prod.outlook.com>
2021-10-27 17:04       ` Fw: [EXT] " sundeep subbaraya

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=YXnRup1EJaF5Gwua@shredder \
    --to=idosch@idosch.org \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rsaladi2@marvell.com \
    --cc=saeed@kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sundeep.lkml@gmail.com \
    /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