Skip to content

Commit

Permalink
Remove use of vendor specific macros
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bluecmd committed Mar 1, 2024
1 parent f7389ba commit 84ed41d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 34 deletions.
13 changes: 0 additions & 13 deletions test/saithrift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 2 additions & 7 deletions test/saithrift/src/saiserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -234,7 +233,6 @@ void sai_diag_shell()
sleep(1);
}
}
#endif

struct cmdOptions
{
Expand Down Expand Up @@ -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<sai_pointer_t>(&on_packet_event);
Expand All @@ -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);

Expand Down
14 changes: 0 additions & 14 deletions test/saithriftv2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84ed41d

Please sign in to comment.