From: Andrew Lunn <andrew@lunn.ch>
To: Rafa?? Mi??ecki <zajec5@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Andy Gospodarek <gospo@cumulusnetworks.com>,
"David S. Miller" <davem@davemloft.net>,
Network Development <netdev@vger.kernel.org>,
Jonas Gorski <jogo@openwrt.org>,
Hauke Mehrtens <hauke@hauke-m.de>,
Felix Fietkau <nbd@openwrt.org>, Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH] net: phy: b53: switchdev driver for Broadcom BCM53xx switches
Date: Thu, 26 Feb 2015 17:21:47 +0100 [thread overview]
Message-ID: <20150226162147.GF8806@lunn.ch> (raw)
In-Reply-To: <CACna6rxsu8Dmzm8wy9c50=qT7te8Du0Rg27N8BN8-M6h06uLMw@mail.gmail.com>
On Thu, Feb 26, 2015 at 04:49:51PM +0100, Rafa?? Mi??ecki wrote:
> On 26 February 2015 at 16:36, Andrew Lunn <andrew@lunn.ch> wrote:
> >> It doesn't really answer my question as I don't see functionality I'm
> >> looking for in bcm_sf2. I don't see it handling (un)tagging or PVID
> >> anywhere. It makes me believe such features are not implemented (and
> >> not configurable) using bridges/dsa at all. Can you any API related to
> >> untagging / PVID?
> >
> > The (un)tagging code is in net/dsa/tag_brcm.c This is generic code, so
> > you would not expect to find it in bcm_sf2. All you need to do is set
> >
> > .tag_protocol = DSA_TAG_PROTO_BRCM,
> >
> > in your dsa_switch_driver structure and the core DSA code will ensure
> > the packets gets the header applied/removed.
>
> Sorry, I wasn't clear enough. I don't mean Broadcom proto tagging, but
> a 802.1Q VLAN header including e.g. VID.
>
> I'd like to have control over VLAN ID ports are using. The hardware
> allows me to define VLAN with a number and also if:
> 1) Packets incoming on port X should be modified (by hw) to include
> 802.11Q header
> 2) Packets leaving port Y should be stripped out of 802.11Q header or not
>
> Above allows me to create some fun setups. For example I can configure
> my Linux interface to send packets with VID N. Then I can tell
> hardware to:
> 1) Send packets with VID N untagged to port 1
> 2) Send packets with VID N still tagged to port 2
Ah, O.K.
DSA does not allow that, at the moment. The Marvell switches do
however support this. So i expect at some point it will get added.
This is actually a layer or two up. First you need plain packets
without 802.11q supported. Then you can add 802.11q on top of that,
using standard linux concepts. Then we can add ingress/egress VLAN tag
stripping/adding. This last part is maybe a new concept with linux,
since it is something we want in general, and not just when using the
SW bridge.
So lets say you have DSA slave interfaces lan1 and lan2
You could then do
vconfig add lan1 42 --strip
vconfig add lan2 42
You could then add these lan1:42 and lan2:42 interfaces to the bridge
to get what you want?
Andrew
next prev parent reply other threads:[~2015-02-26 16:24 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 17:42 [PATCH] net: phy: b53: switchdev driver for Broadcom BCM53xx switches Rafał Miłecki
2015-02-24 17:47 ` Rafał Miłecki
2015-02-24 21:51 ` Andrew Lunn
2015-02-24 22:29 ` Rafał Miłecki
2015-02-25 0:51 ` Andrew Lunn
2015-02-24 22:30 ` Andy Gospodarek
2015-02-24 22:50 ` Rafał Miłecki
2015-02-24 22:55 ` Florian Fainelli
2015-02-25 0:15 ` Andrew Lunn
2015-02-25 0:39 ` Florian Fainelli
2015-02-25 7:03 ` Rafał Miłecki
2015-02-25 8:07 ` Jiri Pirko
2015-02-25 14:03 ` Andrew Lunn
2015-02-25 14:17 ` Rafał Miłecki
2015-02-25 14:19 ` Andrew Lunn
2015-02-26 14:58 ` Rafał Miłecki
2015-02-26 15:18 ` Andrew Lunn
2015-02-26 15:30 ` Rafał Miłecki
2015-02-26 15:36 ` Andrew Lunn
2015-02-26 15:49 ` Rafał Miłecki
2015-02-26 16:21 ` Andrew Lunn [this message]
2015-02-26 17:58 ` Florian Fainelli
2015-02-26 18:26 ` Scott Feldman
2015-02-26 17:57 ` Florian Fainelli
2015-02-25 15:46 ` Andy Gospodarek
2015-02-25 17:23 ` Rafał Miłecki
2015-02-25 21:56 ` Andrew Lunn
2015-02-26 0:53 ` Scott Feldman
2015-02-26 4:21 ` Andy Gospodarek
2015-02-26 6:47 ` Jiri Pirko
2015-02-26 7:14 ` B Viswanath
2015-02-26 14:13 ` Andy Gospodarek
2015-02-26 14:19 ` Scott Feldman
2015-02-26 14:44 ` Jiri Pirko
2015-02-27 22:21 ` David Miller
2015-02-26 17:52 ` Florian Fainelli
2015-02-26 17:51 ` Florian Fainelli
2015-02-25 6:44 ` Rafał Miłecki
2015-02-24 22:48 ` Florian Fainelli
2015-02-24 22:56 ` Rafał Miłecki
2015-02-24 22:59 ` Florian Fainelli
2015-02-25 2:10 ` David Miller
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=20150226162147.GF8806@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=gospo@cumulusnetworks.com \
--cc=hauke@hauke-m.de \
--cc=jiri@resnulli.us \
--cc=jogo@openwrt.org \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.org \
--cc=zajec5@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).