netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Ivan Vecera <ivecera@redhat.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org, grygorii.strashko@ti.com,
	ivan.khoronzhuk@linaro.org, nsekhar@ti.com, jiri@resnulli.us,
	francois.ozog@linaro.org, yogeshs@ti.com, spatton@ti.com,
	Jose.Abreu@synopsys.com
Subject: Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver
Date: Thu, 21 Jun 2018 15:45:52 +0300	[thread overview]
Message-ID: <20180621124552.GA15208@apalos> (raw)
In-Reply-To: <033dd1bc-0401-a058-5283-4938ac39f701@redhat.com>

On Thu, Jun 21, 2018 at 02:19:55PM +0200, Ivan Vecera wrote:
> On 20.6.2018 20:03, Ilias Apalodimas wrote:
> > Hi Florian,
> > 
> > On Wed, Jun 20, 2018 at 10:58:26AM -0700, Florian Fainelli wrote:
> >> On 06/20/2018 10:51 AM, Ilias Apalodimas wrote:
> >>> Hello Ivan,
> >>> On Wed, Jun 20, 2018 at 02:56:48PM +0200, Ivan Vecera wrote:
> >>>> On 18.6.2018 22:19, Ilias Apalodimas wrote:
> >>>>> Jiri proposed using devlink, which makes sense, but i am not sure it's
> >>>>> applicable on this patchset. This will change the driver completely and will
> >>>>> totally break backwards compatibility.
> >>>>
> >>>> Another good reason for a new driver.
> >>>>
> >>>> I.
> >>> This is actually conflicting at least to my understanding. Jiri proposed using 
> >>> devlink was used as an alternative method to enable a new mode instead of 
> >>> adding it on a .config option. A new driver wouldn't have a need for that right?
> >>
> >> Correct, with a new driver would likely behave correctly upon being
> >> probed such that you could have your switch ports act as normal network
> >> devices from which you could run IP-config and do NFS boot.
> > The current driver also does NFS properly and the 2 ethernet ports act as normal
> > network interfaces. The NFS section in the cover letter
> > is to cover the cases were users running on NFS need to change the running
> > switch configuration(starting from adding the 2 interfaces on a bridge). 
> > Since iproute2 is located on the NFS filesystem the moment
> > network connectivity is lost, you loose the ability to perform further
> > configuration and in certian configuration scenarios render the device
> > unusable.
> 
> Yes, with a new driver you can drop NFS-boot hack you mentioned in cover letter.
> All configuration is done during driver probe and thus prior NFS mount. Only
> thing you loose with a new driver is backward compatibility but the question is:
> DO you really need it?
Ok i think there's a bit of confusion here. I'll try to clarify it. 
There is no NFS hack for the current driver or ever was. Whether you use
.config/DTS/devlink/module param method for configuration this is strictly for
configuration. The driver (via .config currently) correctly
registers and initializes everything it needs to work. NFS boots fine without
using anything from that script.
The whole script is not there to boot up the device.  The script is there to 
help any potential testing that has to be done *via* NFS and the user has to
reconfigure the switch for his testcases.
Since you need to add the 2 interfaces in a bridge and start the switch
configuration, the moment you do that you loose your network access, thus all
the commands you need for configuration. This is why you need to chroot to do
that. I don't see how writing a new driver will change that.

The driver is currently widely used and that's the reason we tried to avoid
rewriting it. The current driver uses a DTS option to distinguish between two
existing modes. This patch just adds a third one. So to my understanding we
have the following options:
1. The driver already uses DTS to configure the hardware mode. Although this is
techincally wrong, we can add a third mode on DTS called 'switchdev;', get rid
of the .config option and keep the configuration method common (although not
optimal).
2. Keep the .config option which overrides the 2 existing modes. 
3. Introduce a devlink option. If this is applied for all 3 modes, it will break
backwards compatibility, so it's not an option. If it's introduced for
configuring 'switchdev' mode only, we fall into the same pitfall as option 2),
we have something that overrides our current config, slightly better though
since it's not a compile time option.
4. rewrite the driver 

If it was a brand new driver, i'd definitely pick 4. Since it's a pre-existing
driver though i can't rule out the rest of the options. 

Regards
Ilias

  reply	other threads:[~2018-06-21 12:45 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 11:11 [RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW Ilias Apalodimas
2018-06-14 11:11 ` [RFC v2, net-next, PATCH 1/4] net/cpsw: move common headers definitions to cpsw_priv.h Ilias Apalodimas
2018-06-14 11:11 ` [RFC v2, net-next, PATCH 2/4] net/cpsw_ale: add functions to modify VLANs/MDBs Ilias Apalodimas
2018-06-14 11:11 ` [RFC v2, net-next, PATCH 3/4] net/cpsw: prepare cpsw for switchdev support Ilias Apalodimas
2018-06-14 11:11 ` [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver Ilias Apalodimas
2018-06-14 11:23   ` Jiri Pirko
2018-06-14 11:32     ` Ilias Apalodimas
2018-06-14 11:30   ` Jiri Pirko
2018-06-14 11:34     ` Ilias Apalodimas
2018-06-14 11:39       ` Jiri Pirko
2018-06-14 11:43         ` Ilias Apalodimas
2018-06-18 23:19           ` Grygorii Strashko
2018-06-20  7:08             ` Jiri Pirko
2018-06-20 12:53               ` Ivan Vecera
2018-06-20 12:59                 ` Ilias Apalodimas
2018-06-20 13:54                   ` Ivan Vecera
2018-06-18 16:16   ` Andrew Lunn
2018-06-18 20:19     ` Ilias Apalodimas
2018-06-18 23:20       ` Grygorii Strashko
2018-06-20 12:56       ` Ivan Vecera
2018-06-20 17:51         ` Ilias Apalodimas
2018-06-20 17:57           ` Andrew Lunn
2018-06-20 17:58           ` Florian Fainelli
2018-06-20 18:03             ` Ilias Apalodimas
2018-06-21 12:19               ` Ivan Vecera
2018-06-21 12:45                 ` Ilias Apalodimas [this message]
2018-06-21 15:31                   ` Arnd Bergmann
2018-06-22  7:45                     ` Ilias Apalodimas
2018-06-27 19:18                       ` Grygorii Strashko
2018-06-27 20:40                         ` Arnd Bergmann
2018-06-27 23:03                           ` Grygorii Strashko
2018-06-28  7:53                             ` Arnd Bergmann
2018-06-18 15:04 ` [RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW Andrew Lunn
2018-06-18 16:04   ` Ilias Apalodimas
2018-06-18 16:28     ` Andrew Lunn
2018-06-18 16:46       ` Ilias Apalodimas
2018-06-18 17:30         ` Andrew Lunn
2018-06-18 17:49           ` Ilias Apalodimas
2018-06-27 21:05             ` Grygorii Strashko

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=20180621124552.GA15208@apalos \
    --to=ilias.apalodimas@linaro.org \
    --cc=Jose.Abreu@synopsys.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=francois.ozog@linaro.org \
    --cc=grygorii.strashko@ti.com \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=spatton@ti.com \
    --cc=yogeshs@ti.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;
as well as URLs for NNTP newsgroup(s).