Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mellanox] Update SAI to SAIBuild2311.25.0.36, SDK/FW to 4.6.2104/2012.2104 #17131

Merged
merged 9 commits into from
Nov 17, 2023
8 changes: 4 additions & 4 deletions platform/mellanox/fw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ ifeq ($(MLNX_FW_BASE_URL), )
MLNX_FW_BASE_URL = $(MLNX_FW_ASSETS_URL)
endif

MLNX_SPC_FW_VERSION = 13.2012.1062
MLNX_SPC_FW_VERSION = 13.2012.2104
MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa
$(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH)
$(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE)

MLNX_SPC2_FW_VERSION = 29.2012.1062
MLNX_SPC2_FW_VERSION = 29.2012.2104
MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa
$(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH)
$(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE)

MLNX_SPC3_FW_VERSION = 30.2012.1062
MLNX_SPC3_FW_VERSION = 30.2012.2104
MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa
$(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH)
$(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE)

MLNX_SPC4_FW_VERSION = 34.2012.1062
MLNX_SPC4_FW_VERSION = 34.2012.2104
MLNX_SPC4_FW_FILE = fw-SPC4-rel-$(subst .,_,$(MLNX_SPC4_FW_VERSION))-EVB.mfa
$(MLNX_SPC4_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH)
$(MLNX_SPC4_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC4_FW_FILE)
Expand Down
15 changes: 14 additions & 1 deletion platform/mellanox/integration-scripts/sdk_kernel_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_kernel_dir(self):
major_kernel_path = os.path.join(KERNEL_BACKPORTS, "{}.{}".format(kernel, major))

# if the k_dir with actual minor doesn't exit, use the closest minor version
for minor_i in range(minor_int, 0, -1):
for minor_i in range(minor_int, -1, -1):
path = os.path.join(major_kernel_path, "{}.{}.{}".format(kernel, major, minor_i))
if os.path.exists(os.path.join(self.args.patches, path)):
minor = str(minor_i)
Expand Down Expand Up @@ -137,6 +137,18 @@ def get_new_patches(self):
Data.new_patches = FileHandler.read_dir(patches_path, "*.patch")
Data.new_patches.sort()

def cleanup_old_patches(self):
patches_del = copy.deepcopy(Data.old_patches)
for patch in Data.new_patches:
if patch in Data.old_patches:
patches_del.remove(patch)
print(f" -> Patches to be removed are : {patches_del}")
for patch in patches_del:
file_n = os.path.join(self.args.build_root, os.path.join(SLK_PATCH_LOC, patch))
if os.path.exists(file_n):
print(f"{file_n} is deleted")
os.remove(file_n)

def refresh_markers(self):
print("-> INFO Refreshing Markers ")
(Data.i_sdk_start, Data.i_sdk_end) = FileHandler.find_marker_indices(Data.old_series, SDK_MARKER)
Expand Down Expand Up @@ -187,6 +199,7 @@ def perform(self):
self.refresh_markers()
self.add_new_patch_series()
self.process_update()
self.cleanup_old_patches()
patch_table = self.fetch_patch_table(os.path.join(self.args.patches, Data.k_dir))
slk_msg = self.create_commit_msg(patch_table)
if self.args.slk_msg:
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/mlnx-sai.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mellanox SAI

MLNX_SAI_VERSION = SAIBuild2211.25.1.4
MLNX_SAI_VERSION = SAIBuild2311.25.0.36
MLNX_SAI_ASSETS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins
MLNX_SAI_ASSETS_RELEASE_TAG = sai-$(MLNX_SAI_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH)
MLNX_SAI_ASSETS_URL = $(MLNX_SAI_ASSETS_GITHUB_URL)/releases/download/$(MLNX_SAI_ASSETS_RELEASE_TAG)
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ include $(PLATFORM_PATH)/docker-saiserver-mlnx.mk
include $(PLATFORM_PATH)/one-image.mk
include $(PLATFORM_PATH)/libsaithrift-dev.mk
include $(PLATFORM_PATH)/mlnx-ffb.mk
#include $(PLATFORM_PATH)/issu-version.mk
include $(PLATFORM_PATH)/issu-version.mk
include $(PLATFORM_PATH)/mlnx-onie-fw-update.mk
include $(PLATFORM_PATH)/mlnx-ssd-fw-update.mk
include $(PLATFORM_PATH)/iproute2.mk
Expand Down
15 changes: 7 additions & 8 deletions platform/mellanox/sdk.dep
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,13 @@ endif

# SX_KERNEL

# TODO: enable for bookworm
#SPATH := $($(SX_KERNEL)_SRC_PATH)
#SLINKS := $(shell find $(SPATH) -type l -exec echo {} \; | grep -Ev ' ')
#SMDEP_PATHS := $(shell git submodule status --recursive -- $(SPATH) | awk '{print $$2}' | grep -Ev ' ')
#SMDEP_FILES := $(foreach path,$(SMDEP_PATHS),$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/,$(shell cd $(path) && git ls-files | grep -Ev ' '))))
#DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
#DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
#DEP_FILES += $(filter-out $(SMDEP_PATHS),$(shell git ls-files -- $(SPATH) | grep -Ev ' '))
SPATH := $($(SX_KERNEL)_SRC_PATH)
SLINKS := $(shell find $(SPATH) -type l -exec echo {} \; | grep -Ev ' ')
SMDEP_PATHS := $(shell git submodule status --recursive -- $(SPATH) | awk '{print $$2}' | grep -Ev ' ')
SMDEP_FILES := $(foreach path,$(SMDEP_PATHS),$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/,$(shell cd $(path) && git ls-files | grep -Ev ' '))))
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(filter-out $(SMDEP_PATHS),$(shell git ls-files -- $(SPATH) | grep -Ev ' '))

$(SX_KERNEL)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_KERNEL)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
Expand Down
13 changes: 6 additions & 7 deletions platform/mellanox/sdk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
MLNX_SDK_VERSION = 4.6.1062
MLNX_SDK_VERSION = 4.6.2104
MLNX_SDK_ISSU_VERSION = 101

MLNX_SDK_DRIVERS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers
Expand Down Expand Up @@ -152,12 +152,11 @@ ifeq ($(SDK_FROM_SRC),y)
$(eval $(call add_derived_package,$(SX_HASH_CALC),$(SX_HASH_CALC_DBGSYM)))
endif

# TODO: enable for bookworm
#SX_KERNEL = sx-kernel_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb
#$(SX_KERNEL)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
#$(SX_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel
#SX_KERNEL_DEV = sx-kernel-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb
#$(eval $(call add_derived_package,$(SX_KERNEL),$(SX_KERNEL_DEV)))
SX_KERNEL = sx-kernel_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb
$(SX_KERNEL)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
$(SX_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel
SX_KERNEL_DEV = sx-kernel-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(SX_KERNEL),$(SX_KERNEL_DEV)))

define make_url
$(1)_URL = $(MLNX_SDK_ASSETS_URL)/$(1)
Expand Down
Loading