Skip to content

Commit

Permalink
[Broadcom] Upgrade xgs SAI version to 12.1.0.2 and update knet driver (
Browse files Browse the repository at this point in the history
…sonic-net#20921)

Why I did it
Move xgs SAI to 12.1 and update knet driver.

12.1.0.2: [AN/LT] Enable Microsoft AN/LT behavior

Work item tracking
Microsoft ADO (number only): 30523065

How I did it
Upgrade xgs SAI version to 12.1.0.2 and update saibcm-modules.

How to verify it
load image on a 7050cx3 DUT, dockers are up and stable.

Signed-off-by: zitingguo-ms <[email protected]>
  • Loading branch information
Gfrom2016 authored and bradh352 committed Jan 2, 2025
1 parent 2d88cbe commit 0013b3f
Show file tree
Hide file tree
Showing 342 changed files with 44,526 additions and 40,180 deletions.
2 changes: 1 addition & 1 deletion platform/broadcom/sai-modules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Broadcom SAI modules

BRCM_OPENNSL_KERNEL_VERSION = 11.2.4.1
BRCM_OPENNSL_KERNEL_VERSION = 12.1.0.2

BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules
Expand Down
4 changes: 2 additions & 2 deletions platform/broadcom/sai.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LIBSAIBCM_XGS_VERSION = 11.2.16.2
LIBSAIBCM_XGS_VERSION = 12.1.0.2
LIBSAIBCM_DNX_VERSION = 11.2.13.1-1
LIBSAIBCM_XGS_BRANCH_NAME = SAI_11.2.16.2
LIBSAIBCM_XGS_BRANCH_NAME = SAI_12.1.0_GA
LIBSAIBCM_DNX_BRANCH_NAME = SAI_11.2.0_GA
LIBSAIBCM_XGS_URL_PREFIX = "https://sonicstorage.blob.core.windows.net/public/sai/sai-broadcom/$(LIBSAIBCM_XGS_BRANCH_NAME)/$(LIBSAIBCM_XGS_VERSION)/xgs"
LIBSAIBCM_DNX_URL_PREFIX = "https://sonicstorage.blob.core.windows.net/public/sai/sai-broadcom/$(LIBSAIBCM_DNX_BRANCH_NAME)/$(LIBSAIBCM_DNX_VERSION)/dnx"
Expand Down
6 changes: 6 additions & 0 deletions platform/broadcom/saibcm-modules/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
opennsl (12.1.0.2) unstable; urgency=medium

* Update to Broadcom SAI 12.1.0.2

-- Ziting Guo <[email protected]> Wed, 18 Dec 2024 02:33:59 +0000

opennsl (11.2.4.1) unstable; urgency=medium

* Update to Broadcom SAI 11.2.4.1
Expand Down
14 changes: 8 additions & 6 deletions platform/broadcom/saibcm-modules/include/kcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#define KCOM_M_CLOCK_CMD 52 /* Clock Commands */
#define KCOM_M_PCIE_LINK_STATUS 53 /* PCIe link status */

#define KCOM_VERSION 16 /* Protocol version */
#define KCOM_VERSION 17 /* Protocol version */

/*
* Message status codes
Expand Down Expand Up @@ -126,10 +126,11 @@ typedef struct kcom_msg_hdr_s {
#define KCOM_NETIF_T_PORT 1
#define KCOM_NETIF_T_META 2

#define KCOM_NETIF_F_ADD_TAG (1U << 0)
#define KCOM_NETIF_F_RCPU_ENCAP (1U << 1)
#define KCOM_NETIF_F_ADD_TAG (1U << 0)
#define KCOM_NETIF_F_RCPU_ENCAP (1U << 1)
/* If a netif has this flag, the packet sent to the netif can't be stripped tag or added tag */
#define KCOM_NETIF_F_KEEP_RX_TAG (1U << 2)
#define KCOM_NETIF_F_KEEP_RX_TAG (1U << 2)
#define KCOM_NETIF_F_USE_SHARED_NDEV (1U << 3)

#define KCOM_NETIF_NAME_MAX 16

Expand Down Expand Up @@ -331,7 +332,7 @@ typedef struct kcom_eth_hw_config_s {
} kcom_eth_hw_config_t;

#ifndef KCOM_HW_INFO_OAMP_PORT_MAX
#define KCOM_HW_INFO_OAMP_PORT_MAX 4
#define KCOM_HW_INFO_OAMP_PORT_MAX 8
#endif

/*
Expand Down Expand Up @@ -370,7 +371,7 @@ typedef struct kcom_msg_version_s {

typedef struct kcom_clock_info_s {
uint8 cmd;
int32 data[8];
int32 data[12];
} kcom_clock_info_t;

/*
Expand Down Expand Up @@ -587,6 +588,7 @@ typedef struct kcom_msg_hw_info_s {
uint32 udh_length_type[4];
uint32 udh_size;
uint32 oamp_punted;
uint32 enet_channels;
uint8 no_skip_udh_check;
uint8 oam_dm_tod_exist;
uint8 system_headers_mode;
Expand Down
10 changes: 10 additions & 0 deletions platform/broadcom/saibcm-modules/include/soc/devids.h
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,11 @@
#define BCM53653_B0_REV_ID 0x11
#define BCM53653_C0_REV_ID 0x21

#define BCM53654_DEVICE_ID 0x8654
#define BCM53654_A0_REV_ID 1
#define BCM53654_B0_REV_ID 0x11
#define BCM53654_C0_REV_ID 0x21

/* Firebolt-5 */
#define BCM56565_DEVICE_ID 0xb565
#define BCM56565_A0_REV_ID 1
Expand Down Expand Up @@ -2044,6 +2049,11 @@
#define Q3_DEVICE_ID_END 0x886f
#define J3AI_DEVICE_ID 0x8890
#define Q3D_DEVICE_ID 0x8870
#ifdef BCM_Q3A_SUPPORT
#define Q3A_DEVICE_ID 0x8490
#define Q3U_DEVICE_ID 0x8400
#define Q3N_DEVICE_ID 0x8405
#endif
#endif
#define Q2A_DEVICE_ID 0x8480
#define Q2A_A0_REV_ID DNXC_A0_REV_ID
Expand Down
33 changes: 33 additions & 0 deletions platform/broadcom/saibcm-modules/make/Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,42 @@ endif

-include ${SDK}/make/Make.local

ifdef ALL_DNX_CHIPS
ALL_DNX2_CHIPS = 1
endif
ifdef ALL_DNXF_CHIPS
ALL_DNXF1_CHIPS = 1
endif

ifdef ALL_CHIPS
ESW_CHIPS = 1
endif # ALL_CHIPS

ifdef ALL_DNX_CHIPS
ALL_DNX2_CHIPS = 1
ALL_DNX3_CHIPS = 1
ALL_DNXF1_CHIPS = 1
ALL_DNXF3_CHIPS = 1
endif # ALL_CHIPS

ifdef ALL_DNX2_CHIPS
CFGFLAGS += -DBCM_DNX_SUPPORT
endif

ifdef ALL_DNX3_CHIPS
CFGFLAGS += -DBCM_DNX3_SUPPORT
endif


ifdef ALL_DNXF1_CHIPS
CFGFLAGS += -DBCM_DNXF_SUPPORT
endif

ifdef ALL_DNXF3_CHIPS
CFGFLAGS += -DBCM_DNXF3_SUPPORT
endif


#
# By default, turn off the "changing directory" message.
#
Expand Down Expand Up @@ -174,6 +206,7 @@ INCFLAGS = -I${INCDIR} -I${SDK}/systems
CFLAGS += ${INCFLAGS}
CXXFLAGS += ${INCFLAGS}
CPPFLAGS += ${INCFLAGS}

CFLAGS += -DSAI_FIXUP -UKCOM_FILTER_MAX -DKCOM_FILTER_MAX=1025 -UKCOM_NETIF_MAX -DKCOM_NETIF_MAX=1056

# Flag to enable multi instance support
Expand Down
9 changes: 9 additions & 0 deletions platform/broadcom/saibcm-modules/make/Make.depend
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ endif

endif # !CLEANING

ifeq ($(ARCH),arm64)
# SAI: SONIC-76388 and SDK: SDK-367718
# This macro removes the redundant macros and gcc options
# JIRA SONIC-69062
UNIQE = $(if $1,$(firstword $1) $(call UNIQE,$(filter-out $(firstword $1),$1)))
CFLAGS := $(call UNIQE,$(CFLAGS))
CFGFLAGS := $(call UNIQE,$(CFGFLAGS))
endif

clean_d::
ifdef QUIET
@$(ECHO) Cleaning dependencies for ${LOCALDIR}
Expand Down
10 changes: 0 additions & 10 deletions platform/broadcom/saibcm-modules/make/Make.kernlib
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@

.SECONDARY:: ${BOBJS}

targetlibsoname = ${lib}.so.${SHAREDLIBVER}
targetlibrealname = ${targetlibsoname}
targetlibso = ${LIBDIR}/${targetlibrealname}

LIBSUFFIX=a

${LIBDIR}/%.a: ${BOBJS}
Expand All @@ -42,11 +38,6 @@ ifdef QUIET
endif
$Q$(RM) $@
$Q$(AR) ${ARFLAGS} $@ $(sort ${BOBJS})
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
ifeq ($(targetbase),unix)
$(CC) -shared -Wl,-soname,${targetlibsoname} -o ${targetlibso} ${BOBJS} -lc
endif
endif # LINUX_MAKE_SHARED_LIB #

targetlib = ${LIBDIR}/${lib}.${LIBSUFFIX}

Expand All @@ -60,7 +51,6 @@ ifdef QUIET
endif
$Q$(RM) ${BOBJS}
$Q$(RM) ${targetlib}
$Q$(RM) ${targetlibso}

distclean:: clean

15 changes: 6 additions & 9 deletions platform/broadcom/saibcm-modules/make/Make.lib
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ ifeq ($(FAST),1)
endif
endif

ifeq ($(LINUX_MAKE_SHARED_LIB),1)
LIBSUFFIX=so.${SHAREDLIBVER}
else
LIBSUFFIX=a
ifeq (1,$(SAND_ONLY))
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
LIBSUFFIX := so.${SHAREDLIBVER}
endif
endif

LIBSUFFIX ?= a

targetlib = ${LIBDIR}/${lib}.${LIBSUFFIX}

all:: ${BLDDIR}/.tree ${targetlib}
Expand All @@ -57,12 +59,7 @@ ifdef QUIET
@$(ECHO) Building library $(notdir $@)
endif
$Q$(RM) $@
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
$(CC) -shared -Wl,-soname,${lib}.${LIBSUFFIX}${EXTRA_LIB_LDFLAGS} -o ${targetlib} ${BOBJS} -lc
else
$(AR) ${ARFLAGS} $@ $(sort ${BOBJS})
endif


install:: all

Expand Down
40 changes: 4 additions & 36 deletions platform/broadcom/saibcm-modules/make/Make.linux
Original file line number Diff line number Diff line change
Expand Up @@ -35,50 +35,18 @@
# LINUX_MAKE_FLAGS
# Additional flags passed to Make
#
# LINUX_MAKE_USER
# Defined: user build
# Undefined: kernel build
#
# LINUX_MAKE_DIR
# Common makefile location, if it is not ../common
#
#

export DEST_DIR_SUFFIX :=$(subst $(realpath $(SDK))/systems,,$(realpath $(CURDIR)/$(dir ($(firstword $(MAKEFILE_LIST))))))

ifeq (,$(kernel_version))
kernel_version=2_4
endif

ifndef LINUX_MAKE_SHARED_LIB
LINUX_MAKE_SHARED_LIB=0
endif

ifeq (,$(SHAREDLIBVER))
SHAREDLIBVER=1
endif

ifndef LINUX_MAKE_DIR
ifdef LINUX_MAKE_USER
LINUX_MAKE_DIR := $(SDK)/systems/linux/user/common
else
LINUX_MAKE_DIR := $(SDK)/systems/linux/kernel/common
endif
endif

ifneq (,$(findstring iproc,$(platform)))
ADD_TO_CFLAGS += -DINCLUDE_MTD
endif
LINUX_MAKE_DIR ?= $(SDK)/systems/linux/user/common

ifdef LINUX_MAKE_USER
CMD = $(LINUX_MAKE_FLAGS) -C $(LINUX_MAKE_DIR) \
platform=$(platform) bldroot_suffix=/$(platform) kernel_version=$(kernel_version) \
LINUX_MAKE_SHARED_LIB=$(LINUX_MAKE_SHARED_LIB) SHAREDLIBVER=$(SHAREDLIBVER)
else
export LINUX_MAKE_KERNEL := 1
CMD = $(LINUX_MAKE_FLAGS) -C $(LINUX_MAKE_DIR) \
platform=$(platform) kernel_version=$(kernel_version)
endif
CMD = $(LINUX_MAKE_FLAGS) -C $(LINUX_MAKE_DIR) \
platform=$(platform) kernel_version=$(kernel_version) \
bldroot_suffix=/$(platform)

ifneq (,$(MIPS_TOOLS_DIR))
CMD += MIPS_TOOLS_DIR=$(MIPS_TOOLS_DIR)
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/saibcm-modules/make/Make.subdirs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ifdef QUIET
endif

${subdirs}::
$Q$(MAKE) -C $@ kernel_version=$(kernel_version) LINUX_MAKE_SHARED_LIB=${LINUX_MAKE_SHARED_LIB} SHAREDLIBVER=${SHAREDLIBVER} ${CLEAN_SUBDIRS}
$Q$(MAKE) -C $@ kernel_version=$(kernel_version) ${CLEAN_SUBDIRS}

clean clean_d install distclean::
ifdef QUIET
Expand Down
Loading

0 comments on commit 0013b3f

Please sign in to comment.