Thread (42 messages) 42 messages, 8 authors, 2015-02-27

Re: [PATCH] net: phy: b53: switchdev driver for Broadcom BCM53xx switches

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2015-02-26 15:49:52

On 26 February 2015 at 16:36, Andrew Lunn [off-list ref] wrote:
quoted
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

-- 
Rafał
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help