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 20:04:23 +0200 [thread overview]
Message-ID: <20180405180423.GC17495@lunn.ch> (raw)
In-Reply-To: <CAJ2oMhL5APVabJuk9R6Bp17VpEg0HZqdkA88tNhajZumsB+f6g@mail.gmail.com>
On Thu, Apr 05, 2018 at 05:26:37PM +0000, Ran Shalit wrote:
> בתאריך יום ה׳, 5 באפר׳ 2018, 19:09, מאת Andrew Lunn <andrew@lunn.ch>:
>
> > > Is there a wiki which explains switch configuration ?
> >
> > Nope. The whole idea is that they behave like normal linux
> > interfaces. So there is no need to document them. You already know how
> > to use them.
> >
> > > Is it possible to open socket and send/recieve on switch ports (lan0
> > > for example) ?
> >
> > Sure. It is as normal interface. Give is an IP address and then do
> > TCP/IP as usual.
> >
>
> There is something I don't fully understand.
> I thought that ports in switch which are not connected to the manage cpu
> are only configured by cpu and then can coomunicate with each other.
>
> What does it mean to open socket in such port (not the cpu port) and send
> data (ethernet frames) ? Does it mean that the cpu port is sending data
> directly to that port ?
The CPU port is configured to use {E}DSA tagging. Frames ingressing on
the CPU port contain an extra header. That header tells the switch
which port to send the frame out of. The switch can also send frames
received on a port out the CPU port to the host, again, with a
header. The host can tell from the header which port the frame
ingressed.
Using this, we can make ports look like normal Linux interfaces.
Andrew
next prev parent reply other threads:[~2018-04-05 18:04 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
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 [this message]
[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=20180405180423.GC17495@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).