Message ID | 20201024161112.13730-1-honnappa.nagarahalli@arm.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 59E26A04B0; Sat, 24 Oct 2020 18:11:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8540FFEB; Sat, 24 Oct 2020 18:11:23 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id F2113F94 for <dev@dpdk.org>; Sat, 24 Oct 2020 18:11:21 +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 2EF8B101E; Sat, 24 Oct 2020 09:11:20 -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 1B5EB3F66B; Sat, 24 Oct 2020 09:11:20 -0700 (PDT) From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> 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: Sat, 24 Oct 2020 11:11:04 -0500 Message-Id: <20201024161112.13730-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 v4 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
lib/ring: add zero copy APIs
|
|
Message
Honnappa Nagarahalli
Oct. 24, 2020, 4:11 p.m. UTC
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. 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 | 65 +++ 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 | 546 +++++++++++++++++++++++++ 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
Comments
Hi David, Checkpatch CI is showing "WARNING" on a lot of the patches in this series, but it does not list any real warnings. Any idea what is happening? Thanks, Honnappa > -----Original Message----- > From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> > Sent: Saturday, October 24, 2020 11:11 AM > To: dev@dpdk.org; Honnappa Nagarahalli > <Honnappa.Nagarahalli@arm.com>; konstantin.ananyev@intel.com; > stephen@networkplumber.org > Cc: Dharmik Thakkar <Dharmik.Thakkar@arm.com>; Ruifeng Wang > <Ruifeng.Wang@arm.com>; olivier.matz@6wind.com; > david.marchand@redhat.com; nd <nd@arm.com> > Subject: [PATCH v4 0/8] lib/ring: add zero copy APIs > > 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. > > 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 | 65 +++ > 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 | 546 +++++++++++++++++++++++++ > 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
On Sat, Oct 24, 2020 at 6:18 PM Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com> wrote: > > Hi David, > Checkpatch CI is showing "WARNING" on a lot of the patches in this series, but it does not list any real warnings. Any idea what is happening? I reported it to Thomas last night. Thomas has fixed a few things in the script but I don't know if he's finished with it.
25/10/2020 08:16, David Marchand: > On Sat, Oct 24, 2020 at 6:18 PM Honnappa Nagarahalli > <Honnappa.Nagarahalli@arm.com> wrote: > > > > Hi David, > > Checkpatch CI is showing "WARNING" on a lot of the patches in this series, but it does not list any real warnings. Any idea what is happening? > > I reported it to Thomas last night. > Thomas has fixed a few things in the script but I don't know if he's > finished with it. Yes this is an issue in Linux checkpatch that I've updated on the server just before you send this series. Then I've fixed it: --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -977,7 +977,7 @@ sub seed_camelcase_includes { sub git_is_single_file { my ($filename) = @_; - return 0 if ((which("git") eq "") || !(-e "$gitroot")); + return 0 if ((which("git") eq "") || !(-e "$root/.git"));