Skip to content

Commit

Permalink
[broadom]: Upgrade broadcom SAI to 3.7.3.2
Browse files Browse the repository at this point in the history
[Broadcom] : update saibcm-modules to sdk 6.5.16
[Broadcom SAI] : upgrade Broadcom SAI to 3.7.3.2
  • Loading branch information
judyjoseph authored and lguohan committed Dec 19, 2019
1 parent 4458efb commit 9c4c36e
Show file tree
Hide file tree
Showing 39 changed files with 3,560 additions and 1,967 deletions.
7 changes: 3 additions & 4 deletions platform/broadcom/docker-syncd-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages %}
FROM docker-config-engine-stretch

ARG docker_container_name
Expand All @@ -14,10 +15,8 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -i \
{% for deb in docker_syncd_brcm_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %}
# Install locally-built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_syncd_brcm_debs.split(' ')) }}

## TODO: add kmod into Depends
RUN apt-get install -yf kmod
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/sai-modules.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Broadcom SAI modules

KVERSION = 4.9.0-9-2-amd64
BRCM_OPENNSL_KERNEL_VERSION = 3.4.1.11-1
BRCM_OPENNSL_KERNEL_VERSION = 3.7.3.3-1

BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules
Expand Down
10 changes: 5 additions & 5 deletions platform/broadcom/sai.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
BRCM_SAI = libsaibcm_3.5.3.1m-25_amd64.deb
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5/libsaibcm_3.5.3.1m-26_amd64.deb?sv=2015-04-05&sr=b&sig=zo83IKnlT7goymXwynW8%2Fx6rR2eIh0AiIS%2BSrSMUhRE%3D&se=2033-07-21T18%3A50%3A27Z&sp=r"
BRCM_SAI = libsaibcm_3.7.3.3_amd64.deb
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm_3.7.3.3_amd64.deb?sv=2015-04-05&sr=b&sig=Y66VSRUEl4PDf5kHRo%2FS3DBBE9tONSyCzNJvi8IP9n8%3D&se=2033-08-25T01%3A22%3A08Z&sp=r"

BRCM_SAI_DEV = libsaibcm-dev_3.5.3.1m-25_amd64.deb
BRCM_SAI_DEV = libsaibcm-dev_3.7.3.3_amd64.deb
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5/libsaibcm-dev_3.5.3.1m-26_amd64.deb?sv=2015-04-05&sr=b&sig=tQmkCIy2mnb9rH7B9oXFUZDwijMGXWnVtta2CNTMbFM%3D&se=2033-07-21T18%3A50%3A47Z&sp=r"
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm-dev_3.7.3.3_amd64.deb?sv=2015-04-05&sr=b&sig=6%2BWzgFL845H9lKE0COsN53P4MO4UWfSo0z%2FmUMFbYVk%3D&se=2033-08-25T01%3A21%3A50Z&sp=r"

SONIC_ONLINE_DEBS += $(BRCM_SAI)
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)
21 changes: 21 additions & 0 deletions platform/broadcom/saibcm-modules/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
opennsl (3.7.3.3-1) unstable; urgency=medium

* Port Broadcom SAI 3.7.3.3
* Cherry-pick change from master branch, 3.7.3.3-1

-- Judy Joseph <jujoseph@microsoft.com> Fri, 2 Dec 2019 15:32:47 +0000

opennsl (3.7.3.2-1) unstable; urgency=medium

* Port Broadcom SAI 3.7.3.2
* Cherry-pick change from master branch, 3.7.3.2-1

-- Judy Joseph <jujoseph@microsoft.com> Fri, 12 Nov 2019 15:22:47 +0000

opennsl (3.7.3.1-1) unstable; urgency=medium

* Port Broadcom SAI 3.7.3.1
* Cherry-pick change from master branch, 3.7.3.1-1

-- Judy Joseph <jujoseph@microsoft.com> Fri, 19 Sep 2019 13:11:47 +0000

opennsl (3.4.1.11-1) unstable; urgency=medium

* Port Broadcom SAI 3.4.1.11
Expand Down
26 changes: 25 additions & 1 deletion platform/broadcom/saibcm-modules/debian/opennsl-modules.init
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,38 @@ function create_devices()
# level logs
function load_kernel_modules()
{
modprobe linux-kernel-bde dmasize=32M maxpayload=128 debug=4 dma_debug=1
. /host/machine.conf

if [ -n "$aboot_platform" ]; then
platform=$aboot_platform
elif [ -n "$onie_platform" ]; then
platform=$onie_platform
else
platform="unknown"
fi

# Set the default configuration for dmasize and usemsi parameters
dmasize=32M
usemsi=0

# Source the platform env file
env_file="/usr/share/sonic/device/$platform/platform_env.conf"
source $env_file

modprobe linux-kernel-bde dmasize=$dmasize maxpayload=128 debug=4 dma_debug=1 usemsi=$usemsi
modprobe linux-user-bde

# Using insmod with absolute path for psample to make sure bcm psample is loaded.
# There is a different psample.ko module getting created at net/psample/psample.ko
insmod /lib/modules/$(uname -r)/extra/psample.ko

modprobe linux-bcm-knet use_rx_skb=1 rx_buffer_size=9238 debug=0x5020
modprobe linux-knet-cb
}

function remove_kernel_modules()
{
rmmod psample.ko
rmmod linux-knet-cb
rmmod linux-bcm-knet
rmmod linux-user-bde
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ systems/linux/user/x86-smp_generic_64-2_6/linux-bcm-knet.ko lib/modules/4.9.0-9-
systems/linux/user/x86-smp_generic_64-2_6/linux-kernel-bde.ko lib/modules/4.9.0-9-2-amd64/extra
systems/linux/user/x86-smp_generic_64-2_6/linux-user-bde.ko lib/modules/4.9.0-9-2-amd64/extra
systems/linux/user/x86-smp_generic_64-2_6/linux-knet-cb.ko lib/modules/4.9.0-9-2-amd64/extra
systems/linux/user/x86-smp_generic_64-2_6/psample.ko lib/modules/4.9.0-9-2-amd64/extra
systemd/opennsl-modules.service lib/systemd/system
6 changes: 3 additions & 3 deletions platform/broadcom/saibcm-modules/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ kdist_config: prep-deb-files
kdist_clean: clean
dh_testdir
dh_clean
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 BUILD_PSAMPLE=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean
# rm -f driver/*.o driver/*.ko
#
### end KERNEL SETUP
Expand All @@ -78,7 +78,7 @@ build-arch-stamp:
dh_testdir

# Add here command to compile/build the package.
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 BUILD_PSAMPLE=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6

touch $@

Expand All @@ -103,7 +103,7 @@ clean:
rm -f build-arch-stamp build-indep-stamp configure-stamp

# Add here commands to clean up after the build process.
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 BUILD_PSAMPLE=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean

dh_clean

Expand Down
8 changes: 0 additions & 8 deletions platform/broadcom/saibcm-modules/include/ibde.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,6 @@ typedef struct ibde_s {
*/
int (*get_cmic_ver)(int d, uint32 *ver);

/*
* Probe available devices.
* Return value :
* 0: success to probe available devices
* -1: error happens during probe
*/
int (*probe)(void);

/*
* I2C operations on the Device, assuming it is connected by I2C to the CPU.
*/
Expand Down
19 changes: 17 additions & 2 deletions platform/broadcom/saibcm-modules/include/kcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ typedef struct kcom_msg_hdr_s {

#define KCOM_NETIF_NAME_MAX 16

/*
* Max size of Sand System Headers
* For DNX, Module Header(20B) + PTCH(2B) + ITMH(5B)
* For DPP, PTCH(2B) + ITMH(4B)
*/
#define KCOM_NETIF_SYSTEM_HEADERS_SIZE_MAX 27

typedef struct kcom_netif_s {
uint16 id;
uint8 type;
Expand All @@ -133,6 +140,8 @@ typedef struct kcom_netif_s {
uint8 macaddr[6];
uint8 ptch[2];
uint8 itmh[4];
uint8 system_headers[KCOM_NETIF_SYSTEM_HEADERS_SIZE_MAX];
uint8 system_headers_size;
char name[KCOM_NETIF_NAME_MAX];
} kcom_netif_t;

Expand Down Expand Up @@ -216,6 +225,13 @@ typedef struct kcom_filter_s {
uint8 b[KCOM_FILTER_BYTES_MAX];
uint32 w[KCOM_FILTER_WORDS_MAX];
} mask;
/** Information to parse Dune system headers */
uint32 ftmh_lb_key_ext_size;
uint32 ftmh_stacking_ext_size;
uint32 pph_base_size;
uint32 pph_lif_ext_size[8];
uint8 udh_enable;
uint32 udh_length_type[4];
} kcom_filter_t;

/*
Expand Down Expand Up @@ -470,8 +486,7 @@ typedef struct kcom_msg_filter_destroy_s {
* Get list of currently defined packet filters.
*/
#ifndef KCOM_FILTER_MAX
/* SAI_FIXUP - Increased the filters to 1024 from 128 */
#define KCOM_FILTER_MAX 1024
#define KCOM_FILTER_MAX 128
#endif

typedef struct kcom_msg_filter_list_s {
Expand Down
Loading

0 comments on commit 9c4c36e

Please sign in to comment.