Skip to content

Commit 93ade1d

Browse files
authored
[Multi-ASIC] To pass the asic instance ID to orchagent, Advance the swss, swss-common submodules. (#4465)
* Multi-ASIC platforms will have the ID field in the DEVICE_METADATA, which will be pulled and will be used when starting the orchagent process with the new option [-i INST_ID] This is currently added only for Broadcom ASIC based platforms * Making the asic instance ID passing global across asics/platforms. Also changed the config DB id field to asic_id * Minor updates * Advance sonic-swss submodule * Advance swss_common submodule as well due to dependencies
1 parent fc55329 commit 93ade1d

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

dockers/docker-orchagent/orchagent.sh

+16
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ ORCHAGENT_ARGS="-d /var/log/swss "
1717
# Set orchagent pop batch size to 8192
1818
ORCHAGENT_ARGS+="-b 8192 "
1919

20+
# Check if there is an "asic_id field" in the DEVICE_METADATA in configDB.
21+
#"DEVICE_METADATA": {
22+
# "localhost": {
23+
# ....
24+
# "asic_id": "0",
25+
# }
26+
#},
27+
# ID field could be integers just to denote the asic instance like 0,1,2...
28+
# OR could be PCI device ID's which will be strings like "03:00.0"
29+
# depending on what the SAI/SDK expects.
30+
asic_id=`sonic-cfggen -d -v DEVICE_METADATA.localhost.asic_id`
31+
if [ -n "$asic_id" ]
32+
then
33+
ORCHAGENT_ARGS+="-i $asic_id "
34+
fi
35+
2036
# Add platform specific arguments if necessary
2137
if [ "$platform" == "broadcom" ]; then
2238
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"

src/sonic-swss

src/sonic-swss-common

0 commit comments

Comments
 (0)