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
…#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 <zitingguo@microsoft.com>

#### 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)
  • Loading branch information
mssonicbld authored Jan 13, 2025
1 parent 79111e5 commit c7cb178
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 <zitingguo@microsoft.com> 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 c7cb178

Please sign in to comment.