ltp-ddt eth_switch_config学习
2024-10-07 09:54:47
# @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
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
下图并不怎么懂,但是可以看到ALE和CPSW
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
最新文章
- MongoDB常用操作命令大全
- IDEA 的 git 使用
- Oracle--用变量保存查询出来的值
- VMware Linux Guest 增加磁盘无需重启的方法
- C#中操作XML文件
- 【循序渐进学Python】12.Python 正则表达式简介
- Deep Learning for NLP 文章列举
- bzoj1827 [Usaco2010 Mar]gather 奶牛大集会
- 个人的IDE制作(vim)——适用于C++/C
- BufferedReader 输出与BufferedWriter 输入的用法
- 线程机制、CLR线程池以及应用程序域
- hdu_1033(我怎么找到的这么水的题,只为保存代码。。。)
- BSA Network Shell系列-nexec命令
- 使用datagrid时json的格式
- Java集合框架相关知识整理
- PAT 甲级 1002 A+B for Polynomials (25 分)
- Linux_CentOS-服务器搭建 <;七>;
- Revit API创建详图视图
- FIDDLER的使用方法及技巧总结(连载四)FIDDLER通用规则更改
- string logo online customization
热门文章
- 通过java反射机制,修改年龄字段的值
- Java数据结构与算法(1):线性表
- ES6 二进制和八进制字面量
- Linux下查看分区内目录及文件占用空间容量
- duliu题之狼抓兔子题解
- nginx下使用asan和valgrind两个静态检查工具
- java8 list转Map报错Collectors.toMap :: results in ";Non-static method cannot be refernced from static context";
- Mysql 免安装版本配置
- 流程控制: if分支 while循环 for循环
- 好的计数思想-LightOj 1213 - Fantasy of a Summation