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 4F9A042653; Wed, 27 Sep 2023 16:57:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2239A402AA; Wed, 27 Sep 2023 16:57:06 +0200 (CEST) Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) by mails.dpdk.org (Postfix) with ESMTP id 40F714028C for ; Wed, 27 Sep 2023 16:57:05 +0200 (CEST) Received: by mail-vk1-f169.google.com with SMTP id 71dfb90a1353d-493542a25dfso3986096e0c.0 for ; Wed, 27 Sep 2023 07:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695826624; x=1696431424; 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=Wq4lutlRt/QsNtmTBz65BtkD9kKiZ0mRnnmE+PVZmZI=; b=Rw1KqEZZo1K2BNmvA6dxQjPJhiow1Fahqn/SZpDF5XwKx4Dicb4m8j0OfGSnZreR3O OGQ9bc82eUnEryg+lpb+F+2qF5Rq8QaVDee4nXI54Yy8+gZ+q5ZI4SGeR3BfkfpdEJ0b 5gFM72GwSiOXN9TfNlkI/7Xkkhdk3FYr42SRZ23FXbvPcjDRH/CVCRNXjZPVu6MADXWq ktraOMAQDYXnzTBGTWHsSuD9Tiv7B5T74ZTfuBvBCzmZbwhF6/es0Bu/EKOpTO+VUHZ/ ykav/6trCncXzxXlzbox3Te6lfsTpYhVf9wHgQrLdmTeu50oL4BGTm39PaznqhIPGIT+ T0dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695826624; x=1696431424; 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=Wq4lutlRt/QsNtmTBz65BtkD9kKiZ0mRnnmE+PVZmZI=; b=kzBi2h/50xEvOeOL15jTasG7FyJd9uQqVDo5zj+/rdoGN45Nr1jPYgzUuVyzrgSwfb f7YPfi0xBSbzVCIQ1bpAk2tfz1haLbOnx3SlwMJdGfmPdu1EixLhI7vgOR3NxEaeiXfw lTAhlilrd53O4RKG1tidbbf8cUDABJMXPewx7p7B2pumj21h+NacaPtlDKQS0rb+3khf 3+uGPvczadL/bJQx9PETBYP/0fTP7MoZUKkwr/hWDS+1kWPRVsiZ7yJ4TDSNqWX7W+kN wOAclYzxm14lcb8GH51JO8rgdTzFjA2NPCx6f8vvnDgdO24Mzo+Nw9ajLyE30SLm1Byb SPcg== X-Gm-Message-State: AOJu0YxFlbst7rKXiqLRszG0gTyoym0D7LYJ3OrXWRzMhJ2tZ79vf6LT IVOy6sWtKlq89EtEE6y0a14fCmG5fsri1ail6o0= X-Google-Smtp-Source: AGHT+IHWQXTf0/NI5/cszR8pN8AgtlpUNPLdzg/LvGeEpddv/uGJMr2hUlDRt2O7kWqL4D6eiGJjyLpXZUeyDg28NOE= X-Received: by 2002:a1f:cc46:0:b0:487:d56f:fc82 with SMTP id c67-20020a1fcc46000000b00487d56ffc82mr1897504vkg.6.1695826624498; Wed, 27 Sep 2023 07:57:04 -0700 (PDT) MIME-Version: 1.0 References: <20230831204424.13367-1-pbhagavatula@marvell.com> <20230921102830.2765-1-pbhagavatula@marvell.com> In-Reply-To: <20230921102830.2765-1-pbhagavatula@marvell.com> From: Jerin Jacob Date: Wed, 27 Sep 2023 20:26:38 +0530 Message-ID: Subject: Re: [PATCH v3 0/3] Introduce event link profiles To: pbhagavatula@marvell.com 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 21, 2023 at 5:16=E2=80=AFPM wrote: > > From: Pavan Nikhilesh > > A collection of event queues linked to an event port can be associated > with unique identifier called as a profile, multiple such profiles can as a "link profile" > 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 lowQ[4] =3D {4, 5, 6, 7}; lowq > uint8_t highQ[4] =3D {0, 1, 2, 3}; highq > > if (rte_event_dev_info.max_profiles_per_port < 2) > return -ENOTSUP; > > rte_event_port_profile_links_set(0, 0, highQ, NULL, 4, 0); > rte_event_port_profile_links_set(0, 0, lowQ, NULL, 4, 1); > > Worker path: Simplify by: uint8_t profile_id_to_switch; while (1) { deq =3D rte_event_dequeue_burst(0, 0, &ev, 1, 0); if (deq =3D=3D 0) { profile_id_to_switch =3D app_find_profile_id_to_switch(); rte_event_port_profile_switch(0, 0, profile_id_to_switch); continue; } // Process the event received. } > 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. > > 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 | 22 ++ > 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 +- > drivers/event/dlb2/dlb2.c | 1 + > drivers/event/dpaa/dpaa_eventdev.c | 1 + > drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- > drivers/event/dsw/dsw_evdev.c | 1 + > drivers/event/octeontx/ssovf_evdev.c | 2 +- > drivers/event/opdl/opdl_evdev.c | 1 + > drivers/event/skeleton/skeleton_eventdev.c | 1 + > drivers/event/sw/sw_evdev.c | 1 + > 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 | 146 ++++++++++--- > 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 + > 36 files changed, 827 insertions(+), 111 deletions(-) > > -- > 2.25.1 >