# @name ALE Table test using SWITCH-CONFIG
# @desc Checks default entries in ALE table and verifies addition and deletion of multicast entries.
# @requires net
# @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相关
搜到了CPSW的一个介绍TI网站的:
http://processors.wiki.ti.com/index.php/Linux_Core_CPSW_User%27s_Guide#Introduction
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:
- 10/100/1000 Mbps mode of operation.
- Auto negotiation.
- Linux NAPI support
- Switch Support
- VLAN (Subscription common for all ports)
- Ethertool (Supports only Slave 0 decided in cpsw DT node)
- Dual Standalone EMAC mode
Dual Standalone EMAC mode
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
来源:oschina
链接:https://my.oschina.net/u/4309069/blog/3547285