From: Florian Fainelli <f.fainelli@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>, "Andrew Lunn" <andrew@lunn.ch>
Cc: 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 09:58:46 -0800 [thread overview]
Message-ID: <54EF5ED6.6000904@gmail.com> (raw)
In-Reply-To: <CACna6rxsu8Dmzm8wy9c50=qT7te8Du0Rg27N8BN8-M6h06uLMw@mail.gmail.com>
On 26/02/15 07:49, 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
>
> I don't see any way to achieve that with dsa. On the other hand this
> is what my proposed b53 driver allows. I could achieve above setup
> using:
> bridge vlan add vid N dev sw0p1 pvid untagged
> bridge vlan add vid N dev sw0p2
> bridge vlan add vid N dev sw0p8
>
What we are currently missing today in DSA, which is on my TODO list as
well, is to add support for precisely this, using the existing:
ndo_add_vlan_rx_add_vid, ndo_vlan_rx_kill_vid, ndo_bridge_getlink and
ndo_bridge_setlink. Essentialy the same thing same your driver does,
just one level above, at the DSA layer, so we can have all DSA drivers
advertise/report that feature.
--
Florian
next prev parent reply other threads:[~2015-02-26 17:59 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
2015-02-26 17:58 ` Florian Fainelli [this message]
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=54EF5ED6.6000904@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--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).