sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
739 stars 1.43k forks source link

[SAI] Is SONiC master branch support Broadcom TD4 chip? #8216

Open jeffchen1988 opened 3 years ago

jeffchen1988 commented 3 years ago

Description

Is SONiC master branch support Broadcom TD4 chip? There is no TD4 device in SONiC Supported Devices and Platforms pages.

Steps to reproduce the issue:

  1. Add yml config file in device/delta/x86_64-delta_dds32c4s-r0/Delta-dds32c4s
  2. Manual to restart syncd
  3. syncd init fail

Describe the results you received:

Jul 15 16:23:26.531191 sonic NOTICE syncd#syncd: :- Syncd: command line: EnableDiagShell=YES EnableTempView=YES DisableExitSleep=NO EnableUnittests=NO EnableConsistencyCheck=NO EnableSyncMode=YES RedisCommunicationMode=redis_async EnableSaiBulkSuport=NO StartType=cold ProfileMapFile=/etc/sai.d/sai.profile GlobalContext=0 ContextConfig= BreakConfig= Jul 15 16:23:26.531191 sonic NOTICE syncd#syncd: :- loadFromFile: no context config specified, will load default context config ... Jul 15 16:23:26.531191 sonic INFO syncd#syncd: [none] SAI_API_UNSPECIFIED:sai_api_initialize:366 BRCM SAI ver: [5.0.0.1], OCP SAI ver: [1.8.1], SDK ver: [sdk-6.5.21] Jul 15 16:23:26.531191 sonic NOTICE syncd#syncd: :- sai_metadata_apis_query: :- failed to query api SAI_API_BMTOR: SAI_STATUS_NOT_IMPLEMENTED (-15) Jul 15 16:23:26.531191 sonic NOTICE syncd#syncd: :- initialize: sai_api_query failed for 1 apis

Describe the results you expected:

Support Broadcom TD4 BCM56880_B0 chip. *Dev 0xb880, Rev 0x11, Chip BCM56880_B0, Driver LTSW#015

Output of show version:

SONiC Software Version: SONiC.master.0-dirty-20210718.134442
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-amd64
Build commit: 505ce3f6f
Build date: Sun Jul 18 08:47:46 UTC 2021
Built by: jeff@Delta

Platform: x86_64-delta_dds32c4s-r0
HwSKU: Delta-dds32c4s
ASIC: broadcom
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 17:21:50 up 58 min,  1 user,  load average: 0.35, 0.40, 0.58
zhangyanzhao commented 3 years ago

@adyeung please help to take a look.

adyeung commented 3 years ago

Failure is due to SAI_API_BMTOR, the SAI extension for P4 runtime bare metal TOR api is not supported in BRCM SAI.

jeffchen1988 commented 3 years ago

Failure is due to SAI_API_BMTOR, the SAI extension for P4 runtime bare metal TOR api is not supported in BRCM SAI.

Hi adyeung,

I didn't configure the SAI_API_BMTOR in config.yml. And I supposed that the config.yml has never been loaded by BRCM SAI. Could you please help to reply the below questions first?

  1. I have confirmed that the config.yml was placed in syncd docker. Would you please explain why the syncd load default context config?
  1. Please refer to the attached log to see the yml conifg file is not supported by syncd docker. Would you please let me know if the BRCM SAI support config.yml format or not?
vishnushetty commented 3 years ago

The context error has nothing to do with yml or SAI. You can ignore it.

SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td4-dds32c4s-32x400G-1.config.yml

This is right way to specify the yml file. You need to check with HW vendor for the feature set inside it.

jeffchen1988 commented 3 years ago

Hi vishnushetty,

If the config.yml file was right to specify. How to identify the parameters of config.yml be loaded by SAI? Would you please provide some tips in syslog? Thank you.

jeffchen1988 commented 3 years ago

This is right way to specify the yml file. You need to check with HW vendor for the feature set inside it.

I work as an engineer in Delta company. (HW vendor) Actually, it is no problem to bring up TD4 BCM56880_B0 chip by hsdk-all-6.5.20. And there are four config.yml used for bcm.user.

However, is it possible to use one config.yml merged by the four ymls for SONiC SAI?

yaoting-chang commented 2 years ago

I also can not init syncd (TD4 BCM56880_B0) on SONiC master branch. If api is not supported in BRCM SAI, how to solve the "sai_metadata_apis_query: :- failed to query api [SAI_API_name]" problem in SONiC?

Steps to reproduce the issue:

  1. Add yml config file in device/delta/x86_64-delta_dds32c4s-r0/Delta-dds32c4s
  2. Manual to restart syncd
  3. syncd init fail

Describe the results you received:

Apr 27 23:18:24.664938 sonic NOTICE syncd#syncd: :- Syncd: command line: Enable DiagShell=YES EnableTempView=YES DisableExitSleep=NO EnableUnittests=NO EnableCo nsistencyCheck=NO EnableSyncMode=YES RedisCommunicationMode=redis_async EnableSa iBulkSuport=NO StartType=cold ProfileMapFile=/etc/sai.d/sai.profile GlobalContex t=0 ContextConfig= BreakConfig=/tmp/break_before_make_objects Apr 27 23:18:24.665015 sonic NOTICE syncd#syncd: :- loadFromFile: no context config specified, will load default context config Apr 27 23:18:24.665080 sonic NOTICE syncd#syncd: :- insert: added switch: idx 0, hwinfo '' Apr 27 23:18:24.665154 sonic WARNING syncd#syncd: :- Syncd: enable sync mode is deprecated, please use communication mode, FORCING redis sync mode Apr 27 23:18:24.666179 sonic NOTICE syncd#syncd: :- RedisSelectableChannel: opened redis channel Apr 27 23:18:24.667696 sonic NOTICE syncd#syncd: :- isVeryFirstRun: First Run: True Apr 27 23:18:24.667779 sonic INFO syncd#syncd: [none] SAI_API_UNSPECIFIED:sai_api_initialize:366 BRCM SAI ver: [6.1.0.3], OCP SAI ver: [1.9.1], SDK ver: [sdk-6.5.24] Apr 27 23:18:24.667855 sonic NOTICE syncd#syncd: :- sai_metadata_apis_query: :- failed to query api SAI_API_BMTOR: SAI_STATUS_NOT_IMPLEMENTED (-15) Apr 27 23:18:24.667920 sonic NOTICE syncd#syncd: :- sai_metadata_apis_query: :- failed to query api SAI_API_IPSEC: SAI_STATUS_NOT_IMPLEMENTED (-15) Apr 27 23:18:24.667994 sonic NOTICE syncd#syncd: :- sai_metadata_apis_query: :- failed to query api SAI_API_MY_MAC: SAI_STATUS_NOT_IMPLEMENTED (-15) Apr 27 23:18:24.668060 sonic NOTICE syncd#syncd: :- initialize: sai_api_query failed for 3 apis