Message ID | 20230928101205.4352-1-pbhagavatula@marvell.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DEE7242660; Thu, 28 Sep 2023 12:12:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC4BB402EC; Thu, 28 Sep 2023 12:12:16 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 073234029D for <dev@dpdk.org>; Thu, 28 Sep 2023 12:12:14 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38SAA07n013009; Thu, 28 Sep 2023 03:12:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=4PWZgCrmb0aO87zXStWkBgNf7QWIfus4AZVV7lSeBEU=; b=RCsdsTTIBbCpdbONdrYqhjgU9vqMep5P0wUiYp7kYl0uYrVGsL9YOXBrQefs7BE0bTqs ie5lpq+QmcGkOzWnb95MILNj5jqOBu+TvMQ3FExlEUGqnEDJae+LT7Chb8PLorHrV4Mq j+WA+iuQpe1zp9Do6nWbpzls1BussEUAW92UKc5CkZt9uZh1TsSYaHHqbiSZidVMnfOx gshwhqhil5kubZdbjex8p3bNpbUltX4uApiCUvwsd2B7LtZm20xXClbLD+2a/RvLQYCC pUrfi8GS5TT+S9xtEp9A3D5dDmDTEGq3boqHKiljOoKth0o5nbjgrb1gJj8Jst+dQ0CG iA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3tcrrs31qm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Sep 2023 03:12:14 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 28 Sep 2023 03:12:12 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 28 Sep 2023 03:12:11 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id 3D2E65C68F0; Thu, 28 Sep 2023 03:12:06 -0700 (PDT) From: <pbhagavatula@marvell.com> To: <jerinj@marvell.com>, <pbhagavatula@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> CC: <dev@dpdk.org> Subject: [PATCH v4 0/3] Introduce event link profiles Date: Thu, 28 Sep 2023 15:42:02 +0530 Message-ID: <20230928101205.4352-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230921102830.2765-1-pbhagavatula@marvell.com> References: <20230921102830.2765-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: fPYaTguRCyQaje-DfpPvGEhNSC7_BFQo X-Proofpoint-GUID: fPYaTguRCyQaje-DfpPvGEhNSC7_BFQo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-28_08,2023-09-27_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
Introduce event link profiles
|
|
Message
Pavan Nikhilesh Bhagavatula
Sept. 28, 2023, 10:12 a.m. UTC
From: Pavan Nikhilesh <pbhagavatula@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, the
application can use the function `rte_event_port_profile_switch` to change
the currently active profile on an event port. This effects the next
`rte_event_dequeue_burst` call, where the event queues associated with the
newly active link profile will participate in scheduling.
Rudementary work flow would something like:
Config path:
uint8_t lq[4] = {4, 5, 6, 7};
uint8_t hq[4] = {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 = 0;
empty_low_deq = 0;
is_low_deq = 0;
while (1) {
deq = rte_event_dequeue_burst(0, 0, &ev, 1, 0);
if (deq == 0) {
/**
* Change link profile based on work activity on current
* active profile
*/
if (is_low_deq) {
empty_low_deq++;
if (empty_low_deq == MAX_LOW_RETRY) {
rte_event_port_profile_switch(0, 0, 0);
is_low_deq = 0;
empty_low_deq = 0;
}
continue;
}
if (empty_high_deq == MAX_HIGH_RETRY) {
rte_event_port_profile_switch(0, 0, 1);
is_low_deq = 1;
empty_high_deq = 0;
}
continue;
}
// Process the event received.
if (is_low_deq++ == MAX_LOW_EVENTS) {
rte_event_port_profile_switch(0, 0, 0);
is_low_deq = 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
Comments
On Thu, Sep 28, 2023 at 3:42 PM <pbhagavatula@marvell.com> wrote: > > From: Pavan Nikhilesh <pbhagavatula@marvell.com> + @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-pbhagavatula@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, the > application can use the function `rte_event_port_profile_switch` to change > the currently active profile on an event port. This effects the next > `rte_event_dequeue_burst` call, where the event queues associated with the > newly active link profile will participate in scheduling. > > Rudementary work flow would something like: > > Config path: > > uint8_t lq[4] = {4, 5, 6, 7}; > uint8_t hq[4] = {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 = 0; > empty_low_deq = 0; > is_low_deq = 0; > while (1) { > deq = rte_event_dequeue_burst(0, 0, &ev, 1, 0); > if (deq == 0) { > /** > * Change link profile based on work activity on current > * active profile > */ > if (is_low_deq) { > empty_low_deq++; > if (empty_low_deq == MAX_LOW_RETRY) { > rte_event_port_profile_switch(0, 0, 0); > is_low_deq = 0; > empty_low_deq = 0; > } > continue; > } > > if (empty_high_deq == MAX_HIGH_RETRY) { > rte_event_port_profile_switch(0, 0, 1); > is_low_deq = 1; > empty_high_deq = 0; > } > continue; > } > > // Process the event received. > > if (is_low_deq++ == MAX_LOW_EVENTS) { > rte_event_port_profile_switch(0, 0, 0); > is_low_deq = 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 >
> On Thu, Sep 28, 2023 at 3:42 PM <pbhagavatula@marvell.com> wrote: > > > > From: Pavan Nikhilesh <pbhagavatula@marvell.com> > > + @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://urldefense.proofpoint.com/v2/url?u=https- > 3A__patches.dpdk.org_project_dpdk_patch_20230928101205.4352-2D2- > 2Dpbhagavatula- > 40marvell.com_&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=E3SgYMjtKC > MVsB-fmvgGV3o-g_fjLhk5Pupi9ijohpc&m=s0pyfDe0ZocDrutPG- > dljjgkODjEcIJ2NEAbull1QXuFTK1wlg4H42nArfxOqW29&s=h8P- > KWtqiKfO0rinRfnUMFHtuGEFZp2fku5fG6xu3uY&e= > > The CI script which decides the tree to run tests on needs an update when a series contains a spec change followed by driver implementation, I submitted the following patch to ci@dpdk.org https://patches.dpdk.org/project/ci/patch/20230929083443.9925-1-pbhagavatula@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, the > > application can use the function `rte_event_port_profile_switch` to change > > the currently active profile on an event port. This effects the next > > `rte_event_dequeue_burst` call, where the event queues associated with > the > > newly active link profile will participate in scheduling. > > > > Rudementary work flow would something like: > > > > Config path: > > > > uint8_t lq[4] = {4, 5, 6, 7}; > > uint8_t hq[4] = {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 = 0; > > empty_low_deq = 0; > > is_low_deq = 0; > > while (1) { > > deq = rte_event_dequeue_burst(0, 0, &ev, 1, 0); > > if (deq == 0) { > > /** > > * Change link profile based on work activity on current > > * active profile > > */ > > if (is_low_deq) { > > empty_low_deq++; > > if (empty_low_deq == MAX_LOW_RETRY) { > > rte_event_port_profile_switch(0, 0, 0); > > is_low_deq = 0; > > empty_low_deq = 0; > > } > > continue; > > } > > > > if (empty_high_deq == MAX_HIGH_RETRY) { > > rte_event_port_profile_switch(0, 0, 1); > > is_low_deq = 1; > > empty_high_deq = 0; > > } > > continue; > > } > > > > // Process the event received. > > > > if (is_low_deq++ == MAX_LOW_EVENTS) { > > rte_event_port_profile_switch(0, 0, 0); > > is_low_deq = 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 > >