How to confirm whether an attribute is standard Sonic Sai ?
29 2 月, 2024,由 frank撰写
问题是这样的,我们需要确认一个ECMP的attribute是否是标准的Sonic Sai。具体步骤如下:
- 首先去社区:https://github.com/opencomputeproject/SAI;
- 确认ECMP是属于哪个模块,这里是在inc中;
- 然后在这个模块中通过检索头文件的方式来判断;
root@Franks-MacBook-Pro Documents # git clone -b v1.11 https://github.com/opencomputeproject/SAI
root@Franks-MacBook-Pro Documents # cd SAI
root@Franks-MacBook-Pro SAI # cd inc
root@Franks-MacBook-Pro inc # grep -rn 'SAI_SWITCH_ATTR_ECMP'
./saiswitch.h:185: * @brief Attribute data for #SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_ALGORITHM
./saiswitch.h:697: SAI_SWITCH_ATTR_ECMP_MEMBERS,
./saiswitch.h:1226: SAI_SWITCH_ATTR_ECMP_HASH,
./saiswitch.h:1433: SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_ALGORITHM,
./saiswitch.h:1442: SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_SEED,
./saiswitch.h:1454: SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_OFFSET,
./saiswitch.h:1468: SAI_SWITCH_ATTR_ECMP_DEFAULT_SYMMETRIC_HASH,
./saiswitch.h:1479: SAI_SWITCH_ATTR_ECMP_HASH_IPV4,
./saiswitch.h:1490: SAI_SWITCH_ATTR_ECMP_HASH_IPV4_IN_IPV4,
./saiswitch.h:1501: SAI_SWITCH_ATTR_ECMP_HASH_IPV6,
./saiswitch.h:2771: * @brief Number of ECMP Members configured. SAI_SWITCH_ATTR_ECMP_MEMBER_COUNT takes precedence over SAI_KEY_NUM_ECMP_GROUPS string. Default value is same as SAI_SWITCH_ATTR_ECMP_MEMBERS.
./saiswitch.h:2777: SAI_SWITCH_ATTR_ECMP_MEMBER_COUNT,
本文出自 Frank's Blog
版权声明:
本文链接:How to confirm whether an attribute is standard Sonic Sai ?
版权声明:本文为原创文章,仅代表个人观点,版权归 Frank Zhao 所有,转载时请注明本文出处及文章链接