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.

AM6422: eth0 set iet-frame-preemption fail

https://software-dl.ti.com/processor-sdk-linux-rt/esd/docs/08_00_00_21/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW3g.html#intersperse-express-traffic-iet-frame-preemption-offload

To enable IET FPE with MAC Verify, do

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

but
root@am64xx-evm:~# ethtool --set-priv-flags eth0 iet-frame-preemption on
netlink error: Device or resource busy
how to solve the problem?
  • Hi,

    See https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1009997/am6442-linux-time-sensitive-networking-on-sitara-processors-including-am64x and specifically slide 15 for detailed step by step. I suspect you are missing configuring the devices (both Ethernet ports connected to CPSW3G) down before reconfiguring to have IET on:

    echo "Script to initialize AM64x Ethernet ports (CPSW3G) as hardware based 802.1Q cut-through";
    echo "bridge using ip and devlink commands.";
    echo
    echo "setting cut-thru and preemption for VLAN PCP 3 , bitmask 8 0b00001000";
    echo
    #take the interfaces down, by default dual MAC
    ip link set dev eth0 down
    ip link set dev eth1 down
    # two queues one express, one non-express, and SMD level verify on
    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
    #tell the kernel hw switch to turn on switching
    devlink dev param set platform/8000000.ethernet name switch_mode value true cmode runtime
    #setup Q7 of 8 queues to have cut-thru on
    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
    #setup a host port called br0
    ip link add name br0 type bridge
    ip link set dev br0 type bridge ageing_time 1000
    #bring up th external Ethernet MACs, sleep is there to allow the link negotiation to go through
    ip link set dev eth0 up
    sleep 1
    ip link set dev eth1 up
    sleep 1
    #connect the external MACs to the host port
    ip link set dev eth0 master br0
    ip link set dev eth1 master br0
    #tell that the host port is part of the bridge
    ip link set dev br0 type bridge stp_state 1
    #bring the host port up
    ip link set dev br0 up
    #CPSW switch comes up in vlan aware mode, with ports blocked by default
    #vlan id 1 is used for untagged traffic with VLANs, this unblock the untagged traffic to br0 port
    bridge vlan add dev br0 vid 1 pvid untagged self
    #echo spanning tree for the switch
    brctl showstp br0
    #get an IP address for the host port using DHCP
    udhcpc -i br0

      Pekka