Skip to content

Commit

Permalink
[mlxtrace] Add mft-fwtrace-cfg.deb which contains fwtrace_cfg files f…
Browse files Browse the repository at this point in the history
…or the mlxtrace utility (sonic-net#15960)

Backport of sonic-net#15961

Why I did it
Added the fwtrace config files in order to be able to call mlxstrace utility during show techsupport dump.

Work item tracking
Microsoft ADO (number only):
How I did it
Added fwtrace config files. Added path to these files to sai.profile for each mlnx device.

How to verify it
Execute the show techsupport command and check if mlxstrace output is in system dump.
  • Loading branch information
vadymhlushko-mlnx authored Aug 20, 2023
1 parent 4f403c9 commit adb43ff
Show file tree
Hide file tree
Showing 63 changed files with 239,973 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3420.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3700.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3700c.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800_2x10g_100x50g_12x100g.xml
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800_112x50g_8x100g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800_24x50g_52x100g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800_1x10g_28x50g_49x100g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800_28x50g_52x100g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4410.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4600.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4600C.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4600C.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4600c_100x50g_12x100g_2x10g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4600c_112x50g_8x100g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4600c_48x50g_40x100g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4700.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4700_8x200g_8x100g_96x25g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/sonic/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4700_128x100g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/sonic/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4700_32x100g_48x200g.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/sonic/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4800.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_5600.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_5600.xml
SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
SAI_DUMP_STORE_AMOUNT=10
SAI_DUMP_MFT_CFG_PATH=/etc/mft/fwtrace_cfg
4 changes: 2 additions & 2 deletions platform/mellanox/docker-syncd-mlnx.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2016-2021 NVIDIA CORPORATION & AFFILIATES.
# Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -19,7 +19,7 @@
DOCKER_SYNCD_PLATFORM_CODE = mlnx
include $(PLATFORM_PATH)/../template/docker-syncd-bullseye.mk

$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API) $(MFT) $(IPROUTE2_MLNX)
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API) $(MFT) $(MFT_FWTRACE_CFG) $(IPROUTE2_MLNX)

ifeq ($(ENABLE_ASAN), y)
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD_DBG)
Expand Down
10 changes: 10 additions & 0 deletions platform/mellanox/mft-fwtrace-cfg.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DPKG FRK

SPATH := $($(MFT_FWTRACE_CFG)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/mft-fwtrace-cfg.mk $(PLATFORM_PATH)/mft-fwtrace-cfg.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files -- $(SPATH))

$(MFT_FWTRACE_CFG)_CACHE_MODE := GIT_CONTENT_SHA
$(MFT_FWTRACE_CFG)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(MFT_FWTRACE_CFG)_DEP_FILES := $(DEP_FILES)
22 changes: 22 additions & 0 deletions platform/mellanox/mft-fwtrace-cfg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

MFT_FWTRACE_CFG = mft-fwtrace-cfg-$(MFT_VERSION)-$(MFT_REVISION).deb
$(MFT_FWTRACE_CFG)_SRC_PATH = $(PLATFORM_PATH)/mft-fwtrace-cfg
SONIC_MAKE_DEBS += $(MFT_FWTRACE_CFG)

export MFT_FWTRACE_CFG
5 changes: 5 additions & 0 deletions platform/mellanox/mft-fwtrace-cfg/DEBIAN/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mft-fwtrace-cfg (1.0.0) STABLE; urgency=low

* Initial release.

-- Vadym Hlushko <vadymh@nvidia.com> Mon, 24 Jul 2023 12:03:04 +0300
7 changes: 7 additions & 0 deletions platform/mellanox/mft-fwtrace-cfg/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Package: mft-fwtrace-cfg
Version: 1.0.0
Section: utils
Priority: optional
Architecture: all
Maintainer: Vadym Hlushko <vadymh@nvidia.com>
Description: fwtrace_cfg files for the mlxtrace utility from the MFT debian package
25 changes: 25 additions & 0 deletions platform/mellanox/mft-fwtrace-cfg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(MFT_FWTRACE_CFG)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
dpkg -b . $(MAIN_TARGET)
mv $(MAIN_TARGET) $(DEST)/
Loading

0 comments on commit adb43ff

Please sign in to comment.