Skip to content

Commit

Permalink
Fix makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Dec 17, 2024
1 parent 34895e5 commit a9767a4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 21 deletions.
53 changes: 35 additions & 18 deletions vslib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
AM_CXXFLAGS = $(SAIINC) -I$(top_srcdir)/lib -I/usr/include/libnl3
AM_CXXFLAGS = $(SAIINC) -I$(top_srcdir)/lib -I/usr/include/libnl3 -Ivpp

CFLAGS_COMMON= -fPIC -pipe -Wall -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Werror -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Wno-inline -Winvalid-pch -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wwrite-strings -Wno-switch-default -Wconversion -Wno-psabi -Wcast-align=strict

# TODO those are currently disabled flags from C files untill all warnings will be fixed
DISABLED_FLAGS= \
-Wno-unused-function \
-Wno-sign-conversion \
-Wno-conversion \
-Wno-unused-variable \
-Wno-sign-compare \
-Wno-shadow \
-Wno-discarded-qualifiers \
-Wno-redundant-decls \
-Wno-cast-align \
-Wno-pointer-sign \
-Wno-stringop-truncation \
-Wno-cast-qual

# TODO fix multiple paths
AM_CFLAGS = -I/usr/include/vpp_plugins -fPIC -I. #-I.. -I../../ -I../../../
AM_CFLAGS = -I/usr/include/vpp_plugins -fPIC $(CFLAGS_COMMON) $(DISABLED_FLAGS) -I. #-I.. -I../../ -I../../../

lib_LTLIBRARIES = libsaivs.la

Expand All @@ -10,10 +27,6 @@ noinst_LIBRARIES = libSaiVS.a
# TODO: move vppxlate to proper lib and namespaces

libSaiVS_a_SOURCES = \
vppxlate/SaiVppXlate.c \
vppxlate/SaiVppStats.c \
vppxlate/SaiAclStats.c \
vppxlate/SaiIntfStats.c \
Buffer.cpp \
ContextConfigContainer.cpp \
ContextConfig.cpp \
Expand Down Expand Up @@ -66,18 +79,22 @@ libSaiVS_a_SOURCES = \
SwitchState.cpp \
TrafficFilterPipes.cpp \
TrafficForwarder.cpp \
SaiObjectDB.cpp \
SwitchVpp.cpp \
SwitchVppAcl.cpp \
SwitchVppNexthop.cpp \
SwitchVppUtils.cpp \
SwitchVppFdb.cpp \
SwitchVppRif.cpp \
SwitchVppBfd.cpp \
SwitchVppHostif.cpp \
SwitchVppRoute.cpp \
SwitchVppNbr.cpp \
TunnelManager.cpp \
vpp/SaiObjectDB.cpp \
vpp/SwitchVpp.cpp \
vpp/SwitchVppAcl.cpp \
vpp/SwitchVppNexthop.cpp \
vpp/SwitchVppUtils.cpp \
vpp/SwitchVppFdb.cpp \
vpp/SwitchVppRif.cpp \
vpp/SwitchVppBfd.cpp \
vpp/SwitchVppHostif.cpp \
vpp/SwitchVppRoute.cpp \
vpp/SwitchVppNbr.cpp \
vpp/TunnelManager.cpp \
vpp/vppxlate/SaiVppXlate.c \
vpp/vppxlate/SaiVppStats.c \
vpp/vppxlate/SaiAclStats.c \
vpp/vppxlate/SaiIntfStats.c \
VirtualSwitchSaiInterface.cpp \
VirtualSwitchSaiInterfaceFdb.cpp \
VirtualSwitchSaiInterfacePort.cpp
Expand Down
6 changes: 3 additions & 3 deletions vslib/vpp/vppxlate/SaiVppXlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ static void vpp_base_vpe_init(void)
_(INTERFACE_MSG_ID(SW_INTERFACE_ADD_DEL_ADDRESS_REPLY), sw_interface_add_del_address_reply) \
_(INTERFACE_MSG_ID(SW_INTERFACE_SET_FLAGS_REPLY), sw_interface_set_flags_reply) \
_(INTERFACE_MSG_ID(SW_INTERFACE_SET_MTU_REPLY), sw_interface_set_mtu_reply) \
_(INTERFACE_MSG_ID(SW_INTERFACE_SET_MAC_ADDRESS_REPLY), sw_interface_set_mac_address_reply) \
_(INTERFACE_MSG_ID(SW_INTERFACE_SET_MAC_ADDRESS_REPLY), sw_interface_set_mac_address_reply) \
_(INTERFACE_MSG_ID(HW_INTERFACE_SET_MTU_REPLY), hw_interface_set_mtu_reply) \
_(INTERFACE_MSG_ID(WANT_INTERFACE_EVENTS), want_interface_events_reply) \
_(INTERFACE_MSG_ID(SW_INTERFACE_EVENT), sw_interface_event) \
Expand Down Expand Up @@ -2208,13 +2208,13 @@ int __vpp_acl_interface_bind_unbind (const char *hwif_name, uint32_t acl_index,
int vpp_acl_interface_bind (const char *hwif_name, uint32_t acl_index,
bool is_input)
{
__vpp_acl_interface_bind_unbind(hwif_name, acl_index, is_input, true);
return __vpp_acl_interface_bind_unbind(hwif_name, acl_index, is_input, true);
}

int vpp_acl_interface_unbind (const char *hwif_name, uint32_t acl_index,
bool is_input)
{
__vpp_acl_interface_bind_unbind(hwif_name, acl_index, is_input, false);
return __vpp_acl_interface_bind_unbind(hwif_name, acl_index, is_input, false);
}

int vpp_ip_flow_hash_set (uint32_t vrf_id, uint32_t hash_mask, int addr_family)
Expand Down

0 comments on commit a9767a4

Please sign in to comment.