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.

PROCESSOR-SDK-AM64X: TSN demonstration with AM64 GP EVMs

Part Number: PROCESSOR-SDK-AM64X

Hi,

I'm trying to TSN demo with for AM64GP EVMs.

I followed the below link to the demo

https://www.youtube.com/watch?v=MDrFPLGxIHs&ab_channel=TexasInstruments

I set the four AM64GP EVMs to act as a cut-through switch and they work well.  (the used processor SDK is 08.02.00.23)

However, I couldn't get the same real-time traffic performance which was performed in the reference video.

In the video, the priority packets are not interrupted by the background data, so 10.0Mbits/sec of bit-rate is maintained.

In my case, even though I set VLAN priority, I only get about 3Mbit/sec of bit-rate.

I captured two experiment results, real-time traffic without QoS and real-time traffic with QoS (VLAN).

1. Real-time traffic without QoS : Iperf3 bit-rate performance degraded (below1 Mbit/sec)

2. Real-time traffic with QoS (VLAN priority) :  Iperf3 bit-rate performance degraded  (below 3 Mbit/sec)

There was a performance enhancement  because of VLAN priority setting, but I expected 10 Mbits/sec of bit-rate of real-time traffic as the demo video showed.

How can I get the same TSN performance that the demo video showed?

Thank you in advance.

  • Hi,

    Can you share the exact commands you ran on each board and the VLAN usage with the iperf3 command. Based on the screenshots it looks like at some point in the LAN the netperf traffic uses the same tx queue as your background traffic.

    Also I suggest to approach this in layers, ignore the cut-thru for now as it won’t have any impact in bandwidth.

      Pekka

  • Thank you for the reply.

    Here are the commands I used.

    1.  Cut-through mode 

    -----------------------------------------------------------------------------------------

    ip link set dev eth0 down
    ip link set dev eth1 down

    ethtool -L eth0 tx 2
    ethtool -L eth1 tx 2
    ethtool --set-priv-flags eth0 p0-rx-ptype-rrobin off
    ethtool --set-priv-flags eth0 iet-frame-preemption on
    ethtool --set-priv-flags eth0 iet-mac-verify on
    ethtool --set-priv-flags eth1 p0-rx-ptype-rrobin off
    ethtool --set-priv-flags eth1 iet-frame-preemption on
    ethtool --set-priv-flags eth1 iet-mac-verify on

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

    echo 8 > /sys/kernel/debug/8000000.ethernet/Port1/cut_thru_rx_pri_mask
    echo 8 > /sys/kernel/debug/8000000.ethernet/Port1/cut_thru_tx_pri_mask
    echo 8 > /sys/kernel/debug/8000000.ethernet/Port2/cut_thru_rx_pri_mask
    echo 8 > /sys/kernel/debug/8000000.ethernet/Port2/cut_thru_tx_pri_mask

    ethtool --set-priv-flags eth0 cut-thru on
    ethtool --set-priv-flags eth1 cut-thru on

    -------------------------------------------------------------------------------------------------

    2. Switch function enabling code 

    ------------------------------------------------------------------------------------------------------

    ip link add name br0 type bridge
    ip link set dev br0 type bridge ageing_time 1000

    ip link set dev eth0 up
    sleep 1
    ip link set dev eth1 up
    sleep 1

    ip link set dev eth0 master br0
    ip link set dev eth1 master br0

    ip link set dev br0 type bridge stp_state 1

    ip link set dev br0 up

    bridge vlan add dev br0 vid 1 pvid untagged self

    brctl showstp br0

    udhcpc -i br0

    --------------------------------------------------------------------------------------------------------

    3. VLAN set command for central AM64 GP EVMs

    -------------------------------------------------------------------------------------------------------

    ip link add link br0 name br0.100 type vlan id 100
    sleep 1
    bridge vlan add dev br0 vid 100 self
    bridge vlan add dev eth0 vid 100
    bridge vlan add dev eth1 vid 100
    ip link set dev br0.100 up

    ------------------------------------------------------------------------------------------------------------

    4. VLAN set command for end point AM64 GP EVMs

    -----------------------------------------------------------------------------------------------------------

    ip link add link br0 name br0.100 type vlan id 100 egress-qos-map 0:3
    sleep 1
    bridge vlan add dev br0 vid 100 self
    bridge vlan add dev eth0 vid 100
    bridge vlan add dev eth1 vid 100
    ip link set dev br0.100 up

    -------------------------------------------------------------------------------------------------------

    5. iperf3 command

    ----------------------------------------------------------------------------------------------------

    iperf3 -u -t 0 -b 10M -c <iperf3 Server's VLAN ip> -l 200 -p 5201

    -------------------------------------------------------------------------------------------------------

    6. netperf command 

    ---------------------------------------------------------------------------------------------------

    netperf -H <Central GP EVM's VLAN ip>

    --------------------------------------------------------------------------------------------------

    I will try the same demo without cut-thru mode.

    Thank you.

  • Seems like disabling cut-thru is working.

    But I also need cut-thru mode.

    How can I get full throughput with cut-thru mode?

  • Thanks. With preemption (IET) cut-thru is only supported for the express traffic. Your test uses queue 3 (bitmask 8 in the bitmask) for the realtime application which is the iperf3 mapped to VLAN priority 3 with the egress-qos-map 0:3. And it looks like you configure only 2 tx queues with ethtool. In https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM64X/latest/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW3g.html#intersperse-express-traffic-iet-frame-preemption-offload we state:

    Driver assumes highest priority h/w Queue as the express Queue and configures lower queues (Q0-QN-2, where N is the maximum number of queues configured) as preemptible queues by programming the PN_REG_IET_CTRL register if the MAC Verify succeeds or if the force mode is enabled. p0-rx-ptype-rrobin flag should be turned off before using IET feature. i.e CPSW2g h/w should be programmed into strict priority mode for IET to work.

    Because cut-thru on or off determines weather your setup works I think what is happening is these three things, how many HW queues are configured, the assumption copied above and then mapping the iperf3 traffic to a given VLAN priority is not matching up. You could also try mapping traffic with for example the clsact and match ip dport as shown in the IET section where the above link points to, instead of the egress-qos-map.

      Pekka

  • Thank you for your support.

    I will try 'clsact' and 'dport' in the wiki page.