From 84ed41d3866a52baed7f4f9ccbb1a8b79bf0c04e Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Fri, 1 Mar 2024 13:38:23 +0100 Subject: [PATCH] Remove use of vendor specific macros SAI should not care about which vendor is loaded, so remove the compile time requirement to specify which vendor will be. Signed-off-by: Christian Svensson --- test/saithrift/Makefile | 13 ------------- test/saithrift/src/saiserver.cpp | 9 ++------- test/saithriftv2/Makefile | 14 -------------- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/test/saithrift/Makefile b/test/saithrift/Makefile index bc8bb52d5..490dcaf55 100644 --- a/test/saithrift/Makefile +++ b/test/saithrift/Makefile @@ -14,19 +14,6 @@ ifeq ($(shell dpkg --compare-versions $(THRIFT_VERSION) "le" 0.11.0 && echo True CFLAGS += -DFORCE_BOOST_SMART_PTR endif -ifeq ($(platform),MLNX) -CDEFS = -DMLNXSAI -else -ifeq ($(platform),BFT) -CDEFS = -DBFTSAI -else -ifeq ($(platform),CAVIUM) -CDEFS = -DCAVIUMSAI -else -CDEFS = -DBRCMSAI -endif -endif -endif DEPS = switch_sai_rpc.h switch_sai_types.h OBJS = switch_sai_rpc.o switch_sai_types.o diff --git a/test/saithrift/src/saiserver.cpp b/test/saithrift/src/saiserver.cpp index 7120b26d1..063111a8a 100644 --- a/test/saithrift/src/saiserver.cpp +++ b/test/saithrift/src/saiserver.cpp @@ -215,7 +215,6 @@ const sai_service_method_table_t test_services = { test_profile_get_next_value }; -#ifdef BRCMSAI void sai_diag_shell() { sai_status_t status; @@ -234,7 +233,6 @@ void sai_diag_shell() sleep(1); } } -#endif struct cmdOptions { @@ -442,7 +440,6 @@ main(int argc, char* argv[]) exit(EXIT_FAILURE); } - //in case of the brcm switch not (!defined(INCLUDE_KNET) && !defined(BCMSIM)) sai_attribute_t attr_pkt; attr_pkt.id = SAI_SWITCH_ATTR_PACKET_EVENT_NOTIFY; attr_pkt.value.ptr = reinterpret_cast(&on_packet_event); @@ -454,10 +451,8 @@ main(int argc, char* argv[]) handleInitScript(options.initScript); -#ifdef BRCMSAI - std::thread bcm_diag_shell_thread = std::thread(sai_diag_shell); - bcm_diag_shell_thread.detach(); -#endif + std::thread diag_shell_thread = std::thread(sai_diag_shell); + diag_shell_thread.detach(); start_sai_thrift_rpc_server(SWITCH_SAI_THRIFT_RPC_SERVER_PORT); diff --git a/test/saithriftv2/Makefile b/test/saithriftv2/Makefile index 54db9afd3..8fc18adfc 100644 --- a/test/saithriftv2/Makefile +++ b/test/saithriftv2/Makefile @@ -17,20 +17,6 @@ CPPFLAGS = -I$(SAI_HEADER_DIR) -I. -std=c++11 -O0 -ggdb # specify add'l libraries along with libsai SAIRPC_EXTRA_LIBS?= -ifeq ($(platform),MLNX) -CDEFS = -DMLNXSAI -else -ifeq ($(platform),BFN) -CDEFS = -DBFNSAI -else -ifeq ($(platform),CAVIUM) -CDEFS = -DCAVIUMSAI -else -CDEFS = -DBRCMSAI -endif -endif -endif - ifneq (, $(wildcard /usr/local/bin/ctypesgen)) CTYPESGEN = /usr/local/bin/ctypesgen else