From 386f92cb3bf14aa4f40da59feb36e3567a94bf8f Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Wed, 22 Apr 2020 13:55:28 -0700 Subject: [PATCH 1/5] 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 --- dockers/docker-orchagent/orchagent.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index e4e28a347a34..cd5faa01a18b 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -19,7 +19,23 @@ ORCHAGENT_ARGS+="-b 8192 " # Add platform specific arguments if necessary if [ "$platform" == "broadcom" ]; then + # Check if there is an "id field" in the DEVICE_METADATA in configDB. + #"DEVICE_METADATA": { + # "localhost": { + # .... + # "id": "0", + # } + #}, + # ID field could be integers just to denote the asic instance like 0,1,2... + # OR could be PCI device ID's which will be strings like "03:00.0" + # depending on what the SAI/SDK expects. + inst_id=`sonic-cfggen -d -v DEVICE_METADATA.localhost.id` + if [ -n "$inst_id" ] + then + ORCHAGENT_ARGS+="-i $inst_id " + fi ORCHAGENT_ARGS+="-m $MAC_ADDRESS" + elif [ "$platform" == "cavium" ]; then ORCHAGENT_ARGS+="-m $MAC_ADDRESS" elif [ "$platform" == "nephos" ]; then From ec961352cbcf2302ae301c50517bfa7ff477bd6c Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Thu, 23 Apr 2020 08:05:16 -0700 Subject: [PATCH 2/5] Making the asic instance ID passing global across asics/platforms. Also changed the config DB id field to asic_id --- dockers/docker-orchagent/orchagent.sh | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index cd5faa01a18b..ff4bd375de70 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -17,25 +17,25 @@ ORCHAGENT_ARGS="-d /var/log/swss " # Set orchagent pop batch size to 8192 ORCHAGENT_ARGS+="-b 8192 " +# Check if there is an "asic_id field" in the DEVICE_METADATA in configDB. +#"DEVICE_METADATA": { +# "localhost": { +# .... +# "asic_id": "0", +# } +#}, +# ID field could be integers just to denote the asic instance like 0,1,2... +# OR could be PCI device ID's which will be strings like "03:00.0" +# depending on what the SAI/SDK expects. +inst_id=`sonic-cfggen -d -v DEVICE_METADATA.localhost.asic_id` +if [ -n "$inst_id" ] +then + ORCHAGENT_ARGS+="-i $inst_id " +fi + # Add platform specific arguments if necessary if [ "$platform" == "broadcom" ]; then - # Check if there is an "id field" in the DEVICE_METADATA in configDB. - #"DEVICE_METADATA": { - # "localhost": { - # .... - # "id": "0", - # } - #}, - # ID field could be integers just to denote the asic instance like 0,1,2... - # OR could be PCI device ID's which will be strings like "03:00.0" - # depending on what the SAI/SDK expects. - inst_id=`sonic-cfggen -d -v DEVICE_METADATA.localhost.id` - if [ -n "$inst_id" ] - then - ORCHAGENT_ARGS+="-i $inst_id " - fi ORCHAGENT_ARGS+="-m $MAC_ADDRESS" - elif [ "$platform" == "cavium" ]; then ORCHAGENT_ARGS+="-m $MAC_ADDRESS" elif [ "$platform" == "nephos" ]; then From dd3767e9687ff0ec06ed6b2ad3a19a315456361e Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Thu, 23 Apr 2020 08:09:53 -0700 Subject: [PATCH 3/5] Minor updates --- dockers/docker-orchagent/orchagent.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index ff4bd375de70..917205f3ebf2 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -27,10 +27,10 @@ ORCHAGENT_ARGS+="-b 8192 " # ID field could be integers just to denote the asic instance like 0,1,2... # OR could be PCI device ID's which will be strings like "03:00.0" # depending on what the SAI/SDK expects. -inst_id=`sonic-cfggen -d -v DEVICE_METADATA.localhost.asic_id` -if [ -n "$inst_id" ] +asic_id=`sonic-cfggen -d -v DEVICE_METADATA.localhost.asic_id` +if [ -n "$asic_id" ] then - ORCHAGENT_ARGS+="-i $inst_id " + ORCHAGENT_ARGS+="-i $asic_id " fi # Add platform specific arguments if necessary From 85acffc05b33451e0062e597f8809e2766958851 Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Thu, 23 Apr 2020 23:11:14 -0700 Subject: [PATCH 4/5] Advance sonic-swss submodule --- src/sonic-swss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss b/src/sonic-swss index 412c5ebd1762..382905381d54 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 412c5ebd1762f94afc51b1129f54a27a53f132bb +Subproject commit 382905381d547a3c050ec23ef9bd611bb2dea67a From 38bfdbf56b9396f2e3a2e6530901e25f23f8241b Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Fri, 24 Apr 2020 17:40:04 -0700 Subject: [PATCH 5/5] Advance swss_common submodule as well due to dependencies --- src/sonic-swss-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 7ee11792342f..6889c0aba53c 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 7ee11792342f2673ea6905952d556e3f9a27234d +Subproject commit 6889c0aba53c96c1935374e5a442e12a97941eee