Skip to content

Commit 84ed41d

Browse files
committed
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 <blue@cmd.nu>
1 parent f7389ba commit 84ed41d

File tree

3 files changed

+2
-34
lines changed

3 files changed

+2
-34
lines changed

test/saithrift/Makefile

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,6 @@ ifeq ($(shell dpkg --compare-versions $(THRIFT_VERSION) "le" 0.11.0 && echo True
1414
CFLAGS += -DFORCE_BOOST_SMART_PTR
1515
endif
1616

17-
ifeq ($(platform),MLNX)
18-
CDEFS = -DMLNXSAI
19-
else
20-
ifeq ($(platform),BFT)
21-
CDEFS = -DBFTSAI
22-
else
23-
ifeq ($(platform),CAVIUM)
24-
CDEFS = -DCAVIUMSAI
25-
else
26-
CDEFS = -DBRCMSAI
27-
endif
28-
endif
29-
endif
3017
DEPS = switch_sai_rpc.h switch_sai_types.h
3118
OBJS = switch_sai_rpc.o switch_sai_types.o
3219

test/saithrift/src/saiserver.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ const sai_service_method_table_t test_services = {
215215
test_profile_get_next_value
216216
};
217217

218-
#ifdef BRCMSAI
219218
void sai_diag_shell()
220219
{
221220
sai_status_t status;
@@ -234,7 +233,6 @@ void sai_diag_shell()
234233
sleep(1);
235234
}
236235
}
237-
#endif
238236

239237
struct cmdOptions
240238
{
@@ -442,7 +440,6 @@ main(int argc, char* argv[])
442440
exit(EXIT_FAILURE);
443441
}
444442

445-
//in case of the brcm switch not (!defined(INCLUDE_KNET) && !defined(BCMSIM))
446443
sai_attribute_t attr_pkt;
447444
attr_pkt.id = SAI_SWITCH_ATTR_PACKET_EVENT_NOTIFY;
448445
attr_pkt.value.ptr = reinterpret_cast<sai_pointer_t>(&on_packet_event);
@@ -454,10 +451,8 @@ main(int argc, char* argv[])
454451

455452
handleInitScript(options.initScript);
456453

457-
#ifdef BRCMSAI
458-
std::thread bcm_diag_shell_thread = std::thread(sai_diag_shell);
459-
bcm_diag_shell_thread.detach();
460-
#endif
454+
std::thread diag_shell_thread = std::thread(sai_diag_shell);
455+
diag_shell_thread.detach();
461456

462457
start_sai_thrift_rpc_server(SWITCH_SAI_THRIFT_RPC_SERVER_PORT);
463458

test/saithriftv2/Makefile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,6 @@ CPPFLAGS = -I$(SAI_HEADER_DIR) -I. -std=c++11 -O0 -ggdb
1717
# specify add'l libraries along with libsai
1818
SAIRPC_EXTRA_LIBS?=
1919

20-
ifeq ($(platform),MLNX)
21-
CDEFS = -DMLNXSAI
22-
else
23-
ifeq ($(platform),BFN)
24-
CDEFS = -DBFNSAI
25-
else
26-
ifeq ($(platform),CAVIUM)
27-
CDEFS = -DCAVIUMSAI
28-
else
29-
CDEFS = -DBRCMSAI
30-
endif
31-
endif
32-
endif
33-
3420
ifneq (, $(wildcard /usr/local/bin/ctypesgen))
3521
CTYPESGEN = /usr/local/bin/ctypesgen
3622
else

0 commit comments

Comments
 (0)