Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1344500

Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver (ESW)

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver (ESW)
Date 2016-02-26 18:40 +0100
Message-ID <r6uwX-6GL-39@gated-at.bofh.it> (permalink)
References <r6rz3-4yI-5@gated-at.bofh.it> <r6rz3-4yI-7@gated-at.bofh.it> <r6sls-5aU-5@gated-at.bofh.it> <r6trc-5Z1-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 26, 2016 at 05:25:38PM +0100, Felix Fietkau wrote:
> On 2016-02-26 16:18, Andrew Lunn wrote:
> > On Fri, Feb 26, 2016 at 03:21:35PM +0100, John Crispin wrote:
> >> The ESW is found in many of the old 100mbit MIPS based SoCs. it has 5
> >> external ports, 1 cpu port and 1 further port that the internal HW
> >> offloading engine connects to.
> >> 
> >> This driver is very basic and only provides basic init and irq support.
> >> The SoC and switch core both have support for a special tag making DSA
> >> support possible.
> > 
> > Hi Crispin
> > 
> > There was recently a discussion about adding switches without using
> > DSA or switchdev. It was pretty much decided we would not accept such
> > drivers.
> For exactly this reason, the code does not provide any non-standard API
> for allowing the user to configure the switch. The hardware needs to be
> programmed with some defaults for the driver to be functional (since the
> switch logic is built into the SoC).
>
> 
> In my opinion, leaving this part out does not make much sense and
> neither does deferring the entire patch series until we have a
> switchdev/DSA capable driver. This is just a starting point, which will
> be turned into a proper driver with the right APIs later.

You are however introducing APIs which become things you need to
support. Your device tree binding for example. The device tree
maintainers consider this a stable API you need to maintain forever.
Can you guarantee that you can maintain this binding, and also support
the DSA binding? How messy is it going to make your code supporting
two bindings?

You currently have one netdev interface for five switch ports. When
you have a DSA driver, you have 5 additional netdev interfaces, one
per port, and your original interface is now unusable. Isn't that an
API change.

You need to find incremental steps towards a switchdev/DSA driver
which are not going to hinder you in the long run.

    Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 03/12] net-next: mediatek: add embedded switch driver (ESW) John Crispin <blogic@openwrt.org> - 2016-02-26 15:30 +0100
  Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver  (ESW) Andrew Lunn <andrew@lunn.ch> - 2016-02-26 16:20 +0100
    Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver  (ESW) John Crispin <blogic@openwrt.org> - 2016-02-26 16:30 +0100
      Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver  (ESW) Andrew Lunn <andrew@lunn.ch> - 2016-02-26 18:10 +0100
        Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch  driver (ESW) David Miller <davem@davemloft.net> - 2016-02-26 18:50 +0100
      Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch  driver (ESW) David Miller <davem@davemloft.net> - 2016-02-26 18:40 +0100
      Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver  (ESW) Florian Fainelli <f.fainelli@gmail.com> - 2016-02-26 19:40 +0100
    Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver  (ESW) Felix Fietkau <nbd@openwrt.org> - 2016-02-26 17:30 +0100
      Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch driver  (ESW) Andrew Lunn <andrew@lunn.ch> - 2016-02-26 18:40 +0100
      Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch  driver (ESW) David Miller <davem@davemloft.net> - 2016-02-26 18:50 +0100
    Re: [PATCH V2 03/12] net-next: mediatek: add embedded switch  driver (ESW) David Miller <davem@davemloft.net> - 2016-02-26 18:40 +0100

csiph-web