From patchwork Sun Oct 25 05:45:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 318953 Delivered-To: patch@linaro.org Received: by 2002:a92:d1d1:0:0:0:0:0 with SMTP id u17csp1695035ilg; Sat, 24 Oct 2020 22:46:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBRkZa60v2/8E//e9hkZIE8O2tVyWavndGnr4jYXIhusMJmf3W5z51C9krhR1X8T2SHjqU X-Received: by 2002:aa7:dd53:: with SMTP id o19mr10290672edw.370.1603604775675; Sat, 24 Oct 2020 22:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603604775; cv=none; d=google.com; s=arc-20160816; b=HDTI5TcCLN8bSlXl3zx0dcKaKdwu+dB4MLRRiZ34dJl1C9zds3i7pMpsoiJk7c4wHj YJOyMn69k9Lb5nnV7aPe114gV9DCMq5/5aSwOx321I8S30GcY/05/D0hO+qLvwQcM0Xs 4FA/Y73St5toqfFIHhY5XZDin/0hxEdO1L/CNuTFmoGitrODbNI0J4iNjvgUtz5525bO Rz3M7+nOa4gmv5eFc7zV96a8CcArl9ZaLPHm06MWXxbYC8Wx/EB3jE+suE+bX/8y8Zmh cQFgCTDUxVpcJHn192xdvWQomjV1Yz6kTy+OkLqO1C0U2xGtPbN4IYkIfhX/XLGfxkft pKxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=GEIY6k4hVh8A6O4KMuaNW515aTkEthoEiVIT7mLU/z0=; b=KiwVcVkwc8tCXgsUHsgovuVOtimRndWN8ttGNWBS3ZAyz78WlNBKIq80eMY94o3fCI WDbPTdPf2XbxZ/lPcm2NCg5jyI08z+WGwpYBrYvUXJlLcxI/2OQR99iQqWLVLVeCopsi vYtxvX6PL/S/5PgjpI/dvrbWKmfU+p8L1J1aiIHwqdnsvHaFv63tNmaEVFMLxu24+FwL 1iuUKL48/J0bloELtP7F5ejAD7wfpSJ6s/pqQd94eeHxzkSOwIIcTmDeCgqj4LPDLEvT mxrAXpP3nvDpQGSRs+vX2FO2IYqxD3DmqqzqJ7FYwP2TxxcDAT8RK+RPktnxUhSnw0PT NtRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id p1si4495775edr.399.2020.10.24.22.46.15; Sat, 24 Oct 2020 22:46:15 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 72D311D9E; Sun, 25 Oct 2020 06:46:08 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id B1CCBF90 for ; Sun, 25 Oct 2020 06:46:05 +0100 (CET) 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 00212113E; Sat, 24 Oct 2020 22:46:04 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EBB913F66B; Sat, 24 Oct 2020 22:46:03 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, konstantin.ananyev@intel.com, stephen@networkplumber.org Cc: dharmik.thakkar@arm.com, ruifeng.wang@arm.com, olivier.matz@6wind.com, david.marchand@redhat.com, nd@arm.com Date: Sun, 25 Oct 2020 00:45:48 -0500 Message-Id: <20201025054556.14277-1-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200224203931.21256-1-honnappa.nagarahalli@arm.com> References: <20200224203931.21256-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v5 0/8] lib/ring: add zero copy APIs 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" It is pretty common for the DPDK applications to be deployed in semi-pipeline model. In these models, a small number of cores (typically 1) are designated as I/O cores. The I/O cores work on receiving and transmitting packets from the NIC and several packet processing cores. The IO core and the packet processing cores exchange the packets over a ring. Typically, such applications receive the mbufs in a temporary array and copy the mbufs on to the ring. Depending on the requirements the packets could be copied in batches of 32, 64 etc resulting in 256B, 512B etc memory copy. The zero copy APIs help avoid intermediate copies by exposing the space on the ring directly to the application. v5: 1) Fixed CI compilation issues v4: 1) Fixed multiple pointer issues 2) Added documentation v3: 1) Changed the name of the APIs to 'zero-copy (zc)' 2) Made the address calculation simpler 3) Structure to return the data to the user is aligned on cache line boundary. 4) Added functional and stress test cases v2: changed the patch to use the SP-SC and HTS modes v1: Initial version Honnappa Nagarahalli (8): lib/ring: add zero copy APIs test/ring: move common function to header file test/ring: add functional tests for zero copy APIs test/ring: add stress tests for zero copy APIs doc/ring: add zero copy peek APIs test/ring: fix the memory dump size test/ring: remove unnecessary braces test/ring: user uintptr_t instead of unsigned long app/test/meson.build | 2 + app/test/test_ring.c | 209 +++++++++- app/test/test_ring.h | 67 ++- app/test/test_ring_mt_peek_stress_zc.c | 56 +++ app/test/test_ring_st_peek_stress_zc.c | 63 +++ app/test/test_ring_stress.c | 6 + app/test/test_ring_stress.h | 2 + app/test/test_ring_stress_impl.h | 2 +- doc/guides/prog_guide/ring_lib.rst | 41 ++ doc/guides/rel_notes/release_20_11.rst | 9 + lib/librte_ring/meson.build | 1 + lib/librte_ring/rte_ring_elem.h | 1 + lib/librte_ring/rte_ring_peek_zc.h | 548 +++++++++++++++++++++++++ 13 files changed, 988 insertions(+), 19 deletions(-) create mode 100644 app/test/test_ring_mt_peek_stress_zc.c create mode 100644 app/test/test_ring_st_peek_stress_zc.c create mode 100644 lib/librte_ring/rte_ring_peek_zc.h -- 2.17.1