Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/sonic-device-data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
num_columns=$$(echo $$last_line | awk '{print NF}'); \
i=0; \
if [ -f $$(dirname $$d)/chassisdb.conf ] && ! grep -q '^disaggregated_chassis=1' $$(dirname $$d)/platform_env.conf; then \
echo "Reserve midplane interface for $$(dirname $$d)"; \
i=$$(($$i+1)); \
fi; \
while IFS= read -r line; do \
while IFS= read -r line || [ -n "$$line" ]; do \
if ! grep -q "^#" <<< "$$line"; then \
i=$$(($$i+1)); \
lanes=$$(echo "$$line" | awk '{print $$2}'); \
Expand All @@ -70,7 +71,6 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
if [ -f device/x86_64-kvm_x86_64-r0/$$(basename $$d)/context_config.json ]; then \
rm device/x86_64-kvm_x86_64-r0/$$(basename $$d)/context_config.json; \
fi; \
i=0; \
if [ -f $$(dirname $$d)/chassisdb.conf ]; then \
# Append Cpu0 Port in lanemap.ini
if [ -f device/x86_64-kvm_x86_64-r0/$$(basename $$d)/lanemap.ini ]; then \
Expand All @@ -79,6 +79,10 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
if [ -f device/x86_64-kvm_x86_64-r0/$$(basename $$d)/coreportindexmap.ini ]; then \
echo "Cpu0:0,0" >> device/x86_64-kvm_x86_64-r0/$$(basename $$d)/coreportindexmap.ini; \
fi; \
fi; \
i=0; \
if [ -f $$(dirname $$d)/chassisdb.conf ] && ! grep -q '^disaggregated_chassis=1' $$(dirname $$d)/platform_env.conf; then \
echo "Reserve midplane interface for $$(dirname $$d)"; \
i=$$(($$i+1)); \
fi; \
subdirs="0 1 2"; \
Expand All @@ -93,7 +97,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
if [ -f device/x86_64-kvm_x86_64-r0/$$(basename $$d)/$$(basename $$subdir)/port_config.ini ]; then \
last_line=$$(tail -n 1 device/x86_64-kvm_x86_64-r0/$$(basename $$d)/$$(basename $$subdir)/port_config.ini); \
num_columns=$$(echo $$last_line | awk '{print NF}'); \
while IFS= read -r line; do \
while IFS= read -r line || [ -n "$$line" ]; do \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont need change in Line #116?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, line 116 is for allocating an intf for cpu port

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BYGX-wcr Do we have any test to capture this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2 KVM PR checker will fail if this change impacted traditional chassis. For now, we don't have dedicated sanity test for virtual DT2.

if ! grep -q "^#" <<< "$$line"; then \
i=$$(($$i+1)); \
lanes=$$(echo "$$line" | awk '{print $$2}'); \
Expand Down
Loading