2023年9月25日

semaphore互斥失败导致出core

摘要: 先看堆栈 (gdb) bt #0 bnet_neigh_event_thread (dummy=dummy@entry=0x0) at /vob/jenkins/workspace/_build_8.8.3/sdk/src/customer_smm/l3.c:1303 #1 0x0000000002 阅读全文

posted @ 2023-09-25 14:47 枝桠 阅读(27) 评论(0) 推荐(0)

函数重名和结构体出现两种定义

摘要: 这个Bug是在查另一个Bug时发现的,源Bug暂且按下不表 先说一下大致的情况 struct zebra_client_arg zebra_client是进程中的一个全局变量,struct zebra_client_arg的定义如下: struct zebra_client_arg { int lc 阅读全文

posted @ 2023-09-25 14:20 枝桠 阅读(33) 评论(0) 推荐(0)

core文件里的全局变量偏移了16字节

摘要: 源代码里面有这个几张表: 126 static struct avl_table *l2_addr_tree; 127 static struct avl_table *casa_neighbor_table; 128 static struct avl_table *casa_ecmp_table 阅读全文

posted @ 2023-09-25 14:00 枝桠 阅读(20) 评论(0) 推荐(0)

strncpy 出core

摘要: core 的堆栈是这样子的: (gdb) bt #0 0x00007ffff4a96a7c in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ffff4a42476 in raise () from /lib/x86_ 阅读全文

posted @ 2023-09-25 13:53 枝桠 阅读(71) 评论(0) 推荐(0)

printk格式错误出panic

摘要: 检查dmesg的时候发现有这么个panic,但是设备没有重启: [1691135418.681314] cpu-0 (014C64B3:1635): ffff8000205d1e4b: 3C010800 1851AC04 000118FF 6BF08100 *<....Q......k...* [1 阅读全文

posted @ 2023-09-25 13:47 枝桠 阅读(133) 评论(0) 推荐(0)

全局数组未加锁访问溢出导致踩内存

摘要: 在客户那里发现有些数据包被错误的转到了standby SMM上,后面查看 proc 发现是 knet.ko 中的 role 字段被踩 后面再检查发现有三个字段都被踩: zyc@fish smm_arm64 (/≧▽≦)/ ~/do_not_remove/aarch64-marvell-linux-g 阅读全文

posted @ 2023-09-25 11:41 枝桠 阅读(48) 评论(0) 推荐(0)

中断嵌套导致的panic

摘要: 串口日志: [0629_17:01:42]casa_switch_client_tx: ioctl rc -1 [0629_17:01:42]casa_switch_client_tx: ioctl rc -1 [0629_17:01:42]casa_switch_client_tx: ioctl 阅读全文

posted @ 2023-09-25 11:34 枝桠 阅读(86) 评论(0) 推荐(0)

访问空指针出panic

摘要: panic信息: <4>[1670581299] 15:Failed on write i2cdev=23(I2CDEV_RFSW0) <4>[1670581299] 15:tx retry failed <4>[1670581299] 15:Failed on write i2cdev=23(I2 阅读全文

posted @ 2023-09-25 11:06 枝桠 阅读(34) 评论(0) 推荐(0)

access口能转发其他tag报文

摘要: Sundray-SW / #bcmsh dump port 2 1 filter_enable en_ifilter # "2 1"含义:从PORT.ipipe0[2]开始,总共1条 excute : ovs-appctl plugin/bcmsh dump port 2 1 filter_enab 阅读全文

posted @ 2023-09-25 10:36 枝桠 阅读(46) 评论(0) 推荐(0)

mac_vlan条目没生效

摘要: 配置文件、数据库、MAC上都有这条mac_vlan,但实际上在芯片上bamsh l2 show对应的vlan是错误的 原因是端口类型不对,配置mac_vlan的端口一定得是hybrid口 阅读全文

posted @ 2023-09-25 10:33 枝桠 阅读(62) 评论(0) 推荐(0)

LEDup点灯

摘要: 读 ledup 数据空间内容,通过对比没有插上光模块时的数据做对比得出: Sundray-SW[1] ~ #bcmsh g cmic_ledup0_data_ram excute : ovs-appctl plugin/bcmsh g cmic_ledup0_data_ram CMIC_LEDUP0 阅读全文

posted @ 2023-09-25 10:31 枝桠 阅读(47) 评论(0) 推荐(0)

bcm cli 命令

摘要: 查看端口当前芯片配置: Sundray-SW /var #bcmsh port ge3 = excute : ovs-appctl plugin/bcmsh port ge3 = Enable[True] AutoNeg[True] ADVert[1000full,100,10] SPeed[0] 阅读全文

posted @ 2023-09-25 10:24 枝桠 阅读(681) 评论(0) 推荐(0)

光电复用口查看当前是光还是电

摘要: Sundray-SW[Undefine-0/32|LC] / #bcmsh combo ge2 excute : ovs-appctl plugin/bcmsh combo ge2 Port ge2: ge2: Copper medium (active) enable=1 preferred=1 阅读全文

posted @ 2023-09-25 10:16 枝桠 阅读(49) 评论(0) 推荐(0)

光电复用口link错误

摘要: 现象:光电复用口,电口和光口接满线,电口与光口各亮一对 serdes_link=0 copper_link=0 get_combo_link_status() { port1=$1 # local tmp_reg=`bcmsh "linkscan off ; phy ${port1} 0x17 0x 阅读全文

posted @ 2023-09-25 10:15 枝桠 阅读(68) 评论(0) 推荐(0)

芯片驱动选择

摘要: 看src/soc/common/cm.c -> soc_dev_info这个全局变量,这个才是最准确最标准的,其结构体定义如下: /* information about a device type */ typedef struct soc_cm_device_info_s { uint16 de 阅读全文

posted @ 2023-09-25 10:13 枝桠 阅读(68) 评论(0) 推荐(0)

确定芯片系列

摘要: 新SDK适配: 1、总Makefile,可以从最接近新SDK版本的就版本拷贝过来,以此为基础修改 SDK:修改SDK版本号为新版本号 选型:platform可以查看 ${SDK}/RELDOCS/${SDK}-Device-Matrix.xlsx,找到对应的芯片 有时候看不出来,可以从include 阅读全文

posted @ 2023-09-25 10:11 枝桠 阅读(55) 评论(0) 推荐(0)

确定phy驱动代码

摘要: libs/phymod/core/phymod.c -> phymod_core_probe() -> __phymod__dispatch__[idx]->f_phymod_core_identify ↓ phymod_tsce16_driver ↓ tsce16_core_identify() 阅读全文

posted @ 2023-09-25 10:08 枝桠 阅读(46) 评论(0) 推荐(0)

从PHY驱动找寄存器

摘要: libs\phymod\chip\tscf\tier1\tefmod_cfg_seq.c中有关于TSCF各种操作时使用的寄存器,比如,PCS link状态,就可以看到具体是要看哪个寄存器 其他的PHY应该也是类似的找寻方法 阅读全文

posted @ 2023-09-25 10:06 枝桠 阅读(56) 评论(0) 推荐(0)

打开SDK日志

摘要: 以下为例,注意第一个参数 **BSL_LS_SOC_PHY ** LOG_INFO(BSL_LS_SOC_PHY, (BSL_META_U(unit, "phy_bcm542xx_adv_local_set: u=%d p=%d " "ability_hd_speed=0x%x, ability_f 阅读全文

posted @ 2023-09-25 10:01 枝桠 阅读(48) 评论(0) 推荐(0)

看SDK代码

摘要: soc_feature() 支持的功能在 src/soc/common/feature.c中 查找过程,首先看到了有soc_do_init(),从SDK入口看起sdk_init_test() -> system_init() -> soc_reset_init() -> soc_so_init() 阅读全文

posted @ 2023-09-25 09:59 枝桠 阅读(64) 评论(0) 推荐(0)

PHY结构

摘要: PHY芯片包括MII/GMII(介质独立接口)子层、PCS(物理编码子层)、PMA(物理介质附加)子层、PMD(物理介质相关)子层、MDI子层。 PCS(PHYSICAL CODING SUBLAYER):提供4B/5B编码、串并转换以及冲突检测功能,同时只要TxEN无效就提供“idle”信号给PM 阅读全文

posted @ 2023-09-25 09:56 枝桠 阅读(284) 评论(0) 推荐(0)

访问QSGMII寄存器

摘要: 阅读全文

posted @ 2023-09-25 09:55 枝桠 阅读(24) 评论(0) 推荐(0)

访问RDB寄存器

摘要: 按照技术手册,在读写rdb寄存器之前先要设置 0x17、0x15 这两个寄存器,0x1e 中写入要访问的寄存器号,访问结果保存在 0x1f 寄存器中 访问寄存器之前关掉 linkscan 是因为在 linkscan 中会去访问phy,以防冲突 读:bcmsh linkscan offbcmsh "p 阅读全文

posted @ 2023-09-25 09:54 枝桠 阅读(52) 评论(0) 推荐(0)

从文件路径中提取文件名的shell操作

摘要: Sundray-SW /extdir #sfp=/extdir/debug_bin/ops-devsdSundray-SW /extdir #echo ${sfp##*/}ops-devsdSundray-SW /extdir #basename ${sfp}ops-devsdSundray-SW 阅读全文

posted @ 2023-09-25 09:48 枝桠 阅读(114) 评论(0) 推荐(0)

open()文件导致文件内容被随机性地清空

摘要: open()使用错误:源码 fd = open("/extdir/run_mode", "r");其中,"r" 不是open的参数 ,正确参数应为O_RDONLY。 详解: 1、open()是系统函数,它的参数应为O_RDONLY,"r" 是库函数fopen()的参数2、"r" 按照整型解释的时候是 阅读全文

posted @ 2023-09-25 09:45 枝桠 阅读(85) 评论(0) 推荐(0)

dleeeor()确定加载动态库时缺少的符号

摘要: [plugins_open_plugin plugins.c:79]1970-01-01T17:46:22Z|00003|plugins|INFO|netdev_register not supported by /var/lib/plugins/libacl_plugin plugin[plugi 阅读全文

posted @ 2023-09-25 09:41 枝桠 阅读(23) 评论(0) 推荐(0)

Git常用命令

摘要: 1、配置个人身份git config --global user.name 枝桠76454git config --global user.email 76454@sangfor.com 2、生成ssh公钥ssh-keygen -t rsa -C "76454@sangfor.com" -b 409 阅读全文

posted @ 2023-09-25 09:38 枝桠 阅读(33) 评论(0) 推荐(0)

导航