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-relay prefemption失败

Guru**** 2589300 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1093970/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

要启用带MAC验证的IET FPE,请执行

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 

但是
root@am64xx-evm:~# ethtool --set-priv-flags eth0 iet-frame-preemption on
NetLink错误:设备或资源正忙
如何解决问题?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好,

    有关  详细的逐步说明,请参阅e2e.ti.com/.../am6442-linux-time-sensitive-networking-on-sitara-processors-including-am64x,6442,特别是第15张幻灯片。 我怀疑您在重新配置为打开IET之前没有配置设备(连接到CPSW3G的两个以太网端口):

    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

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的,谢谢。