* marvell switch
@ 2018-04-05 2:47 Ran Shalit
2018-04-05 12:22 ` Andrew Lunn
0 siblings, 1 reply; 8+ messages in thread
From: Ran Shalit @ 2018-04-05 2:47 UTC (permalink / raw)
To: netdev
Hello,
I am trying to use marvell switch in linux,
Is it that the kernel drivers from marvell switch are used just to
enable all ports, or do they also provide APIs to userspace to enable
specific ports only.
I have not find examples or wiki for marvell switch, so I am not too
sure as what are the drivers meant for.
Thank you,
ranran
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: marvell switch
2018-04-05 2:47 marvell switch Ran Shalit
@ 2018-04-05 12:22 ` Andrew Lunn
2018-04-05 15:59 ` Ran Shalit
[not found] ` <CAJ2oMhL4=ZrkGaTgTXU-oJFhZP==QDkO4fNSBaaTJF+NHnf9-g@mail.gmail.com>
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Lunn @ 2018-04-05 12:22 UTC (permalink / raw)
To: Ran Shalit; +Cc: netdev
On Thu, Apr 05, 2018 at 05:47:24AM +0300, Ran Shalit wrote:
> Hello,
>
> I am trying to use marvell switch in linux,
> Is it that the kernel drivers from marvell switch are used just to
> enable all ports, or do they also provide APIs to userspace to enable
> specific ports only.
> I have not find examples or wiki for marvell switch, so I am not too
> sure as what are the drivers meant for.
Hi Ran
The Marvell driver makes each port act like a normal Linux network
interface. So if you want to enable a port, do
ip link set lan0 up
Want to add an ip address to a port
ip addr add 10.42.42.42/24 dev lan0
Want to bridge two ports
ip link add name br0 type bridge
ip link set dev br0 up
ip link set dev lan0 master br0
ip link set dev lan1 master br0
Just treat them as normal interfaces.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: marvell switch
2018-04-05 12:22 ` Andrew Lunn
@ 2018-04-05 15:59 ` Ran Shalit
2018-04-05 16:09 ` Andrew Lunn
[not found] ` <CAJ2oMhL4=ZrkGaTgTXU-oJFhZP==QDkO4fNSBaaTJF+NHnf9-g@mail.gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: Ran Shalit @ 2018-04-05 15:59 UTC (permalink / raw)
To: Andrew Lunn; +Cc: netdev
On Thu, Apr 5, 2018 at 3:22 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Thu, Apr 05, 2018 at 05:47:24AM +0300, Ran Shalit wrote:
>> Hello,
>>
>> I am trying to use marvell switch in linux,
>> Is it that the kernel drivers from marvell switch are used just to
>> enable all ports, or do they also provide APIs to userspace to enable
>> specific ports only.
>> I have not find examples or wiki for marvell switch, so I am not too
>> sure as what are the drivers meant for.
>
> Hi Ran
>
> The Marvell driver makes each port act like a normal Linux network
> interface. So if you want to enable a port, do
>
> ip link set lan0 up
>
> Want to add an ip address to a port
>
> ip addr add 10.42.42.42/24 dev lan0
>
> Want to bridge two ports
>
> ip link add name br0 type bridge
> ip link set dev br0 up
> ip link set dev lan0 master br0
> ip link set dev lan1 master br0
>
> Just treat them as normal interfaces.
>
Is there a wiki which explains switch configuration ?
What does it mean that they are treated as normal interfaces ?
Is it possible to open socket and send/recieve on switch ports (lan0
for example) ?
My understanding is that these ports are not treated the same as eth0
interface for example.
Thanks for the assistance,
ranran
> Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread[parent not found: <CAJ2oMhL4=ZrkGaTgTXU-oJFhZP==QDkO4fNSBaaTJF+NHnf9-g@mail.gmail.com>]
* Re: marvell switch
[not found] ` <CAJ2oMhL4=ZrkGaTgTXU-oJFhZP==QDkO4fNSBaaTJF+NHnf9-g@mail.gmail.com>
@ 2018-04-05 20:46 ` Andrew Lunn
2018-04-06 7:23 ` Ran Shalit
2018-04-10 14:21 ` Ran Shalit
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Lunn @ 2018-04-05 20:46 UTC (permalink / raw)
To: Ran Shalit; +Cc: netdev
> > Hi Ran
> >
> > The Marvell driver makes each port act like a normal Linux network
> > interface. So if you want to enable a port, do
> >
> > ip link set lan0 up
> >
> > Want to add an ip address to a port
> >
> > ip addr add 10.42.42.42/24 dev lan0
> >
> > Want to bridge two ports
> >
> > ip link add name br0 type bridge
> > ip link set dev br0 up
> > ip link set dev lan0 master br0
> > ip link set dev lan1 master br0
> >
> > Just treat them as normal interfaces.
> >
>
> If I may please ask,
> What is the purpose of using bridge for configuring switch interfaces.
> Is it in order to isolate some ports from others?
> I ask because according to my understanding the default configuration of
> the driver is to enable switch in "flat" configuration, i.e. as if all
> ports are connected to each other.
Please think about what i said. They are standard Linux network
interfaces. Do standard Linux network interfaces bridge themselves
together by default? No, you need to configure a bridge.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: marvell switch
2018-04-05 20:46 ` Andrew Lunn
@ 2018-04-06 7:23 ` Ran Shalit
2018-04-10 14:21 ` Ran Shalit
1 sibling, 0 replies; 8+ messages in thread
From: Ran Shalit @ 2018-04-06 7:23 UTC (permalink / raw)
To: Andrew Lunn; +Cc: netdev
On Thu, Apr 5, 2018 at 11:46 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> > Hi Ran
>> >
>> > The Marvell driver makes each port act like a normal Linux network
>> > interface. So if you want to enable a port, do
>> >
>> > ip link set lan0 up
>> >
>> > Want to add an ip address to a port
>> >
>> > ip addr add 10.42.42.42/24 dev lan0
>> >
>> > Want to bridge two ports
>> >
>> > ip link add name br0 type bridge
>> > ip link set dev br0 up
>> > ip link set dev lan0 master br0
>> > ip link set dev lan1 master br0
>> >
>> > Just treat them as normal interfaces.
>> >
>>
>> If I may please ask,
>> What is the purpose of using bridge for configuring switch interfaces.
>> Is it in order to isolate some ports from others?
>> I ask because according to my understanding the default configuration of
>> the driver is to enable switch in "flat" configuration, i.e. as if all
>> ports are connected to each other.
>
> Please think about what i said. They are standard Linux network
> interfaces. Do standard Linux network interfaces bridge themselves
> together by default? No, you need to configure a bridge.
>
> Andrew
I understand now...
Thank you very much.
ranran
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: marvell switch
2018-04-05 20:46 ` Andrew Lunn
2018-04-06 7:23 ` Ran Shalit
@ 2018-04-10 14:21 ` Ran Shalit
1 sibling, 0 replies; 8+ messages in thread
From: Ran Shalit @ 2018-04-10 14:21 UTC (permalink / raw)
To: Andrew Lunn; +Cc: netdev
On Thu, Apr 5, 2018 at 11:46 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> > Hi Ran
>> >
>> > The Marvell driver makes each port act like a normal Linux network
>> > interface. So if you want to enable a port, do
>> >
>> > ip link set lan0 up
>> >
>> > Want to add an ip address to a port
>> >
>> > ip addr add 10.42.42.42/24 dev lan0
>> >
I would please like to ask one more about it, if I may.
I thought I understood it all, but seems not.
The switch ports are connected to other PCs (except for one port which
is connected to cpu).
What is therefore the purpose of adding ip address to such ports (the
ip is configured externally in PC).
Thank you for the time,
ranran
>> > Want to bridge two ports
>> >
>> > ip link add name br0 type bridge
>> > ip link set dev br0 up
>> > ip link set dev lan0 master br0
>> > ip link set dev lan1 master br0
>> >
>> > Just treat them as normal interfaces.
>> >
>>
>> If I may please ask,
>> What is the purpose of using bridge for configuring switch interfaces.
>> Is it in order to isolate some ports from others?
>> I ask because according to my understanding the default configuration of
>> the driver is to enable switch in "flat" configuration, i.e. as if all
>> ports are connected to each other.
>
> Please think about what i said. They are standard Linux network
> interfaces. Do standard Linux network interfaces bridge themselves
> together by default? No, you need to configure a bridge.
>
> Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-04-10 14:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-05 2:47 marvell switch Ran Shalit
2018-04-05 12:22 ` Andrew Lunn
2018-04-05 15:59 ` Ran Shalit
2018-04-05 16:09 ` Andrew Lunn
[not found] ` <CAJ2oMhL5APVabJuk9R6Bp17VpEg0HZqdkA88tNhajZumsB+f6g@mail.gmail.com>
2018-04-05 18:04 ` Andrew Lunn
[not found] ` <CAJ2oMhL4=ZrkGaTgTXU-oJFhZP==QDkO4fNSBaaTJF+NHnf9-g@mail.gmail.com>
2018-04-05 20:46 ` Andrew Lunn
2018-04-06 7:23 ` Ran Shalit
2018-04-10 14:21 ` Ran Shalit
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).