TDA4VH-Q1: How to set the pvid of logical port and physical port?

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH

Tool/software:

Hi TIs,

We are using tda4vh SDK0900 linux native driver to test the vlan setting. The network topology is as follows:

The physical interface corresponding to eth1 is phy1. We add the physical interface eth1 to the logical interface br1 with the following command. The pvid of logical interface br1 is 11, while the pvid of logical interface eth1 is 20.

./devlink dev param set platform/c000000.ethernet name switch_mode value true cmode runtime

ip link add name br1 type bridge
ip link set dev eth1 up
ip link set dev eth1 master br1


bridge vlan add dev eth1 vid 20 pvid 20
bridge vlan add dev eth1 vid 5

bridge vlan add dev br1 vid 11 pvid self
ifconfig br1 up

If we send a packet without vlan tag through tda4vh_2, then this packet is tagged with vlan tag 20 according to eth1's pvid 20 of tda4vh_1. However, we found out through tcpdump that the vlan id of this packet is 11, which is also the pvid of br1. why does this packet have a vlan tag 20 according to eth1's pvid of tda4vh_1? Why is the vlan tag of this packet the pvid of br1?

Best Regards,
Ruijie