diff options
Diffstat (limited to 'lib/libtle_misc')
-rw-r--r-- | lib/libtle_misc/Makefile | 18 | ||||
-rw-r--r-- | lib/libtle_misc/tle_dpdk_wrapper.h | 7 |
2 files changed, 7 insertions, 18 deletions
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 |