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 66D66A034F; Wed, 10 Nov 2021 10:29:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C77874068B; Wed, 10 Nov 2021 10:29:48 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30044.outbound.protection.outlook.com [40.107.3.44]) by mails.dpdk.org (Postfix) with ESMTP id B51DB40683 for ; Wed, 10 Nov 2021 10:29:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G76aqq6W2iNoNmpHF5zTpN3HTUrqy3B0MU2Q2YDsXNbyOHcT6FGbVnTlYjCANSx+pdatXbG0CgFqPFrKqewvEOa3NBb1XGLHEZMkK6Fn3v6dUGxKYWIVmpllzHFibu9Xdqpu5JwScN51FWixfhkELmAfsOTuHw7aHmTh1JENXccMjHUGlfNvu589xTG5dd4OJfRgaLy9PqWspcvcLMW6QQaDTv98B7mVu9WniTHd9sRZPTlT75rErHrT/P3ApFuJmRcjlpUAbaEmKHBnmyu7/hu87cRo3ryapg4qooN/F3DRUamgIV8v+R7bKDGGcMgcx4NacDCPOW73+owqffRevg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sezBlwQiSgWa8FkjS2fbCmZUV35Vs3vJ+syT5ZkVz/w=; b=LEIamPXDSUBigoaQLryQk/cigIlbPE/t5VLNCRV0esxpSaAO+PpFfzerfpzWq3tOvwy7Mo+zIq/I0jrLAztw9IkqWiqInGjkomJd7kjG6yEUpIkeMAxkbxOtQLl4jSZYYC5PFsZyc1M6ZeU2RRDtAl9SCd24AhJ29mU55pGyAE2F0D/vbm1TLy0+F5WtbeTr0sDlDoL6lkN6WiBZYPI5tNmHw62UUSZcpaGDBrT2XMZYy6iHnfQFOPeJjwE/IiWl0G7nr4JxKMuvMcLhnU2ktc02EY45JUy/lxjJkjpE0jbcEG7+VRsNM8XfUV0V3L6yfI/HzHhVmlE8Cu+qmNqG6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=temperror (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=temperror action=none header.from=ericsson.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sezBlwQiSgWa8FkjS2fbCmZUV35Vs3vJ+syT5ZkVz/w=; b=SDdkD00qlNoBTgwjDwN8ASusgXp4aIA7Zdz1y3IsQIpwylamoJfyySdcVO+xOuR6kuaL+gOlL7FsKUR2Ot3gCfxFbXJ0J1hWQrsxKjSTB+2z+88Ueg2+qikNFNcBaiwaVliecECn89fj2aAQWzjMHlanWVS0xl+B6DWPK44iuu4= Received: from AM6PR01CA0045.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::22) by DB6PR07MB3222.eurprd07.prod.outlook.com (2603:10a6:6:17::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.12; Wed, 10 Nov 2021 09:29:45 +0000 Received: from AM5EUR02FT052.eop-EUR02.prod.protection.outlook.com (2603:10a6:20b:e0:cafe::e4) by AM6PR01CA0045.outlook.office365.com (2603:10a6:20b:e0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 09:29:45 +0000 X-MS-Exchange-Authentication-Results: spf=temperror (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=temperror action=none header.from=ericsson.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of ericsson.com: DNS Timeout) Received: from oa.msg.ericsson.com (192.176.1.74) by AM5EUR02FT052.mail.protection.outlook.com (10.152.9.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 09:29:43 +0000 Received: from ESESSMB505.ericsson.se (153.88.183.166) by ESESBMR503.ericsson.se (153.88.183.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Wed, 10 Nov 2021 10:29:43 +0100 Received: from ESESBMB504.ericsson.se (153.88.183.171) by ESESSMB505.ericsson.se (153.88.183.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 10 Nov 2021 10:29:43 +0100 Received: from seliiuapp00218.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.187) with Microsoft SMTP Server id 15.1.2242.12 via Frontend Transport; Wed, 10 Nov 2021 10:29:43 +0100 Received: from localhost.localdomain (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliiuapp00218.seli.gic.ericsson.se (Postfix) with ESMTP id 64080601AD; Wed, 10 Nov 2021 10:29:43 +0100 (CET) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: , Jerin Jacob , "Sunil Kumar Kori" CC: , Pavan Nikhilesh Bhagavatula , Hemant Agrawal , Nipun Gupta , , Thomas Monjalon , "David Marchand" , , "Erik Gabriel Carrillo" , , Ferruh Yigit , Akhil Goyal , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Date: Wed, 10 Nov 2021 10:29:06 +0100 Message-ID: <20211110092906.20980-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5e4bd65-5a9d-430c-1971-08d9a42ca142 X-MS-TrafficTypeDiagnostic: DB6PR07MB3222: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d+tKZ5ZkmtpswFBdRCoJOl6BagYeI7+tQnxmIvgsHDXiEApu7isXiQ//BY272Dqs5fW7xvmXNRn+uP3dseNoSff6VNJ5AV5ecioEeuJDv0czK6ns0EkvLR+gSvunEm7W/v2pYZFY2XyetlZkZ0kXzccC/XXmWkuqdVcVgPk+hGcGN7ZF230SE1/jcIRsAdhgd6O32905S5C8behju/AM7DW4IWliEYEvfx26cZhdG6x9mSTf9gZlHXzt+4Z0R40/giDG0DdAMkcaTa8fVJTutp9UwpCJeUUEq19yreO6NSvlUzeHikUdkvgq0dpky/94egIzA56PaEJVpL+Bl0KYXgC9WddrT50Y/CKCoH+gn2lmfP/oVmWWVYcQQDdr9n1RN0MFnaZX46xOKlUnyQN04Z4oMrHMRAy/EiZiiMt/8WvT4+WidESTtOBLiIJlQvLj1BIWbvn0B1++Vj+jR9G77rD9IWdukZd93F4cU484vmVpA9Nx0L7RLLLjAOUxHE/mjQYFXL5wgpXAW0Is7niccFVpD+wMmBHyyQUT85+eTdOmrHDOU5lpN8HVPKFkHf1JhraGm82tJu/njEYnnmAaYc1ZLf5XstmPIXV9dKXyaUNVJHEKlgfmGkyXIE2Gc7p58TOs0K1k0eTXtCtF4ZU1nLnHt57IvDg6tCJtm5ehydCH+e5EqKajo/j5QPFfgFo5sbgSLDzmVaBYdt76gDw8qA== X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(107886003)(86362001)(36860700001)(54906003)(36756003)(110136005)(6666004)(316002)(356005)(186003)(336012)(1076003)(82310400003)(5660300002)(508600001)(7636003)(6266002)(70586007)(82960400001)(4326008)(70206006)(63350400001)(8936002)(8676002)(47076005)(7416002)(66574015)(2616005)(26005)(2906002)(63370400001)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 09:29:43.9986 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5e4bd65-5a9d-430c-1971-08d9a42ca142 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR02FT052.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR07MB3222 Subject: [dpdk-dev] [PATCH] eventdev: negate maintenance capability flag 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 Sender: "dev" Replace RTE_EVENT_DEV_CAP_REQUIRES_MAINT, which signaled the need for the application to call rte_event_maintain(), with RTE_EVENT_DEV_CAP_MAINTENANCE_FREE, which does the opposite (i.e., signifies that the event device does not require maintenance). This approach is more in line with how other eventdev hardware and/or software limitations are handled in the Eventdev API. Signed-off-by: Mattias Rönnblom --- doc/guides/eventdevs/dsw.rst | 4 ++-- drivers/event/cnxk/cnxk_eventdev.c | 3 ++- drivers/event/dlb2/dlb2.c | 3 ++- drivers/event/dpaa/dpaa_eventdev.c | 3 ++- drivers/event/dpaa2/dpaa2_eventdev.c | 3 ++- drivers/event/dsw/dsw_evdev.c | 3 +-- drivers/event/octeontx/ssovf_evdev.c | 3 ++- drivers/event/octeontx2/otx2_evdev.c | 3 ++- drivers/event/opdl/opdl_evdev.c | 1 + drivers/event/skeleton/skeleton_eventdev.c | 3 ++- drivers/event/sw/sw_evdev.c | 3 ++- lib/eventdev/rte_eventdev.h | 19 ++++++++++--------- 12 files changed, 30 insertions(+), 21 deletions(-) diff --git a/doc/guides/eventdevs/dsw.rst b/doc/guides/eventdevs/dsw.rst index 18f7e9588f..5c6b51f65f 100644 --- a/doc/guides/eventdevs/dsw.rst +++ b/doc/guides/eventdevs/dsw.rst @@ -44,8 +44,8 @@ Port Maintenance ~~~~~~~~~~~~~~~~ The distributed software eventdev uses an internal signaling scheme -between the ports to achieve load balancing. Therefore, it sets the -``RTE_EVENT_DEV_CAP_REQUIRES_MAINT`` flag. +between the ports to achieve load balancing. Therefore, it does not +set the ``RTE_EVENT_DEV_CAP_MAINTENANCE_FREE`` flag. During periods when the application thread using a particular port is neither attempting to enqueue nor to dequeue events, it must diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c index 50d5c351bc..f7a5026250 100644 --- a/drivers/event/cnxk/cnxk_eventdev.c +++ b/drivers/event/cnxk/cnxk_eventdev.c @@ -119,7 +119,8 @@ cnxk_sso_info_get(struct cnxk_sso_evdev *dev, RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK | RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | RTE_EVENT_DEV_CAP_NONSEQ_MODE | - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID; + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE; } int diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 0dbe85762c..16e9764dbf 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -66,7 +66,8 @@ static struct rte_event_dev_info evdev_dlb2_default_info = { RTE_EVENT_DEV_CAP_BURST_MODE | RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED | RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE | - RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES), + RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE), }; struct process_local_port_data diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index eec4bc62b7..ff6cc0be18 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -356,7 +356,8 @@ dpaa_event_dev_info_get(struct rte_eventdev *dev, RTE_EVENT_DEV_CAP_BURST_MODE | RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | RTE_EVENT_DEV_CAP_NONSEQ_MODE | - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID; + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE; } static int diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 710156ad14..4d94c315d2 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -408,7 +408,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev, RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | RTE_EVENT_DEV_CAP_NONSEQ_MODE | RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES | - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID; + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE; } diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 5ff8fcc6a9..ffabf0d23d 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -222,8 +222,7 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused, RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED| RTE_EVENT_DEV_CAP_NONSEQ_MODE| RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT| - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID| - RTE_EVENT_DEV_CAP_REQUIRES_MAINT + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID }; } diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 366b6d356b..9e14e35d10 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -155,7 +155,8 @@ ssovf_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *dev_info) RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK | RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | RTE_EVENT_DEV_CAP_NONSEQ_MODE | - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID; + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE; } diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c index f26bed334f..ccf28b678b 100644 --- a/drivers/event/octeontx2/otx2_evdev.c +++ b/drivers/event/octeontx2/otx2_evdev.c @@ -505,7 +505,8 @@ otx2_sso_info_get(struct rte_eventdev *event_dev, RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK | RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | RTE_EVENT_DEV_CAP_NONSEQ_MODE | - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID; + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE; } static void diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c index 5007e9a7bf..787ee4713d 100644 --- a/drivers/event/opdl/opdl_evdev.c +++ b/drivers/event/opdl/opdl_evdev.c @@ -376,6 +376,7 @@ opdl_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info) .max_num_events = OPDL_INFLIGHT_EVENTS_TOTAL, .event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE | RTE_EVENT_DEV_CAP_CARRY_FLOW_ID, + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE, }; *info = evdev_opdl_info; diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index af0efb3302..bf3b01ebc8 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -102,7 +102,8 @@ skeleton_eventdev_info_get(struct rte_eventdev *dev, dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS | RTE_EVENT_DEV_CAP_BURST_MODE | RTE_EVENT_DEV_CAP_EVENT_QOS | - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID; + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE; } static int diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 070a4802e9..808f59d1e5 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -609,7 +609,8 @@ sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info) RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK | RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | RTE_EVENT_DEV_CAP_NONSEQ_MODE | - RTE_EVENT_DEV_CAP_CARRY_FLOW_ID), + RTE_EVENT_DEV_CAP_CARRY_FLOW_ID | + RTE_EVENT_DEV_CAP_MAINTENANCE_FREE), }; *info = evdev_sw_info; diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h index e026486ca5..4119f51fa0 100644 --- a/lib/eventdev/rte_eventdev.h +++ b/lib/eventdev/rte_eventdev.h @@ -299,13 +299,14 @@ struct rte_event; * the content of this field is implementation dependent. */ -#define RTE_EVENT_DEV_CAP_REQUIRES_MAINT (1ULL << 10) -/**< Event device requires calls to rte_event_maintain() during - * periods when neither rte_event_dequeue_burst() nor - * rte_event_enqueue_burst() are called on a port. This will allow the - * event device to perform internal processing, such as flushing - * buffered events, return credits to a global pool, or process - * signaling related to load balancing. +#define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE (1ULL << 10) +/**< Event device *does not* require calls to rte_event_maintain(). + * An event device that does not set this flag requires calls to + * rte_event_maintain() during periods when neither + * rte_event_dequeue_burst() nor rte_event_enqueue_burst() are called + * on a port. This will allow the event device to perform internal + * processing, such as flushing buffered events, return credits to a + * global pool, or process signaling related to load balancing. */ /* Event device priority levels */ @@ -2082,8 +2083,8 @@ rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], /** * Maintain an event device. * - * This function is only relevant for event devices which have the - * @ref RTE_EVENT_DEV_CAP_REQUIRES_MAINT flag set. Such devices + * This function is only relevant for event devices which do not have + * the @ref RTE_EVENT_DEV_CAP_MAINTENANCE_FREE flag set. Such devices * require an application thread using a particular port to * periodically call rte_event_maintain() on that port during periods * which it is neither attempting to enqueue events to nor dequeue -- 2.25.1