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 96A8042662; Thu, 28 Sep 2023 16:45:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14E4840273; Thu, 28 Sep 2023 16:45:39 +0200 (CEST) Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com [209.85.222.52]) by mails.dpdk.org (Postfix) with ESMTP id D60C64021D for ; Thu, 28 Sep 2023 16:45:37 +0200 (CEST) Received: by mail-ua1-f52.google.com with SMTP id a1e0cc1a2514c-7ab68ef45e7so3898055241.3 for ; Thu, 28 Sep 2023 07:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695912337; x=1696517137; 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=9FbVlfX6mu685d1jDAhGYrHkVtGpUO/VVx5MiWjoI0c=; b=Hqw6pypw3HAgWBxqxiaZPwRihZvHLb1e5Ql3pfPDqZHVqvBKs4hR0muz2A1wvN6Avl 2AQjS0nQDOsMtpsaTiNabZ4WEizcHHYcTW2RR9ircr2qNtCpsVg2T1QXegjMmgcpRB08 MyVQxSdo/TWPNZ8MAW8r7hs+HWf+UCV53TqPTkohKsNFEeAVTVNF1OOsKfTRF/P4zeEa 22GNd3J9jhFfZHfsmZypTOoqnGJqVPNmkBco/Qu+uQbqa1Jg+h6Fx9jfxdoeh1ukLSRl QIaazG4yQt+2+zfZjWGXNA0MUQUiWRB6j+cbeRfOZOImqE4ECq9VbYGyD5qpyZUD2hur BuDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695912337; x=1696517137; 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=9FbVlfX6mu685d1jDAhGYrHkVtGpUO/VVx5MiWjoI0c=; b=fX9ZuTs/lqPLuFINMT/N7YbkHR8fRchmNfe7UHgTcA3R7CyCJd08Oq8dgjdu1ORdhr SY1zfe0n1RnGgUvD4NZAEQfNdArEB1icx5OelJRt8CcEXN3ib6r5KhBTgbyRs1TXUa2G WyrfTUz8W1wl6R/2gmRHPRHB2JUKKTmeLadyF4YqVb2Cc15iHL7G3fccu8eh5zgpKxay FGEpSiyzLkTzvfI8huQcoUEGYBHpmd4aORGtZZG/P82DEUco8f40S62LnCqMU8HNpPSR 9HtgVTnDBG5GRiNsd18vKFLikTSktoZv2tyl8LtZBQkfsDY2exwmLRn0qQd2KJEheOCa nbKA== X-Gm-Message-State: AOJu0YyjwPOKtbn8ldn+Jf33vQC+qUQrmdqO1BCfOHB3AkjbLYJtmc33 9YRHMQiean9paDgTBLLqgFUv+ZW4UzPUcXUtZW0= X-Google-Smtp-Source: AGHT+IEMGbHnY+CZT1o/CaCtuP1fY0Pl2u2taVGs7VnFJRWJ7cmqQteKzgRFLnNhz8uxBX5teq3UDVrZlafSBQ4/3no= X-Received: by 2002:a67:bd1a:0:b0:454:701c:7717 with SMTP id y26-20020a67bd1a000000b00454701c7717mr1153125vsq.5.1695912336949; Thu, 28 Sep 2023 07:45:36 -0700 (PDT) MIME-Version: 1.0 References: <20230921102830.2765-1-pbhagavatula@marvell.com> <20230928101205.4352-1-pbhagavatula@marvell.com> In-Reply-To: <20230928101205.4352-1-pbhagavatula@marvell.com> From: Jerin Jacob Date: Thu, 28 Sep 2023 20:15:10 +0530 Message-ID: Subject: Re: [PATCH v4 0/3] Introduce event link profiles To: Pavan Nikhilesh Cc: jerinj@marvell.com, sthotton@marvell.com, timothy.mcdaniel@intel.com, hemant.agrawal@nxp.com, sachin.saxena@nxp.com, mattias.ronnblom@ericsson.com, liangma@liangbit.com, peter.mccarthy@intel.com, harry.van.haaren@intel.com, erik.g.carrillo@intel.com, abhinandan.gujjar@intel.com, s.v.naga.harish.k@intel.com, anatoly.burakov@intel.com, dev@dpdk.org 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, Sep 28, 2023 at 3:42=E2=80=AFPM wrote: > > From: Pavan Nikhilesh + @Thomas Monjalon @David Marchand @Aaron Conole @Michael Santana There is CI failure in apply stage[1] where it is taking main tree commit. Not sure why it is taking main tree? Pavan, Could you resend this series again to give one more chance to CI. [1] https://patches.dpdk.org/project/dpdk/patch/20230928101205.4352-2-pbhagavat= ula@marvell.com/ > > A collection of event queues linked to an event port can be associated > with unique identifier called as a link profile, multiple such profiles > can be configured based on the event device capability using the function > `rte_event_port_profile_links_set` which takes arguments similar to > `rte_event_port_link` in addition to the profile identifier. > > The maximum link profiles that are supported by an event device is > advertised through the structure member > `rte_event_dev_info::max_profiles_per_port`. > > By default, event ports are configured to use the link profile 0 on > initialization. > > Once multiple link profiles are set up and the event device is started, t= he > application can use the function `rte_event_port_profile_switch` to chang= e > the currently active profile on an event port. This effects the next > `rte_event_dequeue_burst` call, where the event queues associated with th= e > newly active link profile will participate in scheduling. > > Rudementary work flow would something like: > > Config path: > > uint8_t lq[4] =3D {4, 5, 6, 7}; > uint8_t hq[4] =3D {0, 1, 2, 3}; > > if (rte_event_dev_info.max_profiles_per_port < 2) > return -ENOTSUP; > > rte_event_port_profile_links_set(0, 0, hq, NULL, 4, 0); > rte_event_port_profile_links_set(0, 0, lq, NULL, 4, 1); > > Worker path: > > empty_high_deq =3D 0; > empty_low_deq =3D 0; > is_low_deq =3D 0; > while (1) { > deq =3D rte_event_dequeue_burst(0, 0, &ev, 1, 0); > if (deq =3D=3D 0) { > /** > * Change link profile based on work activity on current > * active profile > */ > if (is_low_deq) { > empty_low_deq++; > if (empty_low_deq =3D=3D MAX_LOW_RETRY) { > rte_event_port_profile_switch(0, 0, 0); > is_low_deq =3D 0; > empty_low_deq =3D 0; > } > continue; > } > > if (empty_high_deq =3D=3D MAX_HIGH_RETRY) { > rte_event_port_profile_switch(0, 0, 1); > is_low_deq =3D 1; > empty_high_deq =3D 0; > } > continue; > } > > // Process the event received. > > if (is_low_deq++ =3D=3D MAX_LOW_EVENTS) { > rte_event_port_profile_switch(0, 0, 0); > is_low_deq =3D 0; > } > } > > An application could use heuristic data of load/activity of a given event > port and change its active profile to adapt to the traffic pattern. > > An unlink function `rte_event_port_profile_unlink` is provided to > modify the links associated to a profile, and > `rte_event_port_profile_links_get` can be used to retrieve the links > associated with a profile. > > Using Link profiles can reduce the overhead of linking/unlinking and > waiting for unlinks in progress in fast-path and gives applications > the ability to switch between preset profiles on the fly. > > v4 Changes: > ---------- > - Address review comments (Jerin). > > v3 Changes: > ---------- > - Rebase to next-eventdev > - Rename testcase name to match API. > > v2 Changes: > ---------- > - Fix compilation. > > Pavan Nikhilesh (3): > eventdev: introduce link profiles > event/cnxk: implement event link profiles > test/event: add event link profile test > > app/test/test_eventdev.c | 117 +++++++++++ > config/rte_config.h | 1 + > doc/guides/eventdevs/cnxk.rst | 1 + > doc/guides/eventdevs/features/cnxk.ini | 3 +- > doc/guides/eventdevs/features/default.ini | 1 + > doc/guides/prog_guide/eventdev.rst | 40 ++++ > doc/guides/rel_notes/release_23_11.rst | 14 +- > drivers/common/cnxk/roc_nix_inl_dev.c | 4 +- > drivers/common/cnxk/roc_sso.c | 18 +- > drivers/common/cnxk/roc_sso.h | 8 +- > drivers/common/cnxk/roc_sso_priv.h | 4 +- > drivers/event/cnxk/cn10k_eventdev.c | 45 +++-- > drivers/event/cnxk/cn10k_worker.c | 11 ++ > drivers/event/cnxk/cn10k_worker.h | 1 + > drivers/event/cnxk/cn9k_eventdev.c | 74 ++++--- > drivers/event/cnxk/cn9k_worker.c | 22 +++ > drivers/event/cnxk/cn9k_worker.h | 2 + > drivers/event/cnxk/cnxk_eventdev.c | 37 ++-- > drivers/event/cnxk/cnxk_eventdev.h | 10 +- > lib/eventdev/eventdev_pmd.h | 59 +++++- > lib/eventdev/eventdev_private.c | 9 + > lib/eventdev/eventdev_trace.h | 32 +++ > lib/eventdev/eventdev_trace_points.c | 12 ++ > lib/eventdev/rte_eventdev.c | 150 +++++++++++--- > lib/eventdev/rte_eventdev.h | 231 ++++++++++++++++++++++ > lib/eventdev/rte_eventdev_core.h | 6 +- > lib/eventdev/rte_eventdev_trace_fp.h | 8 + > lib/eventdev/version.map | 4 + > 28 files changed, 814 insertions(+), 110 deletions(-) > > -- > 2.25.1 >