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

转载于:https://www.cnblogs.com/idyllcheung/p/10824540.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值