netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ran Shalit <ranshalit@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: marvell switch
Date: Thu, 5 Apr 2018 14:22:23 +0200	[thread overview]
Message-ID: <20180405122223.GC12178@lunn.ch> (raw)
In-Reply-To: <CAJ2oMh+binZ1QhEUfnHxU5TVfhCT1FPuiWCyAwyxxzcxEUn5Gg@mail.gmail.com>

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

  reply	other threads:[~2018-04-05 12:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05  2:47 marvell switch Ran Shalit
2018-04-05 12:22 ` Andrew Lunn [this message]
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

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=20180405122223.GC12178@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --cc=ranshalit@gmail.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 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).