From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20B07A0613 for ; Wed, 28 Aug 2019 16:47:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E19021C013; Wed, 28 Aug 2019 16:46:44 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 71A441BEEE for ; Wed, 28 Aug 2019 16:46:40 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 01A4315AB; Wed, 28 Aug 2019 07:46:40 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E251E3F246; Wed, 28 Aug 2019 07:46:39 -0700 (PDT) From: Honnappa Nagarahalli To: olivier.matz@6wind.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, honnappa.nagarahalli@arm.com Cc: dev@dpdk.org, dharmik.thakkar@arm.com, gavin.hu@arm.com, ruifeng.wang@arm.com, nd@arm.com Date: Wed, 28 Aug 2019 09:46:13 -0500 Message-Id: <20190828144614.25284-5-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190828144614.25284-1-honnappa.nagarahalli@arm.com> References: <20190828144614.25284-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH 4/5] lib/ring: add ring APIs to support 32b ring elements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add ring APIs to support 32b ring elements using templates. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu Reviewed-by: Ruifeng Wang --- lib/librte_ring/Makefile | 3 ++- lib/librte_ring/meson.build | 4 +++- lib/librte_ring/rte_ring_32.c | 19 +++++++++++++++ lib/librte_ring/rte_ring_32.h | 36 ++++++++++++++++++++++++++++ lib/librte_ring/rte_ring_version.map | 2 ++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 lib/librte_ring/rte_ring_32.c create mode 100644 lib/librte_ring/rte_ring_32.h diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile index 818898110..3102bb64d 100644 --- a/lib/librte_ring/Makefile +++ b/lib/librte_ring/Makefile @@ -14,10 +14,11 @@ EXPORT_MAP := rte_ring_version.map LIBABIVER := 2 # all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c +SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c rte_ring_32.c # install includes SYMLINK-$(CONFIG_RTE_LIBRTE_RING)-include := rte_ring.h \ + rte_ring_32.h \ rte_ring_generic.h \ rte_ring_c11_mem.h \ rte_ring_template.h \ diff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build index e4e208a7c..81ea53ed7 100644 --- a/lib/librte_ring/meson.build +++ b/lib/librte_ring/meson.build @@ -2,8 +2,10 @@ # Copyright(c) 2017 Intel Corporation version = 2 -sources = files('rte_ring.c') +sources = files('rte_ring.c', + 'rte_ring_32.c') headers = files('rte_ring.h', + 'rte_ring_32.h', 'rte_ring_c11_mem.h', 'rte_ring_generic.h', 'rte_ring_template.h', diff --git a/lib/librte_ring/rte_ring_32.c b/lib/librte_ring/rte_ring_32.c new file mode 100644 index 000000000..09e90cec1 --- /dev/null +++ b/lib/librte_ring/rte_ring_32.c @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2019 Arm Limited + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include diff --git a/lib/librte_ring/rte_ring_32.h b/lib/librte_ring/rte_ring_32.h new file mode 100644 index 000000000..5270a9bc7 --- /dev/null +++ b/lib/librte_ring/rte_ring_32.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2019 Arm Limited + */ + +#ifndef _RTE_RING_32_H_ +#define _RTE_RING_32_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define RTE_RING_TMPLT_API_SUFFIX 32 +#define RTE_RING_TMPLT_ELEM_SIZE sizeof(uint32_t) +#define RTE_RING_TMPLT_ELEM_TYPE uint32_t +#define RTE_RING_TMPLT_EXPERIMENTAL __rte_experimental + +#include + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_RING_32_H_ */ diff --git a/lib/librte_ring/rte_ring_version.map b/lib/librte_ring/rte_ring_version.map index e410a7503..9efba91bb 100644 --- a/lib/librte_ring/rte_ring_version.map +++ b/lib/librte_ring/rte_ring_version.map @@ -21,7 +21,9 @@ DPDK_2.2 { EXPERIMENTAL { global: + rte_ring_create_32; rte_ring_create_elem; + rte_ring_get_memsize_32; rte_ring_get_memsize_elem; rte_ring_reset; -- 2.17.1