Skip to content

Commit c7cb178

Browse files
authored
[Broadcom] Upgrade xgs SAI version to 12.1.0.2 and update knet driver (#21400)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md failure_prs.log skip_prs.log 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 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. ``` admin@str2-7050cx3-acs-14:~$ show ver SONiC Software Version: SONiC.master-20921.724444-eaa99ad15 SONiC OS Version: 12 Distribution: Debian 12.6 Kernel: 6.1.0-22-2-amd64 Build commit: eaa99ad Build date: Wed Dec 18 03:38:02 UTC 2024 Built by: azureuser@e40dbe86c000001 admin@str2-7050cx3-acs-14:~$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6dbe63b1e584 docker-snmp:latest "/usr/local/bin/supe…" 5 minutes ago Up 5 minutes snmp 12ebcc97c6c6 docker-platform-monitor:latest "/usr/bin/docker_ini…" 5 minutes ago Up 5 minutes pmon c3a880ff8206 docker-sonic-mgmt-framework:latest "/usr/local/bin/supe…" 5 minutes ago Up 5 minutes mgmt-framework f5e910b0b904 docker-lldp:latest "/usr/bin/docker-lld…" 5 minutes ago Up 5 minutes lldp c65f9ef5b2ab docker-sonic-gnmi:latest "/usr/local/bin/supe…" 5 minutes ago Up 5 minutes gnmi 3f85f6c05f52 49c44d49f1c3 "/usr/bin/docker_ini…" 6 minutes ago Up 6 minutes dhcp_relay e4a3c8eeb5ab docker-router-advertiser:latest "/usr/bin/docker-ini…" 7 minutes ago Up 7 minutes radv 57c5473af239 docker-syncd-brcm:latest "/usr/local/bin/supe…" 7 minutes ago Up 7 minutes syncd 85c7c96eea64 docker-teamd:latest "/usr/local/bin/supe…" 7 minutes ago Up 7 minutes teamd aa91f6d8dabb docker-fpm-frr:latest "/usr/bin/docker_ini…" 7 minutes ago Up 7 minutes bgp 342d583c743d docker-orchagent:latest "/usr/bin/docker-ini…" 7 minutes ago Up 7 minutes swss 7b04b4830748 docker-eventd:latest "/usr/local/bin/supe…" 7 minutes ago Up 7 minutes eventd 900b315da99c docker-sonic-restapi:latest "/usr/local/bin/supe…" 7 minutes ago Up 7 minutes restapi 4340bb51efd8 docker-database:latest "/usr/local/bin/dock…" 7 minutes ago Up 7 minutes database admin@str2-7050cx3-acs-14:~$ show ip bgp sum IPv4 Unicast Summary: BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0 BGP table version 12804 RIB entries 12807, using 1639296 bytes of memory Peers 4, using 82368 KiB of memory Peer groups 4, using 256 bytes of memory Neighbhor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd NeighborName ----------- --- ----- --------- --------- -------- ----- ------ --------- -------------- -------------- 10.0.0.57 4 64600 3344 3343 12804 0 0 00:06:49 6400 ARISTA01T1 10.0.0.59 4 64600 3342 3340 12804 0 0 00:06:45 6400 ARISTA02T1 10.0.0.61 4 64600 3342 3341 12804 0 0 00:06:45 6400 ARISTA03T1 10.0.0.63 4 64600 3342 3341 12804 0 0 00:06:45 6400 ARISTA04T1 Total number of neighbors 4 admin@str2-7050cx3-acs-14:~$ bcmsh drivshell>bsv bsv BRCM SAI ver: [12.1.0.2], OCP SAI ver: [1.15.0], SDK ver: [sdk-6.5.31-SP8], CANCUN ver: [06.04.01] drivshell>admin@str2-7050cx3-acs-14:~$ ``` Run basic test suite on 7050cx3: https://dev.azure.com/mssonic/internal/_build/results?buildId=724622&view=results 7260: https://dev.azure.com/mssonic/internal/_build/results?buildId=724922&view=results <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [x] 202411 Signed-off-by: zitingguo-ms <[email protected]> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
1 parent 79111e5 commit c7cb178

File tree

342 files changed

+44526
-40180
lines changed

Some content is hidden

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

342 files changed

+44526
-40180
lines changed

platform/broadcom/sai-modules.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Broadcom SAI modules
22

3-
BRCM_OPENNSL_KERNEL_VERSION = 11.2.4.1
3+
BRCM_OPENNSL_KERNEL_VERSION = 12.1.0.2
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
LIBSAIBCM_XGS_VERSION = 11.2.16.2
1+
LIBSAIBCM_XGS_VERSION = 12.1.0.2
22
LIBSAIBCM_DNX_VERSION = 11.2.13.1-1
3-
LIBSAIBCM_XGS_BRANCH_NAME = SAI_11.2.16.2
3+
LIBSAIBCM_XGS_BRANCH_NAME = SAI_12.1.0_GA
44
LIBSAIBCM_DNX_BRANCH_NAME = SAI_11.2.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

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
opennsl (12.1.0.2) unstable; urgency=medium
2+
3+
* Update to Broadcom SAI 12.1.0.2
4+
5+
-- Ziting Guo <[email protected]> Wed, 18 Dec 2024 02:33:59 +0000
6+
17
opennsl (11.2.4.1) unstable; urgency=medium
28

39
* Update to Broadcom SAI 11.2.4.1

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

+8-6
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 16 /* Protocol version */
75+
#define KCOM_VERSION 17 /* Protocol version */
7676

7777
/*
7878
* Message status codes
@@ -126,10 +126,11 @@ typedef struct kcom_msg_hdr_s {
126126
#define KCOM_NETIF_T_PORT 1
127127
#define KCOM_NETIF_T_META 2
128128

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

134135
#define KCOM_NETIF_NAME_MAX 16
135136

@@ -331,7 +332,7 @@ typedef struct kcom_eth_hw_config_s {
331332
} kcom_eth_hw_config_t;
332333

333334
#ifndef KCOM_HW_INFO_OAMP_PORT_MAX
334-
#define KCOM_HW_INFO_OAMP_PORT_MAX 4
335+
#define KCOM_HW_INFO_OAMP_PORT_MAX 8
335336
#endif
336337

337338
/*
@@ -370,7 +371,7 @@ typedef struct kcom_msg_version_s {
370371

371372
typedef struct kcom_clock_info_s {
372373
uint8 cmd;
373-
int32 data[8];
374+
int32 data[12];
374375
} kcom_clock_info_t;
375376

376377
/*
@@ -587,6 +588,7 @@ typedef struct kcom_msg_hw_info_s {
587588
uint32 udh_length_type[4];
588589
uint32 udh_size;
589590
uint32 oamp_punted;
591+
uint32 enet_channels;
590592
uint8 no_skip_udh_check;
591593
uint8 oam_dm_tod_exist;
592594
uint8 system_headers_mode;

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

+10
Original file line numberDiff line numberDiff line change
@@ -1445,6 +1445,11 @@
14451445
#define BCM53653_B0_REV_ID 0x11
14461446
#define BCM53653_C0_REV_ID 0x21
14471447

1448+
#define BCM53654_DEVICE_ID 0x8654
1449+
#define BCM53654_A0_REV_ID 1
1450+
#define BCM53654_B0_REV_ID 0x11
1451+
#define BCM53654_C0_REV_ID 0x21
1452+
14481453
/* Firebolt-5 */
14491454
#define BCM56565_DEVICE_ID 0xb565
14501455
#define BCM56565_A0_REV_ID 1
@@ -2044,6 +2049,11 @@
20442049
#define Q3_DEVICE_ID_END 0x886f
20452050
#define J3AI_DEVICE_ID 0x8890
20462051
#define Q3D_DEVICE_ID 0x8870
2052+
#ifdef BCM_Q3A_SUPPORT
2053+
#define Q3A_DEVICE_ID 0x8490
2054+
#define Q3U_DEVICE_ID 0x8400
2055+
#define Q3N_DEVICE_ID 0x8405
2056+
#endif
20472057
#endif
20482058
#define Q2A_DEVICE_ID 0x8480
20492059
#define Q2A_A0_REV_ID DNXC_A0_REV_ID

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

+33
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,42 @@ endif
6262

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

65+
ifdef ALL_DNX_CHIPS
66+
ALL_DNX2_CHIPS = 1
67+
endif
68+
ifdef ALL_DNXF_CHIPS
69+
ALL_DNXF1_CHIPS = 1
70+
endif
71+
6572
ifdef ALL_CHIPS
6673
ESW_CHIPS = 1
6774
endif # ALL_CHIPS
6875

76+
ifdef ALL_DNX_CHIPS
77+
ALL_DNX2_CHIPS = 1
78+
ALL_DNX3_CHIPS = 1
79+
ALL_DNXF1_CHIPS = 1
80+
ALL_DNXF3_CHIPS = 1
81+
endif # ALL_CHIPS
82+
83+
ifdef ALL_DNX2_CHIPS
84+
CFGFLAGS += -DBCM_DNX_SUPPORT
85+
endif
86+
87+
ifdef ALL_DNX3_CHIPS
88+
CFGFLAGS += -DBCM_DNX3_SUPPORT
89+
endif
90+
91+
92+
ifdef ALL_DNXF1_CHIPS
93+
CFGFLAGS += -DBCM_DNXF_SUPPORT
94+
endif
95+
96+
ifdef ALL_DNXF3_CHIPS
97+
CFGFLAGS += -DBCM_DNXF3_SUPPORT
98+
endif
99+
100+
69101
#
70102
# By default, turn off the "changing directory" message.
71103
#
@@ -174,6 +206,7 @@ INCFLAGS = -I${INCDIR} -I${SDK}/systems
174206
CFLAGS += ${INCFLAGS}
175207
CXXFLAGS += ${INCFLAGS}
176208
CPPFLAGS += ${INCFLAGS}
209+
177210
CFLAGS += -DSAI_FIXUP -UKCOM_FILTER_MAX -DKCOM_FILTER_MAX=1025 -UKCOM_NETIF_MAX -DKCOM_NETIF_MAX=1056
178211

179212
# Flag to enable multi instance support

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

+9
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ endif
106106

107107
endif # !CLEANING
108108

109+
ifeq ($(ARCH),arm64)
110+
# SAI: SONIC-76388 and SDK: SDK-367718
111+
# This macro removes the redundant macros and gcc options
112+
# JIRA SONIC-69062
113+
UNIQE = $(if $1,$(firstword $1) $(call UNIQE,$(filter-out $(firstword $1),$1)))
114+
CFLAGS := $(call UNIQE,$(CFLAGS))
115+
CFGFLAGS := $(call UNIQE,$(CFGFLAGS))
116+
endif
117+
109118
clean_d::
110119
ifdef QUIET
111120
@$(ECHO) Cleaning dependencies for ${LOCALDIR}

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

-10
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030

3131
.SECONDARY:: ${BOBJS}
3232

33-
targetlibsoname = ${lib}.so.${SHAREDLIBVER}
34-
targetlibrealname = ${targetlibsoname}
35-
targetlibso = ${LIBDIR}/${targetlibrealname}
36-
3733
LIBSUFFIX=a
3834

3935
${LIBDIR}/%.a: ${BOBJS}
@@ -42,11 +38,6 @@ ifdef QUIET
4238
endif
4339
$Q$(RM) $@
4440
$Q$(AR) ${ARFLAGS} $@ $(sort ${BOBJS})
45-
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
46-
ifeq ($(targetbase),unix)
47-
$(CC) -shared -Wl,-soname,${targetlibsoname} -o ${targetlibso} ${BOBJS} -lc
48-
endif
49-
endif # LINUX_MAKE_SHARED_LIB #
5041

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

@@ -60,7 +51,6 @@ ifdef QUIET
6051
endif
6152
$Q$(RM) ${BOBJS}
6253
$Q$(RM) ${targetlib}
63-
$Q$(RM) ${targetlibso}
6454

6555
distclean:: clean
6656

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

+6-9
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ ifeq ($(FAST),1)
4141
endif
4242
endif
4343

44-
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
45-
LIBSUFFIX=so.${SHAREDLIBVER}
46-
else
47-
LIBSUFFIX=a
44+
ifeq (1,$(SAND_ONLY))
45+
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
46+
LIBSUFFIX := so.${SHAREDLIBVER}
47+
endif
4848
endif
4949

50+
LIBSUFFIX ?= a
51+
5052
targetlib = ${LIBDIR}/${lib}.${LIBSUFFIX}
5153

5254
all:: ${BLDDIR}/.tree ${targetlib}
@@ -57,12 +59,7 @@ ifdef QUIET
5759
@$(ECHO) Building library $(notdir $@)
5860
endif
5961
$Q$(RM) $@
60-
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
61-
$(CC) -shared -Wl,-soname,${lib}.${LIBSUFFIX}${EXTRA_LIB_LDFLAGS} -o ${targetlib} ${BOBJS} -lc
62-
else
6362
$(AR) ${ARFLAGS} $@ $(sort ${BOBJS})
64-
endif
65-
6663

6764
install:: all
6865

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

+4-36
Original file line numberDiff line numberDiff line change
@@ -35,50 +35,18 @@
3535
# LINUX_MAKE_FLAGS
3636
# Additional flags passed to Make
3737
#
38-
# LINUX_MAKE_USER
39-
# Defined: user build
40-
# Undefined: kernel build
41-
#
4238
# LINUX_MAKE_DIR
4339
# Common makefile location, if it is not ../common
4440
#
4541
#
4642

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

49-
ifeq (,$(kernel_version))
50-
kernel_version=2_4
51-
endif
52-
53-
ifndef LINUX_MAKE_SHARED_LIB
54-
LINUX_MAKE_SHARED_LIB=0
55-
endif
56-
57-
ifeq (,$(SHAREDLIBVER))
58-
SHAREDLIBVER=1
59-
endif
60-
61-
ifndef LINUX_MAKE_DIR
62-
ifdef LINUX_MAKE_USER
63-
LINUX_MAKE_DIR := $(SDK)/systems/linux/user/common
64-
else
65-
LINUX_MAKE_DIR := $(SDK)/systems/linux/kernel/common
66-
endif
67-
endif
68-
69-
ifneq (,$(findstring iproc,$(platform)))
70-
ADD_TO_CFLAGS += -DINCLUDE_MTD
71-
endif
45+
LINUX_MAKE_DIR ?= $(SDK)/systems/linux/user/common
7246

73-
ifdef LINUX_MAKE_USER
74-
CMD = $(LINUX_MAKE_FLAGS) -C $(LINUX_MAKE_DIR) \
75-
platform=$(platform) bldroot_suffix=/$(platform) kernel_version=$(kernel_version) \
76-
LINUX_MAKE_SHARED_LIB=$(LINUX_MAKE_SHARED_LIB) SHAREDLIBVER=$(SHAREDLIBVER)
77-
else
78-
export LINUX_MAKE_KERNEL := 1
79-
CMD = $(LINUX_MAKE_FLAGS) -C $(LINUX_MAKE_DIR) \
80-
platform=$(platform) kernel_version=$(kernel_version)
81-
endif
47+
CMD = $(LINUX_MAKE_FLAGS) -C $(LINUX_MAKE_DIR) \
48+
platform=$(platform) kernel_version=$(kernel_version) \
49+
bldroot_suffix=/$(platform)
8250

8351
ifneq (,$(MIPS_TOOLS_DIR))
8452
CMD += MIPS_TOOLS_DIR=$(MIPS_TOOLS_DIR)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ifdef QUIET
3636
endif
3737

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

4141
clean clean_d install distclean::
4242
ifdef QUIET

0 commit comments

Comments
 (0)