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 973ECA2EDB for ; Fri, 6 Sep 2019 21:06:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23E541BF0C; Fri, 6 Sep 2019 21:06:08 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id C391E1BEAE for ; Fri, 6 Sep 2019 21:06:01 +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 3F5A31596; Fri, 6 Sep 2019 12:06:01 -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 2CB603F59C; Fri, 6 Sep 2019 12:06:01 -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 Cc: dev@dpdk.org, pbhagavatula@marvell.com, jerinj@marvell.com, Honnappa Nagarahalli Date: Fri, 6 Sep 2019 14:05:08 -0500 Message-Id: <20190906190510.11146-5-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190906190510.11146-1-honnappa.nagarahalli@arm.com> References: <20190828144614.25284-1-honnappa.nagarahalli@arm.com> <20190906190510.11146-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 4/6] 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