diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 9 | ||||
-rw-r--r-- | lib/libtle_dring/Makefile | 18 | ||||
-rw-r--r-- | lib/libtle_l4p/Makefile | 22 | ||||
-rw-r--r-- | lib/libtle_l4p/ctx.c | 2 | ||||
-rw-r--r-- | lib/libtle_l4p/syncookie.h | 2 | ||||
-rw-r--r-- | lib/libtle_memtank/Makefile | 18 | ||||
-rw-r--r-- | lib/libtle_misc/Makefile | 18 | ||||
-rw-r--r-- | lib/libtle_misc/tle_dpdk_wrapper.h | 7 | ||||
-rw-r--r-- | lib/libtle_timer/Makefile | 18 |
9 files changed, 28 insertions, 86 deletions
diff --git a/lib/Makefile b/lib/Makefile index 8d61a08..9c1ca95 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -19,12 +19,17 @@ ifeq ($(TLDK_ROOT),) $(error "Please define TLDK_SDK environment variable") endif -include $(RTE_SDK)/mk/rte.vars.mk - DIRS-y += libtle_misc DIRS-y += libtle_dring DIRS-y += libtle_timer DIRS-y += libtle_memtank DIRS-y += libtle_l4p +DEPDIR-libtle_l4p += libtle_misc +DEPDIR-libtle_l4p += libtle_dring +DEPDIR-libtle_l4p += libtle_timer +DEPDIR-libtle_l4p += libtle_memtank + +libtle_l4p: $(DEPDIR-libtle_l4p) + include $(TLDK_ROOT)/mk/tle.subdir.mk diff --git a/lib/libtle_dring/Makefile b/lib/libtle_dring/Makefile index fa03e90..f91e178 100644 --- a/lib/libtle_dring/Makefile +++ b/lib/libtle_dring/Makefile @@ -11,24 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, can be overwritten by command line or environment -RTE_TARGET ?= x86_64-native-linuxapp-gcc - -include $(RTE_SDK)/mk/rte.vars.mk - # library name -LIB = libtle_dring.a - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) - -EXPORT_MAP := tle_dring_version.map +LIB_NAME = libtle_dring -LIBABIVER := 1 +include $(TLDK_ROOT)/mk/tle.var.mk #source files SRCS-y += dring.c diff --git a/lib/libtle_l4p/Makefile b/lib/libtle_l4p/Makefile index 5c8407e..04c53ba 100644 --- a/lib/libtle_l4p/Makefile +++ b/lib/libtle_l4p/Makefile @@ -11,24 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, can be overwritten by command line or environment -RTE_TARGET ?= x86_64-native-linuxapp-gcc - -include $(RTE_SDK)/mk/rte.vars.mk - # library name -LIB = libtle_l4p.a +LIB_NAME = libtle_l4p -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) - -EXPORT_MAP := tle_l4p_version.map - -LIBABIVER := 1 +include $(TLDK_ROOT)/mk/tle.var.mk #source files SRCS-y += ctx.c @@ -52,4 +38,8 @@ DEPDIRS-y += lib/libtle_memtank DEPDIRS-y += lib/libtle_dring DEPDIRS-y += lib/libtle_timer +LIB_DEPS += tle_memtank +LIB_DEPS += tle_dring +LIB_DEPS += tle_timer + include $(TLDK_ROOT)/mk/tle.lib.mk diff --git a/lib/libtle_l4p/ctx.c b/lib/libtle_l4p/ctx.c index b810983..90dcfb5 100644 --- a/lib/libtle_l4p/ctx.c +++ b/lib/libtle_l4p/ctx.c @@ -22,7 +22,7 @@ #include "stream.h" #include "misc.h" -#include <halfsiphash.h> +#include "halfsiphash.h" #define LPORT_START 0x8000 #define LPORT_END MAX_PORT_NUM diff --git a/lib/libtle_l4p/syncookie.h b/lib/libtle_l4p/syncookie.h index 6d4372d..d0434e9 100644 --- a/lib/libtle_l4p/syncookie.h +++ b/lib/libtle_l4p/syncookie.h @@ -20,7 +20,7 @@ #include "tcp_misc.h" #include <tle_ctx.h> -#include <halfsiphash.h> +#include "halfsiphash.h" #ifdef __cplusplus extern "C" { diff --git a/lib/libtle_memtank/Makefile b/lib/libtle_memtank/Makefile index d87e320..6efa46e 100644 --- a/lib/libtle_memtank/Makefile +++ b/lib/libtle_memtank/Makefile @@ -11,24 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, can be overwritten by command line or environment -RTE_TARGET ?= x86_64-native-linuxapp-gcc - -include $(RTE_SDK)/mk/rte.vars.mk - # library name -LIB = libtle_memtank.a - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) - -EXPORT_MAP := tle_memtank_version.map +LIB_NAME = libtle_memtank -LIBABIVER := 1 +include $(TLDK_ROOT)/mk/tle.var.mk #source files SRCS-y += memtank.c diff --git a/lib/libtle_misc/Makefile b/lib/libtle_misc/Makefile index 9fc26f9..29b6e9c 100644 --- a/lib/libtle_misc/Makefile +++ b/lib/libtle_misc/Makefile @@ -11,24 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, can be overwritten by command line or environment -RTE_TARGET ?= x86_64-native-linuxapp-gcc - -include $(RTE_SDK)/mk/rte.vars.mk - # library name -LIB = libtle_misc.a - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) - -EXPORT_MAP := tle_misc_version.map +LIB_NAME = libtle_misc -LIBABIVER := 1 +include $(TLDK_ROOT)/mk/tle.var.mk SYMLINK-y-include += tle_dpdk_wrapper.h SYMLINK-y-include += tle_version.h diff --git a/lib/libtle_misc/tle_dpdk_wrapper.h b/lib/libtle_misc/tle_dpdk_wrapper.h index 3736964..409678d 100644 --- a/lib/libtle_misc/tle_dpdk_wrapper.h +++ b/lib/libtle_misc/tle_dpdk_wrapper.h @@ -96,11 +96,14 @@ static inline void _rte_ring_dequeue_ptrs(struct rte_ring *r, void **obj_table, uint32_t num) { uint32_t tail; - void **data; tail = r->cons.tail; - data = _rte_ring_get_data(r); +#if RTE_VERSION >= RTE_VERSION_NUM(20, 8, 0, 0) + __rte_ring_dequeue_elems(r, tail, obj_table, sizeof(obj_table[0]), num); +#else + void **data = _rte_ring_get_data(r); DEQUEUE_PTRS(r, data, tail, obj_table, num, void *); +#endif } #else diff --git a/lib/libtle_timer/Makefile b/lib/libtle_timer/Makefile index c17d219..f0867b2 100644 --- a/lib/libtle_timer/Makefile +++ b/lib/libtle_timer/Makefile @@ -11,24 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, can be overwritten by command line or environment -RTE_TARGET ?= x86_64-native-linuxapp-gcc - -include $(RTE_SDK)/mk/rte.vars.mk - # library name -LIB = libtle_timer.a - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) - -EXPORT_MAP := tle_timer_version.map +LIB_NAME = libtle_timer -LIBABIVER := 1 +include $(TLDK_ROOT)/mk/tle.var.mk #source files SRCS-y += timer.c |