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 7A00041B7B; Thu, 12 Oct 2023 14:48:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33A6B402E9; Thu, 12 Oct 2023 14:48:25 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id E6E4E4028C for ; Thu, 12 Oct 2023 14:48:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697114903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HgI+laqcbFF379F7NoYX+pVsny0hzK9jEssDq4+BJe0=; b=OK1iI2S8DEv3qbbq+Yb+FFcVv0MY9yI8tLV0SoXaBoE1K5iCvdepasneLoolrmuPiqJZ0i xwWRTOaFjNCdTEqqKh81qZ2BU6eIGuGcGEDCfzH+Lg5GJvInmCuGrE2vfNY0IDBcr8EgEo ORrm4apIZ0EkqSNf2qXkzz9hDowCAb0= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-274-Idto2T2sMYWR3ashLjt3vg-1; Thu, 12 Oct 2023 08:48:19 -0400 X-MC-Unique: Idto2T2sMYWR3ashLjt3vg-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2c2c4358880so8893531fa.1 for ; Thu, 12 Oct 2023 05:48:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697114898; x=1697719698; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HgI+laqcbFF379F7NoYX+pVsny0hzK9jEssDq4+BJe0=; b=fK/P/4I1aNbzlYRKgKsNIdHCxnNy+n5HtfJ01j6p8ejRFV4mBSAkWsXDbYXS5d7ZCU THpOv7ewytI6nuZDk4z+EH0xXj3R+87bVd7xwwRdYt6d/pPBrZIP/Uy+HKUfrGVuRAYU ugl13owmNDHjTW1MxV2HSIOdo98J8PD+1Hr/CqwyCXEb191wl4GEqdihI4ky7fuqeApH akEGzN92NbemB2ZGAJHg/DBWLGaTUUuaqy6lIjOc2bKbGz5v4o5MlxJlZnbNQt8BR2Nx vsq/ZF66Los0g192xOYXiqX9F6BH4eltYtmTcOaw0EH4bAJG0KGBw+mlygk6qAQ/3H4G 8uAw== X-Gm-Message-State: AOJu0YwRr9+j6QQ97HxKOewc+LYEbHtmMKZcfSEOHBkyrDMrpRJWlbOC nA4Tbg9i4a3nEINFIxR58FzIp/uryAA2lNrRJuPRt6BanVZsQ8KRc7O7wDUgpaHKyIvqVp7b4+o 9S5Zygtw4oOAgP8im4u8= X-Received: by 2002:a2e:9b47:0:b0:2be:5b09:5544 with SMTP id o7-20020a2e9b47000000b002be5b095544mr21306851ljj.27.1697114898525; Thu, 12 Oct 2023 05:48:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnXYtMZNkLvbXZqH72bbn8J+Zyp4dSH37+LWmX44XkhXR5n2Q4GQyRfEhc54nrSz7x3TtlBT8cRBsoh75LndI= X-Received: by 2002:a2e:9b47:0:b0:2be:5b09:5544 with SMTP id o7-20020a2e9b47000000b002be5b095544mr21306815ljj.27.1697114898070; Thu, 12 Oct 2023 05:48:18 -0700 (PDT) MIME-Version: 1.0 References: <20231011071700.442795-2-mattias.ronnblom@ericsson.com> <20231012085031.444483-1-mattias.ronnblom@ericsson.com> In-Reply-To: <20231012085031.444483-1-mattias.ronnblom@ericsson.com> From: David Marchand Date: Thu, 12 Oct 2023 14:48:06 +0200 Message-ID: Subject: Re: [PATCH v8 0/3] Add dispatcher library To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: dev@dpdk.org, Jerin Jacob , techboard@dpdk.org, harry.van.haaren@intel.com, hofors@lysator.liu.se, Peter Nilsson , Heng Wang , Naga Harish K S V , Pavan Nikhilesh , Gujjar Abhinandan S , Erik Gabriel Carrillo , Shijith Thotton , Hemant Agrawal , Sachin Saxena , Liang Ma , Peter Mccarthy , Zhirun Yan X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Thu, Oct 12, 2023 at 10:55=E2=80=AFAM Mattias R=C3=B6nnblom wrote: > > The purpose of the dispatcher library is to decouple different parts > of an eventdev-based application (e.g., processing pipeline stages), > sharing the same underlying event device. > > The dispatcher replaces the conditional logic (often, a switch > statement) that typically follows an event device dequeue operation, > where events are dispatched to different parts of the application > based on event meta data, such as the queue id or scheduling type. > > The concept is similar to a UNIX file descriptor event loop library. > Instead of tying callback functions to fds as for example libevent > does, the dispatcher relies on application-supplied matching callback > functions to decide where to deliver events. > > A dispatcher is configured to dequeue events from a specific event > device, and ties into the service core framework, to do its (and the > application's) work. > > The dispatcher provides a convenient way for an eventdev-based > application to use service cores for application-level processing, and > thus for sharing those cores with other DPDK services. > > Although the dispatcher adds some overhead, experience suggests that > the net effect on the application (both synthetic benchmarks and more > real-world applications) may well be positive. This is primarily due > to clustering (see programming guide) reducing cache misses. > > Benchmarking indicates that the overhead is ~10 cc/event (on a > large core), with a handful of often-used handlers. > > The dispatcher does not support run-time reconfiguration. > > The use of the dispatcher library is optional, and an eventdev-based > application may still opt to access the event device using direct > eventdev API calls, or by some other means. > > Mattias R=C3=B6nnblom (3): > lib: introduce dispatcher library > test: add dispatcher test suite > doc: add dispatcher programming guide > > MAINTAINERS | 6 + > app/test/meson.build | 1 + > app/test/test_dispatcher.c | 1056 ++++++++++++++++++++++ > doc/api/doxy-api-index.md | 1 + > doc/api/doxy-api.conf.in | 1 + > doc/guides/prog_guide/dispatcher_lib.rst | 433 +++++++++ > doc/guides/prog_guide/index.rst | 1 + > doc/guides/rel_notes/release_23_11.rst | 5 + > lib/dispatcher/meson.build | 13 + > lib/dispatcher/rte_dispatcher.c | 694 ++++++++++++++ > lib/dispatcher/rte_dispatcher.h | 458 ++++++++++ > lib/dispatcher/version.map | 20 + > lib/meson.build | 2 + > 13 files changed, 2691 insertions(+) > create mode 100644 app/test/test_dispatcher.c > create mode 100644 doc/guides/prog_guide/dispatcher_lib.rst > create mode 100644 lib/dispatcher/meson.build > create mode 100644 lib/dispatcher/rte_dispatcher.c > create mode 100644 lib/dispatcher/rte_dispatcher.h > create mode 100644 lib/dispatcher/version.map > Thanks for this latest revision, it lgtm. I fixed a few grammar issues in the documentation and used simple .. note:: blocks to be consistent with the rest of our docs. Applied, thanks Mattias. --=20 David Marchand