Other Parts Discussed in Thread: TDA4VH
Hi experts,
I am currently using the TDA4VH development board with SDK 8.6.
I am using the switch mode under native driver and specifically using the k3-j784s4-quad-port-eth1-exp subboard.
I have encountered two issues.
Firstly, I am unable to recognize VLAN priority. I have tried using
“tc filter add dev eth0 egress protocol 802.1Q flower vlan_id 11 action skbedit priority 3”
as well as using the u32 matcher to match the byte where VLAN is located, but I still cannot successfully place the packets in the corresponding priority queue.
The second issue is that during the validation process, if I connect two boards using the two ports of cpsw9g, I am unable to use the tc filter to match packets.
However, if I connect the two switches using a bridge as shown in the diagram below, I can achieve the filtering functionality.
The commands I am using are as follows:
ifconfig eth0 down;
ifconfig eth1 down; ifconfig eth2 down; ifconfig eth3 down; ifconfig eth4 down;
ethtool -L eth0 tx 4;
ethtool -L eth3 tx 4
ethtool --set-priv-flags eth0 p0-rx-ptype-rrobin off
ethtool --set-priv-flags eth3 p0-rx-ptype-rrobin off
devlink dev param set platform/c000000.ethernet name switch_mode value true cmode runtime
ip link add name br0 type bridge
ip link set dev br0 type bridge ageing_time 1000
ip link set dev eth0 up; ip link set dev eth3 up
ip link set dev eth0 master br0; ip link set dev eth3 master br0
ip link set dev br0 up
ip link set dev br0 type bridge vlan_filtering 1
bridge vlan add dev br0 vid 1 pvid untagged self
tc qdisc replace dev eth3 parent root handle 100 taprio \
num_tc 3 map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@0 1@1 1@2 base-time 0 \
sched-entry S 4 400000 sched-entry S 2 200000 sched-entry S 1 100000 flags 2
tc qdisc add dev eth3 clsact
tc filter add dev eth3 egress protocol ip prio 1 u32 match ip dport 5003 0xffff action skbedit priority 3
I have verified that the configuration mentioned above is correct. However, when I replace cpsw2g's eth0 with cpsw9g's eth2, the functionality of tc filter disappears.
Why does the command tc filter add dev eth0 egress protocol 802.1Q
not have any effect and why does using two ports on the same switch cause the tc filter to become ineffective?
regards
yrq