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 10EAC4338D; Tue, 21 Nov 2023 10:30:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F20E340298; Tue, 21 Nov 2023 10:30:04 +0100 (CET) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 92EBE4025F for ; Tue, 21 Nov 2023 10:30:03 +0100 (CET) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 44C841537E for ; Tue, 21 Nov 2023 10:30:03 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 387B41537C; Tue, 21 Nov 2023 10:30:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,AWL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.6 X-Spam-Score: -1.5 Received: from [192.168.1.59] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id A8F0715BA0; Tue, 21 Nov 2023 10:30:02 +0100 (CET) Message-ID: Date: Tue, 21 Nov 2023 10:30:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types To: Bruce Richardson , dev@dpdk.org Cc: Jerin Jacob References: <20231120172606.505579-1-bruce.richardson@intel.com> <20231120172606.505579-2-bruce.richardson@intel.com> Content-Language: en-US From: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= In-Reply-To: <20231120172606.505579-2-bruce.richardson@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP 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 2023-11-20 18:25, Bruce Richardson wrote: > Not all eventdev's support all scheduling types, for example, some may > only support atomic scheduling or others only support ordered > scheduling. There is currently no clear indication for each driver what > sched types it supports, so add capability flags to be indicated on > return from rte_event_dev_info_get() API. > > Similarly add the possible scheduling types to the capabilities table in > the docs. > Should we allow an event device to advertise RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES, but not all of these? With current wording of RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES prevents that, but you should be able to allow for this without breaking backward compatibility by tweaking the text from "Event device is capable of enqueuing events of any type to any queue." "Event device is capable of enqueuing events of any type advertised as supported (e.g., by RTE_EVENT_DEV_CAP_ATOMIC)." An event device that doesn't support ordered, but does support "all" types seems reasonable to me, while an event device that does support ordered on a per-event basis, but doesn't for queue-level configuration does not. If RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES is left unchanged, the user may ask herself what "any" means (any supported in the API, or any supported by the actual event device). > Signed-off-by: Bruce Richardson > --- > doc/guides/eventdevs/features/default.ini | 3 +++ > lib/eventdev/rte_eventdev.h | 21 +++++++++++++++++++++ > 2 files changed, 24 insertions(+) > > diff --git a/doc/guides/eventdevs/features/default.ini b/doc/guides/eventdevs/features/default.ini > index e980ae134a..1cc4303fe5 100644 > --- a/doc/guides/eventdevs/features/default.ini > +++ b/doc/guides/eventdevs/features/default.ini > @@ -6,6 +6,9 @@ > ; the features table in the documentation. > ; > [Scheduling Features] > +atomic_scheduling = > +ordered_scheduling = > +parallel_scheduling = > queue_qos = > event_qos = > distributed_sched = > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h > index ec9b02455d..9109de157e 100644 > --- a/lib/eventdev/rte_eventdev.h > +++ b/lib/eventdev/rte_eventdev.h > @@ -326,6 +326,27 @@ struct rte_event; > * than one. > */ > > +#define RTE_EVENT_DEV_CAP_ATOMIC (1ULL << 13) > +/**< Event device is capable of atomic scheduling. > + * When this flag is set, the application can configure queues with scheduling type > + * atomic on this event device. > + * @see RTE_SCHED_TYPE_ATOMIC > + */ > + > +#define RTE_EVENT_DEV_CAP_ORDERED (1ULL << 13) > +/**< Event device is capable of ordered scheduling. > + * When this flag is set, the application can configure queues with scheduling type > + * ordered on this event device. > + * @see RTE_SCHED_TYPE_ORDERED > + */ > + > +#define RTE_EVENT_DEV_CAP_PARALLEL (1ULL << 13) > +/**< Event device is capable of parallel scheduling. > + * When this flag is set, the application can configure queues with scheduling type > + * parallel on this event device. > + * @see RTE_SCHED_TYPE_PARALLEL > + */ > + > /* Event device priority levels */ > #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0 > /**< Highest priority expressed across eventdev subsystem > -- > 2.39.2 >