From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E496F45B44; Tue, 15 Oct 2024 18:02:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 567C9400D7; Tue, 15 Oct 2024 18:02:21 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 90146400D6 for ; Tue, 15 Oct 2024 18:02:20 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-20c8c50fdd9so32323835ad.0 for ; Tue, 15 Oct 2024 09:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729008140; x=1729612940; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=wecZ11SMqorGzDvoVQ6PkPJI04rLmXYPacpJt0uThO4=; b=1USo11d046ufFlE9gbktyeR5dj2NlJ7Fpjj07wBN/m/Qi5E253Ej6mLCFhESzJzsdZ 3oLLqLYqBltSBSIMKNVzU1dgYXAoRJQ5TFagX3Hq/IPPN+KNjXy4Dr0Yb4mbH1gWnXHI SiY9XoatcBKoGjMCaUvEI2qs7S0dy/fwf4jaBr9YtnvT0xso79K/JsF8RPqiAFoZ22U2 GMSNZzgfyovhL7CA46UoWbFkCyaxnaWViP+xBmgPYfgmD5sWgBA70CU0I9KazUK7eBsU d2uC+csghwwvEispki17XlVN+s2kBiqC0vcTd6r2mUUiZaBcpYw3MAtmz0NUK49PulAE UdZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729008140; x=1729612940; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wecZ11SMqorGzDvoVQ6PkPJI04rLmXYPacpJt0uThO4=; b=PBjgQOLjDMnaA9f6bn0SsO9hkdexydGi8b6UhPxRRYGsj9VJjZuhIar73Isx0FlWkx foSPMOsbYGRhbHbDu0krZBoNUQateys3AtcHchLVZ9Hgjw/rKgoTV1T1Aup9fMPAcBTs LGH3FljYp/qLZJYRloevvSDbuIdVKQSGDMGTGnf4ZqyEQyrSCrHd29YhhjCZPh63b0zo tBJvIxucXObdeSoHs5noksgXfBgAQ8jgyV12OpVTR0/TI7o4rCrPDAniNy88df2921NF ovrHBHutELy7Lf3ThF06LmhjNqiDk0vJ9pz/a0F0E8Opehyo0z0hLZ3lxWN7k54Jx6qi OwpA== X-Gm-Message-State: AOJu0Yz86V/JxnWIehjLMg4aMQXH/yG1t8gAyYDHgYVwFF+DbCc3dZ0t owiMMm2dFwLxrBwwTn2BGvkHJdJAf7wl2DkJCndSkLAAtW923doQzI2S2/sESTE= X-Google-Smtp-Source: AGHT+IG3d11Bw1A2mzdPcZMEs4P5fXDVCs8Ei3EKlC3HLkxNRYotXbWKq7XJg/bUzzTzcu6o5tBN7A== X-Received: by 2002:a17:902:dac3:b0:20c:ea22:3317 with SMTP id d9443c01a7336-20cea22344bmr127892065ad.29.1729008139410; Tue, 15 Oct 2024 09:02:19 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20d1804c68bsm13734825ad.185.2024.10.15.09.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 09:02:19 -0700 (PDT) Date: Tue, 15 Oct 2024 09:02:17 -0700 From: Stephen Hemminger To: Konstantin Ananyev Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, jerinj@marvell.com, hemant.agrawal@nxp.com, bruce.richardson@intel.com, drc@linux.vnet.ibm.com, ruifeng.wang@arm.com, mb@smartsharesystems.com, eimear.morrissey@huawei.com, Konstantin Ananyev Subject: Re: [PATCH v5 0/6] Stage-Ordered API and other extensions for ring library Message-ID: <20241015090217.44e01cb4@hermes.local> In-Reply-To: <20241015130111.826-1-konstantin.v.ananyev@yandex.ru> References: <20240917120946.1212-1-konstantin.v.ananyev@yandex.ru> <20241015130111.826-1-konstantin.v.ananyev@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, 15 Oct 2024 14:01:05 +0100 Konstantin Ananyev wrote: > From: Konstantin Ananyev >=20 > NOTE UPFRONT: this version is still not ready for merging. > Missing items: > - ARM/PPC tests passing > - PG update >=20 > v4 -> v5 > - fix public API/doc comments from Jerin > - update devtools/build-dict.sh (Stephen) > - fix MSVC warnings > - introduce new test-suite for meson (stress) with > ring_stress_autotest and soring_stress_autotest in it > - enhance error report in tests > - reorder some sync code in soring and add extra checks > (for better debuggability) >=20 > v3 -> v4: > - fix compilation/doxygen complains (attempt #2) > - updated release notes >=20 > v2 -> v3: > - fix compilation/doxygen complains > - dropped patch: > "examples/l3fwd: make ACL work in pipeline and eventdev modes": [2] > As was mentioned in the patch desctiption it was way too big, > controversial and incomplete. If the community is ok to introduce > pipeline model into the l3fwd, then it is propbably worth to be > a separate patch series. >=20 > v1 -> v2: > - rename 'elmst/objst' to 'meta' (Morten) > - introduce new data-path APIs set: one with both meta{} and objs[], > second with just objs[] (Morten) > - split data-path APIs into burst/bulk flavours (same as rte_ring) > - added dump function for te_soring and improved dump() for rte_ring. > - dropped patch: > " ring: minimize reads of the counterpart cache-line" > - no performance gain observed > - actually it does change behavior of conventional rte_ring > enqueue/dequeue APIs - > it could return available/free less then actually exist in the ring. > As in some other libs we reliy on that information - it will > introduce problems. >=20 > The main aim of these series is to extend ring library with > new API that allows user to create/use Staged-Ordered-Ring (SORING) > abstraction. In addition to that there are few other patches that serve > different purposes: > - first two patches are just code reordering to de-duplicate > and generalize existing rte_ring code. > - patch #3 extends rte_ring_dump() to correctly print head/tail metadata > for different sync modes. > - next two patches introduce SORING API into the ring library and > provide UT for it. >=20 > SORING overview > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Staged-Ordered-Ring (SORING) provides a SW abstraction for 'ordered' queu= es > with multiple processing 'stages'. It is based on conventional DPDK > rte_ring, re-uses many of its concepts, and even substantial part of > its code. > It can be viewed as an 'extension' of rte_ring functionality. > In particular, main SORING properties: > - circular ring buffer with fixed size objects > - producer, consumer plus multiple processing stages in between. > - allows to split objects processing into multiple stages. > - objects remain in the same ring while moving from one stage to the othe= r, > initial order is preserved, no extra copying needed. > - preserves the ingress order of objects within the queue across multiple > stages > - each stage (and producer/consumer) can be served by single and/or > multiple threads. >=20 > - number of stages, size and number of objects in the ring are > configurable at ring initialization time. >=20 > Data-path API provides four main operations: > - enqueue/dequeue works in the same manner as for conventional rte_ring, > all rte_ring synchronization types are supported. > - acquire/release - for each stage there is an acquire (start) and > release (finish) operation. After some objects are 'acquired' - > given thread can safely assume that it has exclusive ownership of > these objects till it will invoke 'release' for them. > After 'release', objects can be 'acquired' by next stage and/or dequeued > by the consumer (in case of last stage). >=20 > Expected use-case: applications that uses pipeline model > (probably with multiple stages) for packet processing, when preserving > incoming packet order is important. >=20 > The concept of =E2=80=98ring with stages=E2=80=99 is similar to DPDK OPDL= eventdev PMD [1], > but the internals are different. > In particular, SORING maintains internal array of 'states' for each eleme= nt > in the ring that is shared by all threads/processes that access the ring. > That allows 'release' to avoid excessive waits on the tail value and helps > to improve performancei and scalability. > In terms of performance, with our measurements rte_soring and > conventional rte_ring provide nearly identical numbers. > As an example, on our SUT: Intel ICX CPU @ 2.00GHz, > l3fwd (--lookup=3Dacl) in pipeline mode [2] both > rte_ring and rte_soring reach ~20Mpps for single I/O lcore and same > number of worker lcores. >=20 > [1] https://www.dpdk.org/wp-content/uploads/sites/35/2018/06/DPDK-China20= 17-Ma-OPDL.pdf > [2] https://patchwork.dpdk.org/project/dpdk/patch/20240906131348.804-7-ko= nstantin.v.ananyev@yandex.ru/ Also needs its own page in the programmers guide (like ring and eventdev) y= ou could probably use a variant of the text in this commit message.