Skip to content

Commit

Permalink
[sairedis]: Update sonic-sairedis pointer and Broadcom/Mellanox SAI/S…
Browse files Browse the repository at this point in the history
…DK/FW (#2826)

[sairedis]: Update sonic-sairedis pointer and Broadcom/Mellanox SAI/SDK/FW
  • Loading branch information
lguohan authored May 6, 2019
2 parents 8080695 + 5e95e27 commit 2519048
Show file tree
Hide file tree
Showing 19 changed files with 660 additions and 204 deletions.
3 changes: 2 additions & 1 deletion platform/broadcom/docker-syncd-brcm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ $(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BRCM)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BRCM_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
endif
Expand Down
31 changes: 11 additions & 20 deletions platform/broadcom/docker-syncd-brcm.mk
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
# docker image for brcm syncd

DOCKER_SYNCD_BRCM = docker-syncd-brcm.gz
$(DOCKER_SYNCD_BRCM)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm
$(DOCKER_SYNCD_BRCM)_DEPENDS += $(SYNCD)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BRCM)_DEPENDS += $(SYNCD_DBG) \
DOCKER_SYNCD_PLATFORM_CODE = brcm
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk

$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_BASE)_FILES += $(DSSERVE) $(BCMCMD)

$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
ifneq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
endif

$(DOCKER_SYNCD_BRCM)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_BRCM)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd

$(DOCKER_SYNCD_BRCM)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
$(DOCKER_SYNCD_BRCM)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker-config-engine
FROM docker-config-engine-stretch

ARG docker_container_name
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
Expand Down
8 changes: 4 additions & 4 deletions platform/broadcom/sai.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
BRCM_SAI = libsaibcm_3.3.5.4m-1_amd64.deb
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.3/libsaibcm_3.3.5.4m-1_amd64.deb?sv=2015-04-05&sr=b&sig=5al8VoedFxE3anjfi4BwLLX2YqU%2BByafkZgEY85TnN8%3D&se=2032-12-17T20%3A59%3A24Z&sp=r"
BRCM_SAI = libsaibcm_3.5.2.1_amd64.deb
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5s/libsaibcm_3.5.2.1_amd64.deb?sv=2015-04-05&sr=b&sig=VsOGePXPU9TtxXxQTkLfM%2FIzW6BL8q6RxP6QputuuEU%3D&se=2156-03-28T05%3A37%3A02Z&sp=r"

BRCM_SAI_DEV = libsaibcm-dev_3.3.5.4m-1_amd64.deb
BRCM_SAI_DEV = libsaibcm-dev_3.5.2.1_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.3/libsaibcm-dev_3.3.5.4m-1_amd64.deb?sv=2015-04-05&sr=b&sig=ROLknrDMqOGeGfOXu8%2BUVl8yKKDyxsq3swiUtR7n63A%3D&se=2032-12-17T20%3A58%3A59Z&sp=r"
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5s/libsaibcm-dev_3.5.2.1_amd64.deb?sv=2015-04-05&sr=b&sig=3pWbROLKK5ZuVcAra%2BYo1pk4B0k1P3C76wVw4KiqOtY%3D&se=2156-03-28T05%3A35%3A35Z&sp=r"

SONIC_ONLINE_DEBS += $(BRCM_SAI)
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)
22 changes: 22 additions & 0 deletions platform/broadcom/saibcm-modules/include/ibde.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,28 @@ 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.
*/
/* Read from the internal device Address space using I2C */
int (*i2c_device_read)(
int dev, /* The device ID to access */
uint32 addr, /* The address to access in the internal device address space */
uint32 *value);/* the value to be read. */
/* Write to the internal device Address space using I2C */
int (*i2c_device_write)(
int dev, /* The device ID to access */
uint32 addr, /* The address to access in the internal device address space */
uint32 value); /* the value to be written. */

} ibde_t;


Expand Down
14 changes: 12 additions & 2 deletions platform/broadcom/saibcm-modules/include/kcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#define KCOM_M_HW_INIT 4 /* H/W initialized */
#define KCOM_M_ETH_HW_CONFIG 5 /* ETH HW config*/
#define KCOM_M_DETACH 6 /* Detach kernel module */
#define KCOM_M_REPROBE 7 /* Reprobe device */
#define KCOM_M_NETIF_CREATE 11 /* Create network interface */
#define KCOM_M_NETIF_DESTROY 12 /* Destroy network interface */
#define KCOM_M_NETIF_LIST 13 /* Get list of network interface IDs */
Expand All @@ -59,7 +60,7 @@
#define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
#define KCOM_M_WB_CLEANUP 51 /* Clean up for warmbooting */

#define KCOM_VERSION 9 /* Protocol version */
#define KCOM_VERSION 10 /* Protocol version */

/*
* Message status codes
Expand Down Expand Up @@ -305,7 +306,7 @@ typedef struct kcom_eth_hw_config_s {
uint8 chan;
uint32 flags;
uint32 value;
} kcom_eth_hw_config_t;
} kcom_eth_hw_config_t;

/*
* Message types
Expand Down Expand Up @@ -379,6 +380,14 @@ typedef struct kcom_msg_detach_s {
uint32 flags;
} kcom_msg_detach_t;

/*
* Reprobe switch device.
*/
typedef struct kcom_msg_reprobe_s {
kcom_msg_hdr_t hdr;
uint32 flags;
} kcom_msg_reprobe_t;

/*
* Enable/Disable debugging packet function.
*/
Expand Down Expand Up @@ -498,6 +507,7 @@ typedef union kcom_msg_s {
kcom_msg_hw_init_t hw_init;
kcom_msg_eth_hw_config_t eth_hw_config;
kcom_msg_detach_t detach;
kcom_msg_reprobe_t reprobe;
kcom_msg_netif_create_t netif_create;
kcom_msg_netif_destroy_t netif_destroy;
kcom_msg_netif_list_t netif_list;
Expand Down
63 changes: 63 additions & 0 deletions platform/broadcom/saibcm-modules/include/soc/devids.h
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,15 @@

#define BCM56980_DEVICE_ID 0xb980
#define BCM56980_A0_REV_ID 1
#define BCM56980_B0_REV_ID 0x11
#define BCM56981_DEVICE_ID 0xb981
#define BCM56981_A0_REV_ID 1
#define BCM56982_DEVICE_ID 0xb982
#define BCM56982_A0_REV_ID 1
#define BCM56983_DEVICE_ID 0xb983
#define BCM56983_A0_REV_ID 1
#define BCM56984_DEVICE_ID 0xb984
#define BCM56984_A0_REV_ID 1

#define BCM56968_DEVICE_ID 0xb968
#define BCM56968_A0_REV_ID 1
Expand Down Expand Up @@ -1289,15 +1298,20 @@

#define BCM56670_DEVICE_ID 0xb670
#define BCM56670_A0_REV_ID 1
#define BCM56670_B0_REV_ID 0x11

#define BCM56671_DEVICE_ID 0xb671
#define BCM56671_A0_REV_ID 1
#define BCM56671_B0_REV_ID 0x11

#define BCM56672_DEVICE_ID 0xb672
#define BCM56672_A0_REV_ID 1
#define BCM56672_B0_REV_ID 0x11

#define BCM56675_DEVICE_ID 0xb675
#define BCM56675_A0_REV_ID 1
#define BCM56675_B0_REV_ID 0x11


#define BCM56565_DEVICE_ID 0xb565
#define BCM56565_A0_REV_ID 1
Expand All @@ -1317,12 +1331,19 @@

#define BCM56760_DEVICE_ID 0xb760
#define BCM56760_A0_REV_ID 1
#define BCM56760_A1_REV_ID 2
#define BCM56760_B0_REV_ID 0x11

#define BCM56761_DEVICE_ID 0xb761
#define BCM56761_A0_REV_ID 1
#define BCM56761_B0_REV_ID 0x11

#define BCM56761_DEVICE_ID 0xb761
#define BCM56761_A0_REV_ID 1
#define BCM56761_A1_REV_ID 2
#define BCM56761_B0_REV_ID 0x11
#define BCM56761_B1_REV_ID 0x12

#define BCM56762_DEVICE_ID 0xb762
#define BCM56762_A0_REV_ID 1
#define BCM56762_B0_REV_ID 0x11
Expand All @@ -1347,6 +1368,11 @@
#define BCM56068_A0_REV_ID 1
#define BCM56068_B0_REV_ID 0x11

#define BCM56068_DEVICE_ID 0xb068
#define BCM56068_A0_REV_ID 1
#define BCM56068_B0_REV_ID 0x11
#define BCM56068_B1_REV_ID 0x12

#define BCM56069_DEVICE_ID 0xb069
#define BCM56069_A0_REV_ID 1
#define BCM56069_B0_REV_ID 0x11
Expand Down Expand Up @@ -1400,6 +1426,42 @@
#define BCM56873_DEVICE_ID 0xb873
#define BCM56873_A0_REV_ID 1

#define BCM56370_DEVICE_ID 0xb370
#define BCM56370_A0_REV_ID 1

#define BCM56371_DEVICE_ID 0xb371
#define BCM56371_A0_REV_ID 1

#define BCM56372_DEVICE_ID 0xb372
#define BCM56372_A0_REV_ID 1

#define BCM56374_DEVICE_ID 0xb374
#define BCM56374_A0_REV_ID 1

#define BCM56375_DEVICE_ID 0xb375
#define BCM56375_A0_REV_ID 1

#define BCM56376_DEVICE_ID 0xb376
#define BCM56376_A0_REV_ID 1

#define BCM56377_DEVICE_ID 0xb377
#define BCM56377_A0_REV_ID 1

#define BCM56577_DEVICE_ID 0xb577
#define BCM56577_A0_REV_ID 1

#define BCM56578_DEVICE_ID 0xb578
#define BCM56578_A0_REV_ID 1

#define BCM56579_DEVICE_ID 0xb579
#define BCM56579_A0_REV_ID 1

#define BCM56770_DEVICE_ID 0xb770
#define BCM56770_A0_REV_ID 1

#define BCM56771_DEVICE_ID 0xb771
#define BCM56771_A0_REV_ID 1

#define BCM53540_DEVICE_ID 0x8540
#define BCM53540_A0_REV_ID 1
#define BCM53547_DEVICE_ID 0x8547
Expand Down Expand Up @@ -1718,6 +1780,7 @@
#define DNXC_B0_REV_ID 0x0011
#define BCM88790_DEVICE_ID 0x8790
#define BCM88790_A0_REV_ID DNXC_A0_REV_ID
#define BCM88790_B0_REV_ID DNXC_B0_REV_ID
#define BCM88791_DEVICE_ID 0x8791
#define BCM88792_DEVICE_ID 0x8792
#define BCM88793_DEVICE_ID 0x8793
Expand Down
8 changes: 6 additions & 2 deletions platform/broadcom/saibcm-modules/make/Makefile.linux-gto
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,19 @@ endif
endif

ifdef DPP_CHIPS
CFLAGS += -DDUNE_BCM -D__DUNE_GTO_BCM_CPU__ -D__DUNE_LINUX_BCM_CPU_PCIE__ -D__DUNE_LINUX_BCM_CPU_PCP_DMA__
CFLAGS += -DDUNE_BCM -D__DUNE_LINUX_BCM_CPU_PCP_DMA__
CFGFLAGS += -DSOC_CM_FUNCTION
endif

ifdef DFE_CHIPS
CFLAGS += -DDUNE_BCM -D__DUNE_GTO_BCM_CPU__ -D__DUNE_LINUX_BCM_CPU_PCIE__
CFLAGS += -DDUNE_BCM
CFGFLAGS += -DSOC_CM_FUNCTION
endif

ifdef SAND_CHIPS
CFLAGS += -D__DUNE_GTO_BCM_CPU__ -D__DUNE_LINUX_BCM_CPU_PCIE__
endif

ifdef SHADOW_PLX
CFLAGS += -DBCM_PLX9656_LOCAL_BUS -DBDE_LINUX_NON_INTERRUPTIBLE -DSHADOW_SVK
endif
Expand Down
Loading

0 comments on commit 2519048

Please sign in to comment.