From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 5C0E545A7A;
	Tue,  1 Oct 2024 15:19:12 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 20ACD40611;
	Tue,  1 Oct 2024 15:19:12 +0200 (CEST)
Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com
 [67.231.148.174])
 by mails.dpdk.org (Postfix) with ESMTP id B6194402BB
 for <dev@dpdk.org>; Tue,  1 Oct 2024 15:19:10 +0200 (CEST)
Received: from pps.filterd (m0045849.ppops.net [127.0.0.1])
 by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 491BPqD0005960;
 Tue, 1 Oct 2024 06:19:09 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=
 cc:content-transfer-encoding:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to; s=pfpt0220; bh=u
 5/d+aiqkTyFwE9jh3Q3i0buTTsZrb6k6QB0mOfD3ts=; b=k/ou7nXHu0e/jWriW
 fAyqrLMU7pCrPSrwSxYz+WRfSZK/Ysbhgm9S3TrOHNmF3tWYkGnYyVAMYcbhLMXM
 uZfmZGZKQ62vkwZLo2JmgaJqFMJRpAKlGN7Cwl9Mm0waCX6tkN9F+J1aQFmB3i/k
 9YqLTB4O91AIe9aOhX7Bbz1kMKnYIjeFuNpSfVYf7o3EtJS4xYruZDuAzZPSkqui
 090Xcn5DPI5NV5m0ol9yE3Cs5iIHRIUYab70BofTKfghuhar+R5qRjG7SPz36ljs
 RTF5QGXhvQ2E6aCxsWdT/R+QTeqQRUEm/nnbzh6SdazgNIBzHRsmF5kZMKVKB9Jw
 NOxOg==
Received: from dc6wp-exch02.marvell.com ([4.21.29.225])
 by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 420g6tresa-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
 Tue, 01 Oct 2024 06:19:09 -0700 (PDT)
Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by
 DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.2.1544.4; Tue, 1 Oct 2024 06:19:08 -0700
Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com
 (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend
 Transport; Tue, 1 Oct 2024 06:19:08 -0700
Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com
 [10.28.164.106])
 by maili.marvell.com (Postfix) with ESMTP id 0EFE03F705D;
 Tue,  1 Oct 2024 06:19:03 -0700 (PDT)
From: <pbhagavatula@marvell.com>
To: <jerinj@marvell.com>, <sthotton@marvell.com>,
 <abdullah.sevincer@intel.com>, <hemant.agrawal@nxp.com>,
 <sachin.saxena@oss.nxp.com>, <harry.van.haaren@intel.com>,
 <mattias.ronnblom@ericsson.com>, <liangma@liangbit.com>,
 <peter.mccarthy@intel.com>
CC: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>
Subject: [PATCH v4 0/6] Introduce event pre-scheduling
Date: Tue, 1 Oct 2024 18:48:55 +0530
Message-ID: <20241001131901.7920-1-pbhagavatula@marvell.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20241001061411.2537-1-pbhagavatula@marvell.com>
References: <20241001061411.2537-1-pbhagavatula@marvell.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-Proofpoint-ORIG-GUID: aKR4L1Qnu6tlzkd3aZb2o0vVwkHTp7g2
X-Proofpoint-GUID: aKR4L1Qnu6tlzkd3aZb2o0vVwkHTp7g2
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
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

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Event pre-scheduling improves scheduling performance by assigning events
to event ports in advance when dequeues are issued.
This series introduces various types and levels of pre-scheduling to the
eventdev library.

pre-scheduling Types:
 * RTE_EVENT_DEV_PRESCHEDULE_NONE: No pre-scheduling.
 * RTE_EVENT_DEV_PRESCHEDULE: Always issue a pre-schedule when dequeue is issued.
 * RTE_EVENT_DEV_PRESCHEDULE_ADAPTIVE: Delay issuing pre-schedule until there
   are no forward progress constraints with the held flow contexts.

pre-scheduling Levels:
 * Event Device Level Pre-scheduling: Pre-scheduling can be enabled or disabled at the
   event device during configuration. Event devices can indicate pre-scheduling
   capabilities using `RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE` and
  `RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE` via the event device info
  function `info.event_dev_cap`.
 * Event Port Level Prefetch: Pre-scheduling can be selectively enabled or disabled
   at the event port during runtime. Event devices can indicate this capability
   using `RTE_EVENT_PORT_CAP_EVENT_PER_PORT_PRESCHEDULE` via the event device info
   function `info.event_port_cap`.
 * Application Controlled Prefetch Hint: Applications can provide hints to the
   event device to start pre-scheduling events using the new API
   `rte_event_port_pre-schedule`. Event devices can indicate this capabilities using
   `RTE_EVENT_DEV_CAP_SW_PRESCHEDULE` via the event device info function
   `info.event_dev_cap`.

The rte_event_dequeue_burst operation initiates the pre-schedule operation, which
completes in parallel without affecting the flow context of the dequeued events and
dequeue latency. On the next dequeue operation, the pre-scheduleed events are
dequeued, and pre-schedule operation is initiated again.

In the case of application-controlled pre-schedule hints, the currently held flow
contexts, if any, are not affected by the pre-schedule operation. On the next
dequeue operation, the pre-scheduleed events are returned, but pre-schedule is not
initiated again until the application provides the hint again. If pre-scheduling
is already enabled at the event device level or event port level, the hint is ignored.

v2 Changes:
- s/prefetch/pre-schedule (Mattias).
v3 Changes:
- Add CNXK preschedule implementation.
- Update test-eventdev to use prescheduling.
- Update examples to use prescheduling.
v4 Changes:
- Fix compilation.

Pavan Nikhilesh (6):
  eventdev: introduce event pre-scheduling
  eventdev: add event port pre-schedule modify
  eventdev: add SW event preschedule hint
  event/cnkx: add pre-schedule support
  app/test-eventdev: add pre-scheduling support
  examples: use eventdev pre-scheduling

 app/test-eventdev/evt_common.h                |  45 ++++--
 app/test-eventdev/evt_options.c               |  17 ++
 app/test-eventdev/evt_options.h               |   1 +
 app/test/test_eventdev.c                      | 143 ++++++++++++++++
 doc/guides/eventdevs/cnxk.rst                 |  10 --
 doc/guides/eventdevs/features/cnxk.ini        |   1 +
 doc/guides/eventdevs/features/default.ini     |   1 +
 doc/guides/prog_guide/eventdev/eventdev.rst   |  42 +++++
 doc/guides/rel_notes/release_24_11.rst        |  11 ++
 doc/guides/tools/testeventdev.rst             |   6 +
 drivers/event/cnxk/cn10k_eventdev.c           |  19 ++-
 drivers/event/cnxk/cn10k_worker.c             |  21 +++
 drivers/event/cnxk/cn10k_worker.h             |   1 +
 drivers/event/cnxk/cnxk_eventdev.c            |   2 -
 drivers/event/cnxk/cnxk_eventdev.h            |   1 -
 .../pipeline_worker_generic.c                 |   6 +
 .../eventdev_pipeline/pipeline_worker_tx.c    |   6 +
 examples/ipsec-secgw/event_helper.c           |   6 +
 examples/l2fwd-event/l2fwd_event_generic.c    |   6 +
 .../l2fwd-event/l2fwd_event_internal_port.c   |   6 +
 examples/l3fwd/l3fwd_event_generic.c          |   6 +
 examples/l3fwd/l3fwd_event_internal_port.c    |   6 +
 lib/eventdev/eventdev_pmd.h                   |   4 +
 lib/eventdev/eventdev_private.c               |  41 ++++-
 lib/eventdev/eventdev_trace_points.c          |   6 +
 lib/eventdev/rte_eventdev.h                   | 152 ++++++++++++++++++
 lib/eventdev/rte_eventdev_core.h              |  11 ++
 lib/eventdev/rte_eventdev_trace_fp.h          |  19 ++-
 lib/eventdev/version.map                      |   6 +
 29 files changed, 574 insertions(+), 28 deletions(-)

--
2.25.1