All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>, Andrew Lunn <andrew@lunn.ch>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>,
	"David S. Miller" <davem@davemloft.net>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Joergen Andreasen <joergen.andreasen@microchip.com>,
	"Allan W. Nielsen" <allan.nielsen@microchip.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	netdev <netdev@vger.kernel.org>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net-next 15/15] net: mscc: ocelot: don't hardcode the number of the CPU port
Date: Sun, 10 Nov 2019 12:54:19 -0800	[thread overview]
Message-ID: <d99479d0-b5c2-bee2-73ff-7d9235840225@gmail.com> (raw)
In-Reply-To: <CA+h21hpg2a=V44R_YNBBxTP4jLMgQaHBzHXyqaMDhg9uBvtpAA@mail.gmail.com>



On 11/10/2019 9:33 AM, Vladimir Oltean wrote:
> On Sun, 10 Nov 2019 at 19:12, Andrew Lunn <andrew@lunn.ch> wrote:
>>
>> On Sun, Nov 10, 2019 at 07:00:33PM +0200, Vladimir Oltean wrote:
>>> On Sun, 10 Nov 2019 at 18:50, Andrew Lunn <andrew@lunn.ch> wrote:
>>>>
>>>> On Sat, Nov 09, 2019 at 03:03:01PM +0200, Vladimir Oltean wrote:
>>>>> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>>>>>
>>>>> VSC7514 is a 10-port switch with 2 extra "CPU ports" (targets in the
>>>>> queuing subsystem for terminating traffic locally).
>>>>
>>>> So maybe that answers my last question.
>>>>
>>>>> There are 2 issues with hardcoding the CPU port as #10:
>>>>> - It is not clear which snippets of the code are configuring something
>>>>>   for one of the CPU ports, and which snippets are just doing something
>>>>>   related to the number of physical ports.
>>>>> - Actually any physical port can act as a CPU port connected to an
>>>>>   external CPU (in addition to the local CPU). This is called NPI mode
>>>>>   (Node Processor Interface) and is the way that the 6-port VSC9959
>>>>>   (Felix) switch is integrated inside NXP LS1028A (the "local management
>>>>>   CPU" functionality is not used there).
>>>>
>>>> So i'm having trouble reading this and spotting the difference between
>>>> the DSA concept of a CPU port and the two extra "CPU ports". Maybe
>>>> using the concept of virtual ports would help?
>>>>
>>>> Are the physical ports number 0-9, and so port #10 is the first extra
>>>> "CPU port", aka a virtual port? And so that would not work for DSA,
>>>> where you need a physical port.
>>>>
>>>>       Andrew
>>>
>>> Right. See my other answer which links to Ocelot documentation.
>>
>> Yes, i'm getting the picture now.
>>
>> The basic problem is that in the Linux kernel CPU port has a specific
>> meaning, and it is clashing with the meaning used in the datasheet. So
>> maybe in the driver, we need to refer to these two ports as 'local
>> ports'?
>>
> 
> Hmm, I don't know. Both types of CPU ports lead to management CPUs,
> but to different types of them. I understand the clash with the DSA
> meaning, but even if I rename it I would have to provide an
> explanation relative to the datasheet definitions (and I already
> explain that the NPI mode is the DSA type of CPU port). I'm not sure
> there is a net gain.

Maybe we need to agree on renaming DSA's CPU port to "mgmt_port" or
something that indicates that there is in-band signaling to help support
the function of managing the switch, incidentally Broadcom switches call
their ports In-Band Management Port (IMP) which is clearer IMHO.
-- 
Florian

  reply	other threads:[~2019-11-10 20:54 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-09 13:02 [PATCH net-next 00/15] Accomodate DSA front-end into Ocelot Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 01/15] net: mscc: ocelot: break apart ocelot_vlan_port_apply Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 02/15] net: mscc: ocelot: break apart vlan operations into ocelot_vlan_{add,del} Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 03/15] net: mscc: ocelot: break out fdb operations into abstract implementations Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 04/15] net: mscc: ocelot: change prototypes of hwtstamping ioctls Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 05/15] net: mscc: ocelot: change prototypes of switchdev port attribute handlers Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 06/15] net: mscc: ocelot: refactor struct ocelot_port out of function prototypes Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 07/15] net: mscc: ocelot: separate net_device related items out of ocelot_port Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 08/15] net: mscc: ocelot: refactor ethtool callbacks Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 09/15] net: mscc: ocelot: limit vlan ingress filtering to actual number of ports Vladimir Oltean
2019-11-10 16:25   ` Andrew Lunn
2019-11-10 16:29     ` Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 10/15] net: mscc: ocelot: move port initialization into separate function Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 11/15] net: mscc: ocelot: separate the common implementation of ndo_open and ndo_stop Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 12/15] net: mscc: ocelot: initialize list of multicast addresses in common code Vladimir Oltean
2019-11-09 13:02 ` [PATCH net-next 13/15] net: mscc: ocelot: refactor adjust_link into a netdev-independent function Vladimir Oltean
2019-11-09 13:03 ` [PATCH net-next 14/15] net: mscc: ocelot: split assignment of the cpu port into a separate function Vladimir Oltean
2019-11-10 16:32   ` Andrew Lunn
2019-11-10 16:40     ` Vladimir Oltean
2019-11-10 16:50       ` Vladimir Oltean
2019-11-09 13:03 ` [PATCH net-next 15/15] net: mscc: ocelot: don't hardcode the number of the CPU port Vladimir Oltean
2019-11-10 16:50   ` Andrew Lunn
2019-11-10 17:00     ` Vladimir Oltean
2019-11-10 17:12       ` Andrew Lunn
2019-11-10 17:33         ` Vladimir Oltean
2019-11-10 20:54           ` Florian Fainelli [this message]
2019-11-12  0:53             ` Vladimir Oltean
2019-11-12  2:53               ` Andrew Lunn
2019-11-10 17:16 ` [PATCH net-next 00/15] Accomodate DSA front-end into Ocelot Andrew Lunn
2019-11-10 17:22   ` Vladimir Oltean
2019-11-11 12:10 ` Horatiu Vultur
2019-11-11 12:17   ` Vladimir Oltean
2019-11-11 20:59 ` David Miller

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=d99479d0-b5c2-bee2-73ff-7d9235840225@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=allan.nielsen@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=horatiu.vultur@microchip.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=joergen.andreasen@microchip.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.