From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id CD0815597 for ; Tue, 24 Jan 2017 11:39:44 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 24 Jan 2017 02:39:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,278,1477983600"; d="scan'208";a="34686805" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by orsmga002.jf.intel.com with ESMTP; 24 Jan 2017 02:39:42 -0800 From: Bruce Richardson To: olivier.matz@6wind.com Cc: dev@dpdk.org, Bruce Richardson Date: Tue, 24 Jan 2017 10:39:33 +0000 Message-Id: <1485254377-20098-1-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH RFCv2 0/4] generalise rte_ring to allow different datatypes 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: , X-List-Received-Date: Tue, 24 Jan 2017 10:39:45 -0000 Following on from the previous RFC, this generalises the rte_ring structure using C constructs rather than using macros. The idea here is to have the size of the data objects passed in to all common functions and then switching the code paths, where necessary, based on those size parameters. For the standard rte_ring APIs, these work on void pointers, so the extra parameter is always specified as sizeof(void *). A new event_ring type is also added as a patch to test out creating and using rings with different size objects. Comments welcome on this RFC, though I still hope to try out some other options, as I think there may be still better ways to achieve the same end. Bruce Richardson (4): ring: create common ring files ring: separate common and rte_ring specific functions ring: allow common ring to use 8 or 16 byte values ring: add new event ring class app/test/Makefile | 1 + app/test/test_event_ring.c | 83 ++++ lib/librte_ring/Makefile | 8 +- lib/librte_ring/rte_common_ring.c | 386 ++++++++++++++++ lib/librte_ring/rte_common_ring.h | 925 ++++++++++++++++++++++++++++++++++++++ lib/librte_ring/rte_event_ring.c | 87 ++++ lib/librte_ring/rte_event_ring.h | 696 ++++++++++++++++++++++++++++ lib/librte_ring/rte_ring.c | 320 +------------ lib/librte_ring/rte_ring.h | 606 +------------------------ 9 files changed, 2210 insertions(+), 902 deletions(-) create mode 100644 app/test/test_event_ring.c create mode 100644 lib/librte_ring/rte_common_ring.c create mode 100644 lib/librte_ring/rte_common_ring.h create mode 100644 lib/librte_ring/rte_event_ring.c create mode 100644 lib/librte_ring/rte_event_ring.h -- 2.9.3