Skip to content

Commit 4dbee98

Browse files
authored
[Broadcom] Move Broadcom xgs SAI to 13.2 and upgrade knet driver (sonic-net#1169)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it This is a cherry-pick of sonic-net#22054 Move Broadcom xgs SAI to 13.2 and upgrade knet driver. ##### Work item tracking - Microsoft ADO **(number only)**: 33040198 #### How I did it Update xgs SAI version in sai.mk file and update knet driver. #### How to verify it https://elastictest.org/scheduler/testplan/68305fb75fd755780f883e56?leftSideViewMode=brief Signed-off-by: zitingguo-ms <[email protected]> --------- Signed-off-by: zitingguo-ms <[email protected]> Signed-off-by: zitingguo <[email protected]>
1 parent 09a5352 commit 4dbee98

497 files changed

Lines changed: 82362 additions & 32894 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

platform/broadcom/sai-modules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Broadcom SAI modules
22

3-
BRCM_OPENNSL_KERNEL_VERSION = 12.5.0.1
3+
BRCM_OPENNSL_KERNEL_VERSION = 13.2.0.0
44

55
BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
66
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules

platform/broadcom/sai.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
LIBSAIBCM_XGS_VERSION = 12.5.4.3
1+
LIBSAIBCM_XGS_VERSION = 13.2.0.0
22
LIBSAIBCM_DNX_VERSION = 12.3.3.2
3-
LIBSAIBCM_XGS_BRANCH_NAME = SAI_12.5.0_GA
3+
LIBSAIBCM_XGS_BRANCH_NAME = SAI_13.2.0_GA
44
LIBSAIBCM_DNX_BRANCH_NAME = SAI_12.3.0_GA
55
LIBSAIBCM_XGS_URL_PREFIX = "https://sonicstorage.blob.core.windows.net/public/sai/sai-broadcom/$(LIBSAIBCM_XGS_BRANCH_NAME)/$(LIBSAIBCM_XGS_VERSION)/xgs"
66
LIBSAIBCM_DNX_URL_PREFIX = "https://sonicstorage.blob.core.windows.net/public/sai/sai-broadcom/$(LIBSAIBCM_DNX_BRANCH_NAME)/$(LIBSAIBCM_DNX_VERSION)/dnx"

platform/broadcom/saibcm-modules/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
opennsl (13.2.0.0) unstable; urgency=medium
2+
3+
* Update to Broadcom SAI 13.2.0.0
4+
5+
-- Ziting Guo <[email protected]> Tue, 27 May 2025 05:46:34 +0000
6+
17
opennsl (12.5.0.1) unstable; urgency=medium
28

39
* Update to Broadcom SAI 12.5.0.1

platform/broadcom/saibcm-modules/include/ibde.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ typedef struct ibde_s {
104104
#define BDE_256K_REG_SPACE 0x20000000 /* Map 256K (v 64K) */
105105
#define BDE_128K_REG_SPACE 0x40000000 /* Map 128K (v 64K) */
106106
#define BDE_320K_REG_SPACE 0x80000000 /* Map 256K+64K */
107-
107+
#ifdef INCLUDE_SRAM_DMA
108+
#define BDE_TEST_DEVICES 1
109+
#endif
108110

109111
/* Bus supports only 16bit reads */
110112
#define BDE_DEV_BUS_RD_16BIT SAL_DEV_BUS_RD_16BIT

platform/broadcom/saibcm-modules/include/kcom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
#define KCOM_M_CLOCK_CMD 52 /* Clock Commands */
7373
#define KCOM_M_PCIE_LINK_STATUS 53 /* PCIe link status */
7474

75-
#define KCOM_VERSION 17 /* Protocol version */
75+
#define KCOM_VERSION 18 /* Protocol version */
7676

7777
/*
7878
* Message status codes

platform/broadcom/saibcm-modules/include/soc/devids.h

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,12 @@
17301730
#define DNXC_A2_REV_ID 0x0003
17311731
#define DNXC_B0_REV_ID 0x0011
17321732
#define DNXC_B1_REV_ID 0x0012
1733+
#define DNXC_B2_REV_ID 0x0013
1734+
#define DNXC_C0_REV_ID 0x0021
1735+
#define DNXC_C1_REV_ID 0x0022
1736+
#define DNXC_C2_REV_ID 0x0023
1737+
#define DNXC_D0_REV_ID 0x0031
1738+
#define DNXC_D1_REV_ID 0x0032
17331739
#define DNXC_DEVID_FAMILY_MASK 0xfff0
17341740
#define BCM88790_DEVICE_ID 0x8790
17351741
#define BCM88790_A0_REV_ID DNXC_A0_REV_ID
@@ -1748,7 +1754,7 @@
17481754
#define BCM8879C_DEVICE_ID 0x879C
17491755
#define BCM8879D_DEVICE_ID 0x879D
17501756
#define BCM8879E_DEVICE_ID 0x879E
1751-
#define BCM8879F_DEVICE_ID 0x879F
1757+
#define BCM8879F_DEVICE_ID 0x879F
17521758
#ifdef BCM_DNXF3_SUPPORT
17531759
#define RAMON2_DEVICE_ID 0x8910
17541760
#define BCM8891F_DEVICE_ID 0x891F
@@ -2051,8 +2057,10 @@
20512057
#define Q3D_DEVICE_ID 0x8870
20522058
#ifdef BCM_Q3A_SUPPORT
20532059
#define Q3A_DEVICE_ID 0x8490
2054-
#define Q3U_DEVICE_ID 0x8400
2055-
#define Q3N_DEVICE_ID 0x8405
2060+
#define Q3U_DEVICE_ID 0x84A0
2061+
#define Q3N_DEVICE_ID 0x84A5
2062+
#define Q3U_ORIG_DEVICE_ID 0x8400
2063+
#define Q3N_ORIG_DEVICE_ID 0x8405
20562064
#endif
20572065
#endif
20582066
#define Q2A_DEVICE_ID 0x8480
@@ -2194,7 +2202,7 @@
21942202

21952203
#define PLX9056_DEVICE_ID 0x9056 /* needed for DNX_TEST_BOARD */
21962204

2197-
/* Trident4 X11c*/
2205+
/* Trident4 X11c */
21982206
#define BCM56890_DEVICE_ID 0xb890
21992207
#define BCM56890_A0_REV_ID 0x0001
22002208
#define BCM56891_DEVICE_ID 0xb891
@@ -2206,15 +2214,18 @@
22062214
#define BCM56896_DEVICE_ID 0xb896
22072215
#define BCM56896_A0_REV_ID 0x0001
22082216

2209-
/* Trident4 X7*/
2217+
/* Trident4 X7 */
22102218
#define BCM56690_DEVICE_ID 0xb690
22112219
#define BCM56690_A0_REV_ID 0x0001
22122220
#define BCM56692_DEVICE_ID 0xb692
22132221
#define BCM56692_A0_REV_ID 0x0001
22142222

2215-
/* Trident5 X12*/
2223+
/* Trident5 X12 */
22162224
#define BCM78800_DEVICE_ID 0xf800
22172225
#define BCM78800_A0_REV_ID 0x0001
2226+
/* Trident5 X12 8Tbps */
2227+
#define BCM78808_DEVICE_ID 0xf808
2228+
#define BCM78808_A0_REV_ID 0x0001
22182229

22192230
/* Trident4 */
22202231
#define BCM56880_DEVICE_ID 0xb880
@@ -2300,17 +2311,19 @@
23002311
/* Tomahawk5 */
23012312
#define BCM78900_DEVICE_ID 0xf900
23022313
#define BCM78900_B0_REV_ID 0x0011
2303-
23042314
#define BCM78902_DEVICE_ID 0xf902
23052315
#define BCM78902_B0_REV_ID 0x0011
2306-
23072316
#define BCM78903_DEVICE_ID 0xf903
23082317
#define BCM78903_B0_REV_ID 0x0011
23092318

23102319
/* Tomahawk5+ */
23112320
#define BCM78905_DEVICE_ID 0xf905
23122321
#define BCM78905_A0_REV_ID 0x0001
23132322

2323+
/* Tomahawk5-512 */
2324+
#define BCM78907_DEVICE_ID 0xf907
2325+
#define BCM78907_A0_REV_ID 0x0001
2326+
23142327
/* Firelight2 */
23152328
#define BCM56080_DEVICE_ID 0xb080
23162329
#define BCM56080_A0_REV_ID 0x0001

platform/broadcom/saibcm-modules/make/Make.clang

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,7 @@ ifeq (true,$(shell [ $(CLANG_MAJOR) -ge 10 ] && echo true))
4141
export KERNEL_LLVM ?= 1
4242

4343
# Suppress various Clang warnings
44-
CLANG_ADD_CFLAGS += \
45-
-Wno-gnu-designator \
46-
-Wno-gnu-variable-sized-type-not-at-end \
47-
-Wno-address-of-packed-member \
48-
-Wno-unused-command-line-argument \
49-
-Wno-misleading-indentation
44+
CLANG_ADD_CFLAGS += -Wno-gnu-variable-sized-type-not-at-end
5045

5146
# Suppress Clang build issues on TCL Bindings
5247
ifeq (TCL,$(findstring TCL,$(FEATURE_LIST)))
@@ -61,9 +56,10 @@ endif
6156

6257
# Use LLD by default
6358
LDFLAGS += -fuse-ld=lld
59+
60+
# Need these lines in order for GTS Make.custom.all.clang to build
61+
CLANG_ADD_CFLAGS += -Wno-unused-command-line-argument
6462
CLANG_ADD_CFLAGS += -fuse-ld=lld
6563

66-
# Use DWARF V4 for compatibility
67-
CLANG_ADD_CFLAGS += -gdwarf-4
6864
endif
6965
endif

platform/broadcom/saibcm-modules/make/Makefile.linux-gts

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -82,52 +82,37 @@ export TCL840 := 1
8282
# Common CFLAGS
8383
CFGFLAGS += -DUSE_LINUX_BDE_MMAP=1
8484
#CFGFLAGS += -DBDE_LINUX_USE_MSI_INTERRUPT
85-
OPT_CFLAGS += -Wno-error=unused-value
86-
OPT_CFLAGS += -Wno-error=unused-function
87-
OPT_CFLAGS += -Wno-error=cpp
88-
OPT_CFLAGS += -Wno-error=array-bounds
89-
OPT_CFLAGS += -Wno-error=strict-overflow
85+
ifneq (1,$(USE_CLANG))
9086
CFLAGS += -L$(TOOLCHAIN_DIR)/lib
9187
CFLAGS += -L$(TOOLCHAIN_DIR)/lib64
88+
endif
9289
#OPT_CFLAGS += -Wl,--rpath=/lib64 # may need to set rpath and dynamic-linker path here (and possibly in KLFAGS below) in the future, #
9390
#OPT_CFLAGS += -Wl,--dynamic-linker=/lib64/ld-linux-x86-64.so.2 # if we want to build the target executable to be used with shared libs #
9491

92+
# Needed for a warning in src/soc/phy/fcmap/src/bfcmap88060_a0.c that can't be
93+
# fixed because of a Montreal2 FW dependency
94+
ifeq ($(LOCALDIR),src/soc/phy/fcmap/src)
95+
OPT_CFLAGS += -Wno-address-of-packed-member
96+
endif
97+
9598
# Compiler-specific CFLAGS
9699
ifeq (1,$(USE_CLANG)) # CLANG-specific CFLAGS
97-
OPT_CFLAGS += -Wno-strlcpy-strlcat-size
98-
OPT_CFLAGS += -Wno-strncat-size
99100
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
100101
export LIBNSL_DEPRECATED := 1
101102
endif
102103
else # GCC-specific CFLAGS
103-
OPT_CFLAGS += -Wno-error=unused-but-set-variable
104-
OPT_CFLAGS += -Wno-error=maybe-uninitialized
105-
OPT_CFLAGS += -Wno-error=aggressive-loop-optimizations
106-
OPT_CFLAGS += -Wno-error=sizeof-pointer-div #SDK-233830
107-
OPT_CFLAGS += -Wno-error=memset-elt-size #SDK-232626
108-
OPT_CFLAGS += -Wno-error=unused-variable #SDK-232993
109-
OPT_CFLAGS += -Wno-deprecated-declarations #SDK-233174
110104
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 8)" "1"
111-
OPT_CFLAGS += -Wno-stringop-overflow
112-
OPT_CFLAGS += -Wno-stringop-truncation
113-
OPT_CFLAGS += -Wno-error=restrict
114105
endif
115106
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 9)" "1"
116-
OPT_CFLAGS += -Wno-address-of-packed-member
117107
endif
118108
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 10)" "1"
119-
OPT_CFLAGS += -Wno-error=uninitialized
120-
OPT_CFLAGS += -Wno-error=format-overflow
121109
CFLAGS += -fcommon
122-
OPT_CFLAGS += -Wno-zero-length-bounds
123110
endif
124111
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
125112
CFLAGS += -flarge-source-files
126-
OPT_CFLAGS += -Wno-error=address
127113
export LIBNSL_DEPRECATED := 1
128114
endif
129115
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 13)" "1"
130-
OPT_CFLAGS += -Wno-error=enum-int-mismatch
131116
CFLAGS += -fcf-protection
132117
endif
133118
endif # Compiler-specific CFLAGS
@@ -137,9 +122,9 @@ CFGFLAGS += -fgnu89-inline
137122

138123
# set up KFLAGS appropriately. #
139124
ifeq (,$(KFLAGS))
140-
KFLAGS := -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib64 -I$(KERNDIR) -lc -nostdinc -isystem $(SYSINC) -Iinclude -I$(KERNDIR)/arch/x86/include -I$(KERNDIR)/arch/x86/include/generated -I$(KERNDIR)/arch/x86/include/generated/uapi -I$(KERNDIR)/arch/x86/include/uapi -I$(KERNDIR)/include -I$(KERNDIR)/include/generated -I$(KERNDIR)/include/generated/uapi -I$(KERNDIR)/include/uapi -include $(KERNDIR)/include/generated/autoconf.h -D__KERNEL__ -DNDEBUG -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -mno-sse -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-dwarf2-cfi-asm
125+
KFLAGS := -I$(KERNDIR) -nostdinc -isystem $(SYSINC) -Iinclude -I$(KERNDIR)/arch/x86/include -I$(KERNDIR)/arch/x86/include/generated -I$(KERNDIR)/arch/x86/include/generated/uapi -I$(KERNDIR)/arch/x86/include/uapi -I$(KERNDIR)/include -I$(KERNDIR)/include/generated -I$(KERNDIR)/include/generated/uapi -I$(KERNDIR)/include/uapi -include $(KERNDIR)/include/generated/autoconf.h -D__KERNEL__ -DNDEBUG -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -mno-sse -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-dwarf2-cfi-asm
141126
ifneq (1,$(USE_CLANG))
142-
KFLAGS += -funit-at-a-time -maccumulate-outgoing-args -fconserve-stack
127+
KFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib64 -lc -funit-at-a-time -maccumulate-outgoing-args -fconserve-stack
143128
else
144129
KFLAGS += -fno-pie
145130
endif

platform/broadcom/saibcm-modules/make/Makefile.linux-iproc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,32 +77,18 @@ ENDIAN = LE_HOST=1
7777
endif
7878

7979
CFLAGS += -fno-aggressive-loop-optimizations
80-
OPT_CFLAGS += -Wno-error=maybe-uninitialized
81-
OPT_CFLAGS += -Wno-error=unused-function
82-
OPT_CFLAGS += -Wno-error=array-bounds
83-
OPT_CFLAGS += -Wno-error=unused-variable
84-
OPT_CFLAGS += -Wno-error=memset-elt-size #SDK-232626
85-
OPT_CFLAGS += -Wno-error=unused-const-variable
8680
CFLAGS += -fgnu89-inline
8781
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 8)" "1"
88-
OPT_CFLAGS += -Wno-stringop-overflow
89-
OPT_CFLAGS += -Wno-stringop-truncation
90-
OPT_CFLAGS += -Wno-error=restrict
9182
endif
9283
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 9)" "1"
93-
OPT_CFLAGS += -Wno-address-of-packed-member
9484
endif
9585
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 10)" "1"
96-
OPT_CFLAGS += -Wno-error=uninitialized
97-
OPT_CFLAGS += -Wno-error=format-overflow
9886
CFLAGS += -fcommon
9987
endif
10088
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
10189
CFLAGS += -flarge-source-files
102-
OPT_CFLAGS += -Wno-error=address
10390
endif
10491
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 13)" "1"
105-
OPT_CFLAGS += -Wno-error=enum-int-mismatch
10692
endif
10793

10894
CFGFLAGS += -D$(ENDIAN) -DIPROC_CMICD

platform/broadcom/saibcm-modules/make/Makefile.linux-iproc_64

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -81,40 +81,27 @@ else
8181
CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=0
8282
ENDIAN = LE_HOST=1
8383
endif
84-
# JIRA SONIC-69062
85-
CFGFLAGS += -Wp,-w
84+
85+
# Needed for a warning in src/soc/phy/fcmap/src/bfcmap88060_a0.c that can't be
86+
# fixed because of a Montreal2 FW dependency
87+
ifeq ($(LOCALDIR),src/soc/phy/fcmap/src)
88+
OPT_CFLAGS += -Wno-address-of-packed-member
89+
endif
90+
8691
CFGFLAGS += -DPTRS_ARE_64BITS -DLONGS_ARE_64BITS
8792
CFGFLAGS += -DPHYS_ADDRS_ARE_64BITS
8893
CFLAGS += -fno-aggressive-loop-optimizations -fno-strict-overflow
89-
OPT_CFLAGS += -Wno-error=maybe-uninitialized
90-
OPT_CFLAGS += -Wno-error=unused-function
91-
OPT_CFLAGS += -Wno-error=array-bounds
92-
OPT_CFLAGS += -Wno-error=format-overflow
9394
CFLAGS += -fgnu89-inline
94-
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 8)" "1"
95-
OPT_CFLAGS += -Wno-stringop-overflow
96-
OPT_CFLAGS += -Wno-stringop-truncation
97-
OPT_CFLAGS += -Wno-error=restrict
98-
endif
99-
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 9)" "1"
100-
OPT_CFLAGS += -Wno-address-of-packed-member
101-
endif
10295
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 10)" "1"
103-
OPT_CFLAGS += -Wno-error=uninitialized
104-
OPT_CFLAGS += -Wno-error=format-overflow
10596
CFLAGS += -fcommon
10697
endif
10798
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
10899
CFLAGS += -flarge-source-files
109-
OPT_CFLAGS += -Wno-error=address
110-
endif
111-
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 13)" "1"
112-
OPT_CFLAGS += -Wno-error=enum-int-mismatch
113100
endif
114101

115102
CFGFLAGS += -D$(ENDIAN) -DIPROC_CMICD
116103
CFGFLAGS += -DBCM_PLATFORM_STRING=\"IPROC_CMICD\"
117-
CFGFLAGS += -DSAL_BDE_DMA_MEM_DEFAULT=16
104+
#CFGFLAGS += -DSAL_BDE_DMA_MEM_DEFAULT=16
118105

119106
ARCH = arm64
120107
KBUILD_VERBOSE = 1

0 commit comments

Comments
 (0)