• ltp-ddt eth_switch_config学习


    # @name ALE Table test using SWITCH-CONFIG
    # @desc Checks default entries in ALE table and verifies addition and deletion of multicast entries.
    # @requires net
     
    ETHSWITCH_XS_FUNC_DUMP_UNICAST source 'common.sh'; dual_mac=`find /proc/device-tree/ -name dual_emac`; if [[ ! -z "$dual_mac" ]]; then die "This is a dual mac case, use a different dtb to test switch mode"; fi; iface=`get_eth_iface_name.sh` || die "error getting eth interface name"; mac_address=`cat /sys/class/net/$iface/address`; if [ -z "`switch-config -d|grep -i ucast| grep $mac_address`" ]; then die "TEST has failed since there is no unicast entry with the mac address of ethernet interface in ALE table."; fi
     
    执行过程中会报找不到switch-config命令的错误
     
    在网上查了很久,顺藤摸瓜找到了
    ALE和CPSW相关
     
     

    TI Common Platform Ethernet Switch (CPSW) is a three port switch (one CPU port and two external ports). The CPSW or Ethernet Switch driver follows the standard Linux network interface architecture.

    The driver supports the following features:

    1. 10/100/1000 Mbps mode of operation.
    2. Auto negotiation.
    3. Linux NAPI support
    4. Switch Support
    5. VLAN (Subscription common for all ports)
    6. Ethertool (Supports only Slave 0 decided in cpsw DT node)
    7. Dual Standalone EMAC mode
    下图并不怎么懂,但是可以看到ALE和CPSW

    Dual Standalone EMAC mode

    Block Diagram for Dual EMAC Implementation
     
    ALE:address lookup engine 地址查询引擎,是TI创造的一种对于双网卡选择的方式:
    TI对于网卡设备的通用管理是CPSW方式,分为host和slave
    参考:

    https://blog.csdn.net/tinylaker/article/details/80564614

    psoc:
    # ethtool -i eth0
    driver: st_gmac
    如果有cpsw
    # ethtool -i eth0

    driver: cpsw

  • 相关阅读:
    ZOJ 3656Bit Magic解题报告——2sat问题建图总结
    gcc和g++的区别
    07车展,流水账。。
    放开思维啊~~~
    SC2和其他
    幻觉~
    去横店咯~
    ETS。。New G。。
    老子毕业鸟。。。
    gcc常用参数和环境变量小结
  • 原文地址:https://www.cnblogs.com/idyllcheung/p/10824540.html
Copyright © 2020-2023  润新知