netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* switchdev and dsa
@ 2018-03-24 16:12 Ran Shalit
  2018-03-24 19:02 ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Ran Shalit @ 2018-03-24 16:12 UTC (permalink / raw)
  To: netdev

Hello,

I am new with switchdev and dsa.
I would please like to ask if configuring a device tree/board file
with a switch (for example marvell switch) will provide all ports
behins the switch as valid interface (ethX) ports in userspace
ifconfig command ?

Thank you,
ranran

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: switchdev and dsa
  2018-03-24 16:12 switchdev and dsa Ran Shalit
@ 2018-03-24 19:02 ` Andrew Lunn
  2018-03-24 20:35   ` Ran Shalit
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2018-03-24 19:02 UTC (permalink / raw)
  To: Ran Shalit; +Cc: netdev

On Sat, Mar 24, 2018 at 07:12:15PM +0300, Ran Shalit wrote:
> Hello,
> 
> I am new with switchdev and dsa.
> I would please like to ask if configuring a device tree/board file
> with a switch (for example marvell switch) will provide all ports
> behins the switch as valid interface (ethX) ports in userspace
> ifconfig command ?

Hi Ranran

Yes, that is the idea.

https://www.netdevconf.org/2.1/session.html?lunn_didelot_fainelli

	Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: switchdev and dsa
  2018-03-24 19:02 ` Andrew Lunn
@ 2018-03-24 20:35   ` Ran Shalit
  2018-03-24 20:51     ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Ran Shalit @ 2018-03-24 20:35 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

On Sat, Mar 24, 2018 at 10:02 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Sat, Mar 24, 2018 at 07:12:15PM +0300, Ran Shalit wrote:
>> Hello,
>>
>> I am new with switchdev and dsa.
>> I would please like to ask if configuring a device tree/board file
>> with a switch (for example marvell switch) will provide all ports
>> behins the switch as valid interface (ethX) ports in userspace
>> ifconfig command ?
>
> Hi Ranran
>
> Yes, that is the idea.
>

I see that in marvell's switch, for example with managed cpu, all
ports are disabled.
Where in dsa driver the are the ports enabled ? I can't see it in
drivers. I use 88E6176.


> https://www.netdevconf.org/2.1/session.html?lunn_didelot_fainelli
>
>         Andrew

Hi Andrew,

Thanks a lot for the information and slides.

Ranran

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: switchdev and dsa
  2018-03-24 20:35   ` Ran Shalit
@ 2018-03-24 20:51     ` Andrew Lunn
  2018-03-24 21:11       ` Ran Shalit
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2018-03-24 20:51 UTC (permalink / raw)
  To: Ran Shalit; +Cc: netdev

On Sat, Mar 24, 2018 at 11:35:38PM +0300, Ran Shalit wrote:
> On Sat, Mar 24, 2018 at 10:02 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Sat, Mar 24, 2018 at 07:12:15PM +0300, Ran Shalit wrote:
> >> Hello,
> >>
> >> I am new with switchdev and dsa.
> >> I would please like to ask if configuring a device tree/board file
> >> with a switch (for example marvell switch) will provide all ports
> >> behins the switch as valid interface (ethX) ports in userspace
> >> ifconfig command ?
> >
> > Hi Ranran
> >
> > Yes, that is the idea.
> >
> 
> I see that in marvell's switch, for example with managed cpu, all
> ports are disabled.
> Where in dsa driver the are the ports enabled ? I can't see it in
> drivers. I use 88E6176.

You need to explain in more detail what you mean by a port being
enabled?

	Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: switchdev and dsa
  2018-03-24 20:51     ` Andrew Lunn
@ 2018-03-24 21:11       ` Ran Shalit
  2018-03-24 21:31         ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Ran Shalit @ 2018-03-24 21:11 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

On Sat, Mar 24, 2018 at 11:51 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Sat, Mar 24, 2018 at 11:35:38PM +0300, Ran Shalit wrote:
>> On Sat, Mar 24, 2018 at 10:02 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> > On Sat, Mar 24, 2018 at 07:12:15PM +0300, Ran Shalit wrote:
>> >> Hello,
>> >>
>> >> I am new with switchdev and dsa.
>> >> I would please like to ask if configuring a device tree/board file
>> >> with a switch (for example marvell switch) will provide all ports
>> >> behins the switch as valid interface (ethX) ports in userspace
>> >> ifconfig command ?
>> >
>> > Hi Ranran
>> >
>> > Yes, that is the idea.
>> >
>>
>> I see that in marvell's switch, for example with managed cpu, all
>> ports are disabled.
>> Where in dsa driver the are the ports enabled ? I can't see it in
>> drivers. I use 88E6176.
>
> You need to explain in more detail what you mean by a port being
> enabled?
>

I see in DS that bits 0-1 in port control register (offset 0x4) are
responsible for port enabled/disabled in switch.
But now I think I understand how it works.
I do see that  mv88e6123_61_65_setup() , do set these bits 0-1 to '1'
 (00- disabled, 11- forwarding)

Yet, I would like to ask one more question about it.
I use older kernel (2.6), because these is the Linux from provider chip (TI).
I did not find any example how to configure marvell switch  in board
file, but only in device tree. (we use 88E6176, but any other switch
example would help).
Is there an example maybe for this which someone can provide ?

Thanks again,
ranran
>         Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: switchdev and dsa
  2018-03-24 21:11       ` Ran Shalit
@ 2018-03-24 21:31         ` Andrew Lunn
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2018-03-24 21:31 UTC (permalink / raw)
  To: Ran Shalit; +Cc: netdev

> I use older kernel (2.6), because these is the Linux from provider chip (TI).

TI really only provides 2.6? I strongly suggest you choose a different
SoC vendor.

> Is there an example maybe for this which someone can provide ?

https://elixir.bootlin.com/linux/v2.6.39.4/source/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c

	Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-24 21:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-24 16:12 switchdev and dsa Ran Shalit
2018-03-24 19:02 ` Andrew Lunn
2018-03-24 20:35   ` Ran Shalit
2018-03-24 20:51     ` Andrew Lunn
2018-03-24 21:11       ` Ran Shalit
2018-03-24 21:31         ` Andrew Lunn

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).