sonic-buildimage/device
Richard.Yu fe1fc4cf6a
[broadcom]: Set default SYNCD_SHM_SIZE for Broadcom XGS devices (#13297) (#13807)
After upgrade to brcmsai 8.1, the sdk running environment (container) recommended with mininum memory size as below

TH4/TD4(ltsw) uses 512MB
TH3 used 300MB
Helix4/TD2/TD3/TH/TH 256 MB
Base on this requirement, adjust the default syncd share memory size and set the memory size for special ACISs in platform_env.conf file for different types of Broadcom ASICs.

How I did it
Add the platform_env.conf file if none of it for broadcom platform (base on platform_asic file)
Add the 'SYNCD_SHM_SIZE' and set the value

for ltsw(TD4/TH4) devices set to 512M at least (update the platform_env.conf)
for Td2/TH2/TH devices set to 256M
for TH3 set to 300M

verify

How to verify it
verify the image with code fix
Check with UT
Check on lab devices

On a problematic device which cannot start successfully
Run with the command
$ cat /proc/linux-kernel-bde
Broadcom Device Enumerator (linux-kernel-bde)
Module parameters:
        maxpayload=128
        usemsi=0
        dmasize=32M
        himem=(null)
        himemaddr=(null)
DMA Memory (kernel): 33554432 bytes, 0 used, 33554432 free, local mmap
No devices found
$ docker rm -f syncd
syncd
$ sudo /usr/bin/syncd.sh start
Cannot get Broadcom Chip Id. Skip set SYNCD_SHM_SIZE.
Creating new syncd container with HWSKU Force10-S6000
a4862129a7fea04f00ed71a88715eac65a41cdae51c3158f9cdd7de3ccc3dd31
$ docker inspect syncd | grep -i shm
            "ShmSize": 67108864,
                "Tag": "fix_8.1_shm_issue.67873427-9f7ca60a0e",
On Normal device
$ docker inspect syncd | grep -i shm
            "ShmSize": 268435456,
                "Tag": "fix_8.1_shm_issue.67873427-9f7ca60a0e"
change the config syncd_shm.ini to b85=128m

$ docker rm -f syncd
syncd
$ sudo /usr/bin/syncd.sh start
Creating new syncd container with HWSKU Force10-S6000
3209ffc1e5a7224b99640eb9a286c4c7aa66a2e6a322be32fb7fe2113bb9524c
$  docker inspect syncd | grep -i shm
            "ShmSize": 134217728,
                "Tag": "fix_8.1_shm_issue.67873427-9f7ca60a0e",
change the config under
/usr/share/sonic/device/x86_64-dell_s6000_s1220-r0/Force10-S6000/platform_env.conf
and run command

$ cat /usr/share/sonic/device/x86_64-dell_s6000_s1220-r0/platform_env.conf
SYNCD_SHM_SIZE=300m

$ sudo /usr/bin/syncd.sh start
Creating new syncd container with HWSKU Force10-S6000
897f6fcde1f669ad2caab7da4326079abd7e811bf73f018c6dacc24cf24bfda5
$  docker inspect syncd | grep -i shm
            "ShmSize": 314572800,
                "Tag": "fix_8.1_shm_issue.67873427-9f7ca60a0e",

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
2023-02-15 15:58:49 +08:00
..
accton [device/accton] Replace os.system and remove subprocess with shell=True (#11985) 2022-11-07 10:31:32 -05:00
alphanetworks [Alphanetworks] Add new platform BES2348T (#11196) 2022-09-15 21:34:52 -07:00
arista [broadcom]: Set default SYNCD_SHM_SIZE for Broadcom XGS devices (#13297) (#13807) 2023-02-15 15:58:49 +08:00
barefoot Revert "[Barefoot] Add xon_offset to pg_profile_lookup.ini (#12073)" (#12568) 2022-11-02 09:10:07 +08:00
broadcom [broadcom]: Set default SYNCD_SHM_SIZE for Broadcom XGS devices (#13297) (#13807) 2023-02-15 15:58:49 +08:00
celestica [Celestica DX010] fix fan drawer and watchdog platform testcase issues (#13426) 2023-02-11 02:37:47 +08:00
centec [device/centec] Replace os.system and remove subprocess with shell=True (#12024) 2022-10-07 10:48:25 -04:00
cig Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
common Update ECN settings for storage backend (#12855) 2022-12-10 10:33:21 +08:00
dell [DPB] Dell Z9332f port breakout changes (#12789) 2022-12-10 10:33:21 +08:00
delta [device/delta] Mitigation for command injection vulnerability (#11865) 2022-10-13 21:11:51 -07:00
facebook/x86_64-facebook_wedge100-r0 Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
ingrasys [BFN] Update configuration files (#9913) 2022-03-09 09:57:08 +05:30
inventec [BRCMSAI 6.0.0.13-1] Fix Cancun file directory at new location causing TD3 platform boot issue (#9922) 2022-02-07 08:56:06 -08:00
juniper [device/juniper] Mitigation for security vulnerability (#11838) 2022-12-10 10:33:21 +08:00
marvell [device/marvell] Mitigation for security vulnerability (#11876) 2022-12-10 10:33:21 +08:00
mellanox [Mellanox] Support DSCP remapping in dual ToR topo on T0 switch (#12605) (#13787) 2023-02-14 14:59:59 +08:00
mitac/x86_64-mitac_ly1200_b32h0_c3-r0 Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
netberg [Netberg][Barefoot] Added support for Aurora 610 (#10579) 2022-06-30 10:40:47 -07:00
nokia Use the macsec_enabled flag in platform to enable macsec feature state (#11998) 2022-11-08 11:03:38 -08:00
pegatron/x86_64-pegatron_porsche-r0 Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
quanta [device/quanta] Mitigation for security vulnerability (#11867) 2022-10-19 10:05:36 -04:00
ragile [device/ragile] Mitigation for security vulnerability (#11744) 2022-12-10 10:33:21 +08:00
ruijie/x86_64-ruijie_b6510-48vs8cq-r0 [device/ruijie] Mitigation for security vulnerability #11779 2022-08-23 09:48:42 -04:00
tencent two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386) (#13210) 2023-01-09 11:40:35 +08:00
virtual Add gearbox taps to vs gearbox_config.json (#11480) 2022-10-10 13:35:06 -07:00
wistron [Wistron] Add 6512-32r platform support (#10956) 2022-06-30 09:13:56 -07:00
wnc/x86_64-wnc_osw1800-r0 [BFN] Update configuration files (#9913) 2022-03-09 09:57:08 +05:30