public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Landen Chao <Landen.Chao@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	DENG Qingfang <dqfext@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Daniel Golle <daniel@makrotopia.org>
Subject: Re: [BUG] vlan-aware bridge breaks vlan on another port on same gmac
Date: Sun, 5 Feb 2023 15:59:15 +0200	[thread overview]
Message-ID: <20230205135915.thabi6b555lr7lrr@skbuf> (raw)
In-Reply-To: <trinity-757008e9-a0a8-4d44-8b0a-53efa718218e-1675604935206@3c-app-gmx-bs34> <trinity-757008e9-a0a8-4d44-8b0a-53efa718218e-1675604935206@3c-app-gmx-bs34>

Hi Frank,

On Sun, Feb 05, 2023 at 02:48:55PM +0100, Frank Wunderlich wrote:
> Hi,
> 
> sorry for the delay, i'm very busy recently :(
> 
> noticed that i missed 2 commands ("bridge vlan add vid ..." below)
> when testing the vlan-aware bridge...now both ports are working with
> vlan-tagging...the one inside (lan0) the bridge (lanbr0) and the one
> outside (wan).
> 
> BRIDGE=lanbr0
> netif=lan0
> vid=500
> #ip link add name ${BRIDGE} type bridge
> ip link add name ${BRIDGE} type bridge vlan_filtering 1 vlan_default_pvid 1
> ip link set ${BRIDGE} up
> ip link set $netif master ${BRIDGE}
> ip link set $netif up
> bridge vlan add vid $vid dev ${BRIDGE} self
> bridge vlan add vid $vid dev $netif
> 
> #extract vlan from bridge to own netdev
> ip link add link ${BRIDGE} name vlan$vid type vlan id $vid
> ip a a 192.168.110.5/24 dev vlan$vid
> ip link set vlan$vid up
> 
> btw can i see somehow if a bridge is vlan-aware (the flag itself)...
> "bridge vlan" command also lists non-vlan-aware bridges with vlan-id
> "1 pvid egress untagged"
> 
> so vladimir your last patch works well, thx for it. you can add my tested-by when upstreaming
> 
> regards Frank

Thanks for double-checking. I was wondering what could have been wrong
with the patch and just not seeing it.

You can see if a bridge is VLAN aware with "ip -d link show lanbr0".
Add "-j" to the list of arguments, and you get json output which you can
parse with jq if you need the info in a script or other program.

The software model of the Linux bridge is that where you can add, delete
and see VLANs on a bridge even if it is VLAN unaware. Those VLANs are
simply inactive until the bridge becomes VLAN aware.

I will send the patch today with your tested tag on it.

  reply	other threads:[~2023-02-05 13:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 16:45 [BUG] vlan-aware bridge breaks vlan on another port on same gmac Frank Wunderlich
2023-01-20 17:21 ` Vladimir Oltean
2023-01-20 23:34   ` [PATCH] mt7530 don't make the CPU port a VLAN user port kernel test robot
2023-01-21 12:11   ` Aw: Re: [BUG] vlan-aware bridge breaks vlan on another port on same gmac Frank Wunderlich
2023-01-21 12:22     ` Vladimir Oltean
2023-01-21 12:32       ` Aw: " Frank Wunderlich
2023-01-21 13:35         ` Vladimir Oltean
2023-01-21 14:12           ` Aw: " Frank Wunderlich
2023-01-30 12:58             ` Vladimir Oltean
2023-01-31 16:23               ` Aw: " Frank Wunderlich
2023-02-05 13:48                 ` Frank Wunderlich
2023-02-05 13:59                   ` Vladimir Oltean [this message]
2023-01-21 14:35           ` Frank Wunderlich
2023-01-30 13:01             ` Vladimir Oltean

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=20230205135915.thabi6b555lr7lrr@skbuf \
    --to=olteanv@gmail.com \
    --cc=Landen.Chao@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.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