This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
When using Native Driver, the verification of the TAS function using CPSW9G alone is normal. However, if you use the CPSW9G Switch-Mode, whether it is Mac Bridge or Vlan Bridge, the packets cannot send from the designated queue。
Hi,
Can you share the SDK version you are using and scripts/applications you run when you receive the error.
Regards,
Tanmay
hi,
My sdk version is sdk8.5 ,below is my operating environment, where T is a VM product board, VH and VM are the development board:
On the VH board, I ran the following script,
#!/bin/sh ifconfig eth4 down ifconfig eth1 down ifconfig eth2 down ifconfig eth3 down ethtool -L eth2 tx 3 ethtool -L eth3 tx 3 sleep 10 ethtool --set-priv-flags eth2 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 eth2 up ip link set dev eth3 up sleep 5 ip link set dev eth2 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 402 pvid untagged self bridge vlan add dev eth2 vid 402 master bridge vlan add dev eth3 vid 402 master phc2sys -s clock_realtime -c eth2 -m -O 0 > /dev/null & phc2sys -s clock_realtime -c eth3 -m -O 0 > /dev/null & tc qdisc replace dev eth2 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 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
On the VM board, I ran the following script,
ip link add link eth0 name eth0.402 type vlan id 402
sleep 3
ifconfig eth0.402 192.168.5.111
while true; do ./plget -m rx-lat -f ipgap -n 128 -i eth0.402 -t udp -u 5003 ; done
On the T board, I ran the following script,
ifconfig eth1 192.168.5.90
./plget -i eth1 -m pkt-gen -t udp -u 5003 -a 192.168.5.111 -n 128 -l 80
The picture below is the receiving result,The results show that eth3 realizes the TAS function。
Then I continue to run on the VH as follows script:
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
When I sends a message on the T board again, the result is as follows
According to my expectations, the larger time interval in the result should be 300us instead of 600us。
Please tell me where there is a problem!
thanks!
Dear Ruiqing,
Please check the script you are using, could you help check not using Vlan and see if it helps.
BR
Sikai
Dear SiKai,
could you help check not using Vlan and see if it helps.
I have tried,I have tried it, the following is the script.
ifconfig eth3 down ethtool -L eth2 tx 4 ethtool -L eth3 tx 4 ethtool --set-priv-flags eth2 p0-rx-ptype-rrobin off ethtool --set-priv-flags eth3 p0-rx-ptype-rrobin off sleep 10 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 eth2 up ip link set dev eth3 up sleep 5 ip link set dev eth2 master br0 ip link set dev eth3 master br0 ip link set dev br0 up phc2sys -s clock_realtime -c eth2 -m -O 0 > /dev/null & phc2sys -s clock_realtime -c eth3 -m -O 0 > /dev/null & tc qdisc replace dev eth2 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 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
Other processes are the same as before.
The following is the result of running, it still does not look effective.
Dear Rui qing,
We think this is due to two eth interface and the traffic goes through a longer path.
BR
Sikai
Dear SiKai,
The board cards are directly connected through the network cable,I think the 600us time above is the interval of 400+200,The phenomenon looks more like flowing filtering are not effective.
If the flow filtration takes effect, I think the time interval will become 300us.
Hi,
The traffic might not be falling into correct queues. This is causing the all the traffic to be sent from queue0 which can explain this behaviour.
To check this, can you share the output of :
Then I continue to run on the VH as follows script:
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
When I sends a message on the T board again, the result is as follows
In the above case, are you sending packets from VM or VH?
Regards,
Tanmay
hi,
sorry for the delay
The following is the information of ETH2 and ETH3
root@j784s4-evm:~/rqyang/tas_script/VH/mac_bridge_tas# ethtool -S eth2 NIC statistics: p0_rx_good_frames: 156 p0_rx_broadcast_frames: 25 p0_rx_multicast_frames: 131 p0_rx_crc_errors: 0 p0_rx_oversized_frames: 0 p0_rx_undersized_frames: 0 p0_ale_drop: 1 p0_ale_overrun_drop: 0 p0_rx_octets: 24920 p0_tx_good_frames: 4 p0_tx_broadcast_frames: 1 p0_tx_multicast_frames: 3 p0_tx_octets: 624 p0_tx_64B_frames: 4 p0_tx_65_to_127B_frames: 88 p0_tx_128_to_255B_frames: 42 p0_tx_256_to_511B_frames: 26 p0_tx_512_to_1023B_frames: 0 p0_tx_1024B_frames: 0 p0_net_octets: 25544 p0_rx_bottom_fifo_drop: 0 p0_rx_port_mask_drop: 1 p0_rx_top_fifo_drop: 0 p0_ale_rate_limit_drop: 0 p0_ale_vid_ingress_drop: 32 p0_ale_da_eq_sa_drop: 0 p0_ale_block_drop: 0 p0_ale_secure_drop: 0 p0_ale_auth_drop: 0 p0_ale_unknown_ucast: 0 p0_ale_unknown_ucast_bytes: 0 p0_ale_unknown_mcast: 48 p0_ale_unknown_mcast_bytes: 5904 p0_ale_unknown_bcast: 0 p0_ale_unknown_bcast_bytes: 0 p0_ale_pol_match: 0 p0_ale_pol_match_red: 0 p0_ale_pol_match_yellow: 0 p0_ale_mcast_sa_drop: 0 p0_ale_dual_vlan_drop: 0 p0_ale_len_err_drop: 0 p0_ale_ip_next_hdr_drop: 0 p0_ale_ipv4_frag_drop: 0 p0_tx_mem_protect_err: 0 p0_tx_pri0: 4 p0_tx_pri1: 0 p0_tx_pri2: 0 p0_tx_pri3: 0 p0_tx_pri4: 0 p0_tx_pri5: 0 p0_tx_pri6: 0 p0_tx_pri7: 0 p0_tx_pri0_bcnt: 624 p0_tx_pri1_bcnt: 0 p0_tx_pri2_bcnt: 0 p0_tx_pri3_bcnt: 0 p0_tx_pri4_bcnt: 0 p0_tx_pri5_bcnt: 0 p0_tx_pri6_bcnt: 0 p0_tx_pri7_bcnt: 0 p0_tx_pri0_drop: 0 p0_tx_pri1_drop: 0 p0_tx_pri2_drop: 0 p0_tx_pri3_drop: 0 p0_tx_pri4_drop: 0 p0_tx_pri5_drop: 0 p0_tx_pri6_drop: 0 p0_tx_pri7_drop: 0 p0_tx_pri0_drop_bcnt: 0 p0_tx_pri1_drop_bcnt: 0 p0_tx_pri2_drop_bcnt: 0 p0_tx_pri3_drop_bcnt: 0 p0_tx_pri4_drop_bcnt: 0 p0_tx_pri5_drop_bcnt: 0 p0_tx_pri6_drop_bcnt: 0 p0_tx_pri7_drop_bcnt: 0 rx_good_frames: 526 rx_broadcast_frames: 8 rx_multicast_frames: 0 rx_pause_frames: 0 rx_crc_errors: 0 rx_align_code_errors: 0 rx_oversized_frames: 0 rx_jabber_frames: 0 rx_undersized_frames: 0 rx_fragments: 0 ale_drop: 0 ale_overrun_drop: 0 rx_octets: 45950 tx_good_frames: 113 tx_broadcast_frames: 13 tx_multicast_frames: 81 tx_pause_frames: 0 tx_deferred_frames: 0 tx_collision_frames: 0 tx_single_coll_frames: 0 tx_mult_coll_frames: 0 tx_excessive_collisions: 0 tx_late_collisions: 0 rx_ipg_error: 0 tx_carrier_sense_errors: 0 tx_octets: 16830 tx_64B_frames: 12 tx_65_to_127B_frames: 578 tx_128_to_255B_frames: 29 tx_256_to_511B_frames: 20 tx_512_to_1023B_frames: 0 tx_1024B_frames: 0 net_octets: 62780 rx_bottom_fifo_drop: 0 rx_port_mask_drop: 0 rx_top_fifo_drop: 33 ale_rate_limit_drop: 0 ale_vid_ingress_drop: 0 ale_da_eq_sa_drop: 0 ale_block_drop: 0 ale_secure_drop: 0 ale_auth_drop: 0 ale_unknown_ucast: 0 ale_unknown_ucast_bytes: 0 ale_unknown_mcast: 0 ale_unknown_mcast_bytes: 0 ale_unknown_bcast: 6 ale_unknown_bcast_bytes: 1814 ale_pol_match: 0 ale_pol_match_red: 0 ale_pol_match_yellow: 0 ale_mcast_sa_drop: 0 ale_dual_vlan_drop: 0 ale_len_err_drop: 0 ale_ip_next_hdr_drop: 0 ale_ipv4_frag_drop: 0 iet_rx_assembly_err: 0 iet_rx_assembly_ok: 0 iet_rx_smd_err: 0 iet_rx_frag: 0 iet_tx_hold: 0 iet_tx_frag: 0 tx_mem_protect_err: 0 tx_pri0: 94 tx_pri1: 6 tx_pri2: 8 tx_pri3: 5 tx_pri4: 0 tx_pri5: 0 tx_pri6: 0 tx_pri7: 0 tx_pri0_bcnt: 13970 tx_pri1_bcnt: 1032 tx_pri2_bcnt: 1260 tx_pri3_bcnt: 500 tx_pri4_bcnt: 0 tx_pri5_bcnt: 0 tx_pri6_bcnt: 0 tx_pri7_bcnt: 0 tx_pri0_drop: 0 tx_pri1_drop: 0 tx_pri2_drop: 0 tx_pri3_drop: 0 tx_pri4_drop: 0 tx_pri5_drop: 0 tx_pri6_drop: 0 tx_pri7_drop: 0 tx_pri0_drop_bcnt: 0 tx_pri1_drop_bcnt: 0 tx_pri2_drop_bcnt: 0 tx_pri3_drop_bcnt: 0 tx_pri4_drop_bcnt: 0 tx_pri5_drop_bcnt: 0 tx_pri6_drop_bcnt: 0 tx_pri7_drop_bcnt: 0 root@j784s4-evm:~/rqyang/tas_script/VH/mac_bridge_tas# ethtool -S eth3 NIC statistics: p0_rx_good_frames: 156 p0_rx_broadcast_frames: 25 p0_rx_multicast_frames: 131 p0_rx_crc_errors: 0 p0_rx_oversized_frames: 0 p0_rx_undersized_frames: 0 p0_ale_drop: 1 p0_ale_overrun_drop: 0 p0_rx_octets: 24920 p0_tx_good_frames: 4 p0_tx_broadcast_frames: 1 p0_tx_multicast_frames: 3 p0_tx_octets: 624 p0_tx_64B_frames: 4 p0_tx_65_to_127B_frames: 88 p0_tx_128_to_255B_frames: 42 p0_tx_256_to_511B_frames: 26 p0_tx_512_to_1023B_frames: 0 p0_tx_1024B_frames: 0 p0_net_octets: 25544 p0_rx_bottom_fifo_drop: 0 p0_rx_port_mask_drop: 1 p0_rx_top_fifo_drop: 0 p0_ale_rate_limit_drop: 0 p0_ale_vid_ingress_drop: 32 p0_ale_da_eq_sa_drop: 0 p0_ale_block_drop: 0 p0_ale_secure_drop: 0 p0_ale_auth_drop: 0 p0_ale_unknown_ucast: 0 p0_ale_unknown_ucast_bytes: 0 p0_ale_unknown_mcast: 48 p0_ale_unknown_mcast_bytes: 5904 p0_ale_unknown_bcast: 0 p0_ale_unknown_bcast_bytes: 0 p0_ale_pol_match: 0 p0_ale_pol_match_red: 0 p0_ale_pol_match_yellow: 0 p0_ale_mcast_sa_drop: 0 p0_ale_dual_vlan_drop: 0 p0_ale_len_err_drop: 0 p0_ale_ip_next_hdr_drop: 0 p0_ale_ipv4_frag_drop: 0 p0_tx_mem_protect_err: 0 p0_tx_pri0: 4 p0_tx_pri1: 0 p0_tx_pri2: 0 p0_tx_pri3: 0 p0_tx_pri4: 0 p0_tx_pri5: 0 p0_tx_pri6: 0 p0_tx_pri7: 0 p0_tx_pri0_bcnt: 624 p0_tx_pri1_bcnt: 0 p0_tx_pri2_bcnt: 0 p0_tx_pri3_bcnt: 0 p0_tx_pri4_bcnt: 0 p0_tx_pri5_bcnt: 0 p0_tx_pri6_bcnt: 0 p0_tx_pri7_bcnt: 0 p0_tx_pri0_drop: 0 p0_tx_pri1_drop: 0 p0_tx_pri2_drop: 0 p0_tx_pri3_drop: 0 p0_tx_pri4_drop: 0 p0_tx_pri5_drop: 0 p0_tx_pri6_drop: 0 p0_tx_pri7_drop: 0 p0_tx_pri0_drop_bcnt: 0 p0_tx_pri1_drop_bcnt: 0 p0_tx_pri2_drop_bcnt: 0 p0_tx_pri3_drop_bcnt: 0 p0_tx_pri4_drop_bcnt: 0 p0_tx_pri5_drop_bcnt: 0 p0_tx_pri6_drop_bcnt: 0 p0_tx_pri7_drop_bcnt: 0 rx_good_frames: 52 rx_broadcast_frames: 0 rx_multicast_frames: 33 rx_pause_frames: 0 rx_crc_errors: 0 rx_align_code_errors: 0 rx_oversized_frames: 0 rx_jabber_frames: 0 rx_undersized_frames: 0 rx_fragments: 0 ale_drop: 14 ale_overrun_drop: 0 rx_octets: 6326 tx_good_frames: 570 tx_broadcast_frames: 20 tx_multicast_frames: 65 tx_pause_frames: 0 tx_deferred_frames: 0 tx_collision_frames: 0 tx_single_coll_frames: 0 tx_mult_coll_frames: 0 tx_excessive_collisions: 0 tx_late_collisions: 0 rx_ipg_error: 0 tx_carrier_sense_errors: 0 tx_octets: 55358 tx_64B_frames: 12 tx_65_to_127B_frames: 558 tx_128_to_255B_frames: 33 tx_256_to_511B_frames: 19 tx_512_to_1023B_frames: 0 tx_1024B_frames: 0 net_octets: 61684 rx_bottom_fifo_drop: 0 rx_port_mask_drop: 14 rx_top_fifo_drop: 0 ale_rate_limit_drop: 0 ale_vid_ingress_drop: 8 ale_da_eq_sa_drop: 0 ale_block_drop: 0 ale_secure_drop: 0 ale_auth_drop: 0 ale_unknown_ucast: 0 ale_unknown_ucast_bytes: 0 ale_unknown_mcast: 28 ale_unknown_mcast_bytes: 4088 ale_unknown_bcast: 0 ale_unknown_bcast_bytes: 0 ale_pol_match: 0 ale_pol_match_red: 0 ale_pol_match_yellow: 0 ale_mcast_sa_drop: 0 ale_dual_vlan_drop: 0 ale_len_err_drop: 0 ale_ip_next_hdr_drop: 0 ale_ipv4_frag_drop: 0 iet_rx_assembly_err: 0 iet_rx_assembly_ok: 0 iet_rx_smd_err: 0 iet_rx_frag: 0 iet_tx_hold: 0 iet_tx_frag: 0 tx_mem_protect_err: 0 tx_pri0: 556 tx_pri1: 1 tx_pri2: 12 tx_pri3: 1 tx_pri4: 0 tx_pri5: 0 tx_pri6: 0 tx_pri7: 0 tx_pri0_bcnt: 53712 tx_pri1_bcnt: 90 tx_pri2_bcnt: 1432 tx_pri3_bcnt: 64 tx_pri4_bcnt: 0 tx_pri5_bcnt: 0 tx_pri6_bcnt: 0 tx_pri7_bcnt: 0 tx_pri0_drop: 33 tx_pri1_drop: 0 tx_pri2_drop: 0 tx_pri3_drop: 0 tx_pri4_drop: 0 tx_pri5_drop: 0 tx_pri6_drop: 0 tx_pri7_drop: 0 tx_pri0_drop_bcnt: 2772 tx_pri1_drop_bcnt: 0 tx_pri2_drop_bcnt: 0 tx_pri3_drop_bcnt: 0 tx_pri4_drop_bcnt: 0 tx_pri5_drop_bcnt: 0 tx_pri6_drop_bcnt: 0 tx_pri7_drop_bcnt: 0
In the above case, are you sending packets from VM or VH?
I used three boards,A VM board is used as sender,a VH board is used as TSN switch,a VM board is used as receiver.