Re: switchdev and dsa

2018-03-24 Thread Andrew Lunn
> 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


Re: switchdev and dsa

2018-03-24 Thread Ran Shalit
On Sat, Mar 24, 2018 at 11:51 PM, Andrew Lunn <and...@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 <and...@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


Re: switchdev and dsa

2018-03-24 Thread Andrew Lunn
On Sat, Mar 24, 2018 at 11:35:38PM +0300, Ran Shalit wrote:
> On Sat, Mar 24, 2018 at 10:02 PM, Andrew Lunn <and...@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


Re: switchdev and dsa

2018-03-24 Thread Ran Shalit
On Sat, Mar 24, 2018 at 10:02 PM, Andrew Lunn <and...@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


Re: switchdev and dsa

2018-03-24 Thread Andrew Lunn
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


switchdev and dsa

2018-03-24 Thread Ran Shalit
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