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 52E594260D; Thu, 21 Sep 2023 20:36:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20D23402B9; Thu, 21 Sep 2023 20:36:59 +0200 (CEST) Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) by mails.dpdk.org (Postfix) with ESMTP id 4EDAA400D7; Thu, 21 Sep 2023 20:36:58 +0200 (CEST) Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-49334907238so532544e0c.3; Thu, 21 Sep 2023 11:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695321417; x=1695926217; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZVpE/qQBHwR8wAFjkjOrZNuPc83j59tCtj++NFZE5PQ=; b=j0zq27FyqAzWJzPxquHOFhP3S9e/n/b9Ss8hWmpoNPpl+c0npThDyE7NDSk/ah8p3e x/oUaDcdktsrbM60SxMk0myof6eRsAbBD8CvaBrnNFEXKYJlJKUWlgJB6GAykXQld5DJ lyXvraaw0oD/HBII29NLwb9pAGsPKDcnzzCciwNceSeOckRJ/mC6pLsY3Z8R6brSTnRc 7xKtF0ybSy9KNX8qz+zwmQv3gKNnyu68gUqn6ZqQsFmwDuriYrGVz0in9U6UmAf6yG36 aRTw6wQB1fEmivWQ/eo91sBBiwuCxHtvqNure3iezoidzkYtquD3J+7xQdJVoXmMkH8P Y20Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695321417; x=1695926217; 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=ZVpE/qQBHwR8wAFjkjOrZNuPc83j59tCtj++NFZE5PQ=; b=gnXRidDbiBHoreIiRtIKtSSLdHHLNUNHmPo0lD1z/cq/cYLbSKW5Mx1R6mR8qG6SDD /T9f21rcggzneXVEvHnKa+nfB4t7f+IIHTr1NjAkwAtZdCFxsaiEpaVJJ5U3AohJjhbz d13Ccb1ziFLRzgvAHfOupkD6yJppnUTzZTlVz2nFBfjiml/fE9BxT9E1z0z+PiIny4A0 LdPLnmjyKYv25co7FcVqECHOuq/RGF3JpTUVdTs4lnZbhWa4/aemkHKAdL7CyY60Agks u07eOKd3aFRPOypgEoAQ0Xo/3wKSlQ27wwERXKdQ2Ike8AmzkT9DgCt2eTuFAdEuWp/K O3fQ== X-Gm-Message-State: AOJu0YxgvsiX4B0muJHjebddIxH9E7B380OgVL6MwMWb/1ODPS2qEnu+ 9+GqSPJSRxBS8g3aog6rfb4Hm6a3rfNGE01WwZs= X-Google-Smtp-Source: AGHT+IEHfWf1pERW2ahqQwrlYMb+swkUisPIBaaQyHUBvXtk4HxpNQ9TnKX9FHIfRXFretkABXl7cPI5h5TW/ebMmJo= X-Received: by 2002:a1f:c644:0:b0:48f:8891:29d9 with SMTP id w65-20020a1fc644000000b0048f889129d9mr5902253vkf.13.1695321417589; Thu, 21 Sep 2023 11:36:57 -0700 (PDT) MIME-Version: 1.0 References: <20230616074041.159675-2-mattias.ronnblom@ericsson.com> <20230904130313.327809-1-mattias.ronnblom@ericsson.com> <20230904130313.327809-2-mattias.ronnblom@ericsson.com> In-Reply-To: <20230904130313.327809-2-mattias.ronnblom@ericsson.com> From: Jerin Jacob Date: Fri, 22 Sep 2023 00:06:31 +0530 Message-ID: Subject: Re: [PATCH v3 1/3] lib: introduce 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 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 Mon, Sep 4, 2023 at 6:39=E2=80=AFPM Mattias R=C3=B6nnblom wrote: > > The purpose of the dispatcher library is to help reduce coupling in an > Eventdev-based DPDK application. > > In addition, the dispatcher also provides a convenient and flexible > way for the application to use service cores for application-level > processing. > > Signed-off-by: Mattias R=C3=B6nnblom > Tested-by: Peter Nilsson > Reviewed-by: Heng Wang > > +static inline void > +evd_dispatch_events(struct rte_dispatcher *dispatcher, > + struct rte_dispatcher_lcore *lcore, > + struct rte_dispatcher_lcore_port *port, > + struct rte_event *events, uint16_t num_events) > +{ > + int i; > + struct rte_event bursts[EVD_MAX_HANDLERS][num_events]; > + uint16_t burst_lens[EVD_MAX_HANDLERS] =3D { 0 }; > + uint16_t drop_count =3D 0; > + uint16_t dispatch_count; > + uint16_t dispatched =3D 0; > + > + for (i =3D 0; i < num_events; i++) { > + struct rte_event *event =3D &events[i]; > + int handler_idx; > + > + handler_idx =3D evd_lookup_handler_idx(lcore, event); > + > + if (unlikely(handler_idx < 0)) { > + drop_count++; > + continue; > + } > + > + bursts[handler_idx][burst_lens[handler_idx]] =3D *event; Looks like it caching the event to accumulate ? If flow or queue is configured as RTE_SCHED_TYPE_ORDERED? Will it completely lose ordering as next rte_event_enqueue_burst will release context? Definition of RTE_SCHED_TYPE_ORDERED #define RTE_SCHED_TYPE_ORDERED 0 /**< Ordered scheduling * * Events from an ordered flow of an event queue can be scheduled to multip= le * ports for concurrent processing while maintaining the original event ord= er. * This scheme enables the user to achieve high single flow throughput by * avoiding SW synchronization for ordering between ports which bound to co= res. * * The source flow ordering from an event queue is maintained when events a= re * enqueued to their destination queue within the same ordered flow context= . * An event port holds the context until application call * rte_event_dequeue_burst() from the same port, which implicitly releases * the context. * User may allow the scheduler to release the context earlier than that * by invoking rte_event_enqueue_burst() with RTE_EVENT_OP_RELEASE operatio= n. * * Events from the source queue appear in their original order when dequeue= d * from a destination queue. * Event ordering is based on the received event(s), but also other * (newly allocated or stored) events are ordered when enqueued within the = same * ordered context. Events not enqueued (e.g. released or stored) within th= e * context are considered missing from reordering and are skipped at this = time * (but can be ordered again within another context). * * @see rte_event_queue_setup(), rte_event_dequeue_burst(), RTE_EVENT_OP_RE= LEASE */