Tool/software:
Hi,
To keep the other thread (DRA829J: CPSW9G behaving like a hub - Processors forum - Processors - TI E2E support forums) separate, I start this new thread here.
In the latest TI documentation, to setup a bridge for CPSW9G in native ethernet mode, there are some commands I don't fully understand.
3.2.2.10.3.2.3.1. CPSWng Native Ethernet — Processor SDK Linux for TDA4VM Documentation
At the end of the setup are three mandatory steps (as indicated by [*]).
[*] ip link set dev br0 type bridge vlan_filtering 1 [*] bridge vlan add dev br0 vid 1 self [*] bridge vlan add dev br0 vid 1 pvid untagged self
Please correct me if I'm wrong. To me the documentation reads as: "you have to run every one of these commands in this exact order".
To me, the two last commands do more or less the same thing.
Add VID 1 to the bridge interface br0 (first command):
bridge vlan add dev br0 vid 1 self
Add VID 1 to the bridge interface br0, but also set VID 1 as PVID and untag packets with VID 1 on egress (second command):
bridge vlan add dev br0 vid 1 pvid untagged self
So both commands add VID 1 to br0. "pvid" and "untagged" are only options. Why do I have to run the first command first?
Why can't I just run
bridge vlan add dev br0 vid 1 pvid untagged self
?
This command alone will add VID 1 to br0. Just as the first command does. But it will also set up the additional flags.
Further down the documentation adds some explanation to the two commands:
<---- add VLAN as a Bridge Entry
<---- add cpu port to VLAN 1
But "pvid" and "untagged" are just additional option (as stated in the man pages bridge(8) - Linux manual page)
bridge vlan { add | del } dev DEV vid VID [ tunnel_info TUNNEL_ID ] [ pvid ] [ untagged ] [ self ] [ master ]
Is TI somehow using the fact, that the second command adds "pvid" and "untagged" to the command and does something different than when these options are missing?
What is the technical explanation that both commands are needed for CPSW9G?
Regards,
Matthias