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 44F72A0547; Tue, 26 Oct 2021 19:32:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D2EC4111D; Tue, 26 Oct 2021 19:32:12 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30088.outbound.protection.outlook.com [40.107.3.88]) by mails.dpdk.org (Postfix) with ESMTP id 05BE1410EE for ; Tue, 26 Oct 2021 19:32:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wm8iZPLv/riO7/SWH23d3fIZIw36OKQCYp2uzqsUZHcaIvpceaCenW7gdVQJsVQoYbMioDieyXjQiYxpRWOWEM6t6IiEURqfXpgrzKGxPRTDePx1WTQI+bEw0N4GHY1mw8gowii7R0wkSC//8NoLyAdVI9v2nQokZQJtspZGOUaErKDAzOQjTUz4gNBkbKkA2u3n2GewsYz/ImyvK8BfsFvtSmC/NQfFr0bJ9ERZL+QYQGS7itQJyd9HsoIkqOfoyEVLZfPoyQOctRyW/Gdi9hI3i9PXG3M6bk9TQHdY9hJ7M6hkeeVwF/5HS2to/LHqc4aBXwtAomid7Q2nC9EmKg== 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=owOj3YTkxprzepT87+BnLVItwVig8JlEgrITBY7/2qs=; b=LtCtrO/L23Lp1oXR9AJ8dhQl4M0NgNq4GW99Bqa/Jtp1L0blUgkudJSXN3zftsvH+2TsRFTe3SLpN0n+aR6xulecQFs4IORLLkJbbGJln4A1Z3ulaK4sy70RLovDOMJMhrHvwU34MCTPkKoWIdBUZWjl/XTZpsQywwLWgc1r935sfvPzFa2H3n/vx2oHdkcZVfSZ64iyB+02Vm1Il/E2vsL8HByHMOx+oFW2VcwvwSUJtNiDlEducTgULg6gMTRBVZqjT6XxMUUyHk5XKrhPNzNiVV/CCJKM8flqZqAbvMihWDC8r36Vz7cpALrsXrWfKjUE88Gt3iGhtxzG/ejg1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) 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=owOj3YTkxprzepT87+BnLVItwVig8JlEgrITBY7/2qs=; b=qTuPmxiewUhzLrmy8gvfIIQFl5pqwVvKqFJOkLrdW/RhCD/qWzABCWSVfjjBigIqoTggpLCYCdWC/CDVsE9kDME8ysguCjYBV9CRbBWXkAS8szMPnWH5NnxvfbpHCVheLIt0Be8AA/2ispBzEHTE1M9yGWqOHnHll+9l1x3vwBY= Received: from BEXP281CA0012.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10::22) by DB9PR07MB7209.eurprd07.prod.outlook.com (2603:10a6:10:212::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.12; Tue, 26 Oct 2021 17:32:09 +0000 Received: from HE1EUR02FT055.eop-EUR02.prod.protection.outlook.com (2603:10a6:b10:0:cafe::f5) by BEXP281CA0012.outlook.office365.com (2603:10a6:b10::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.11 via Frontend Transport; Tue, 26 Oct 2021 17:32:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; Received: from oa.msg.ericsson.com (192.176.1.74) by HE1EUR02FT055.mail.protection.outlook.com (10.152.11.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4628.16 via Frontend Transport; Tue, 26 Oct 2021 17:32:08 +0000 Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESSMR502.ericsson.se (153.88.183.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 26 Oct 2021 19:32:07 +0200 Received: from ESESBMB504.ericsson.se (153.88.183.171) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 26 Oct 2021 19:32:07 +0200 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; Tue, 26 Oct 2021 19:32:07 +0200 Received: from localhost.localdomain (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliiuapp00218.seli.gic.ericsson.se (Postfix) with ESMTP id 54A3B601E6; Tue, 26 Oct 2021 19:32:07 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: , , , CC: , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Date: Tue, 26 Oct 2021 19:31:47 +0200 Message-ID: <20211026173148.19399-2-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211026173148.19399-1-mattias.ronnblom@ericsson.com> References: <3e8c8bab-783d-d132-a836-51bd4d5533bb@ericsson.com> <20211026173148.19399-1-mattias.ronnblom@ericsson.com> 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: 6c38a9c2-e7dc-47f7-623c-08d998a68995 X-MS-TrafficTypeDiagnostic: DB9PR07MB7209: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wRQVp/3J6lFr0MaeFqLtVOsn4SRvbWZ5ahlKtWq8GnABkdPt9Cg8sy10d7CsOVrkaRtQVjDVhUOjaQE39Kgn3DHF5g8wUS+wBnvt/6FLQvEHfsvEOWJImh8CZ8ZRxjZzb+saRetZ9SJX4td61dSs2LN/MGZiyZfltkL3VshcF6O9CnPuZKa9wadTk5D+fVHReguDczG0AgPzIQWyI1lyenhfR89PVSGimr75KC1gK82MuQ2+/1eJbBAQh9UJyQISw+rjcMDsmSqIYbKZpN1gGPeME2T7DGMiXOZdEcIxjK7/BIYd3Kq5g0WjtBHP8yUcyIMFMXtwmiGog8JyrtAuBTm6EbzZ9chrmoZhbbFwLOuaNaAWDskY8kgO5BU00gvk/TO/ZznDEKuqPsdSnHLOygwkxiXc/goWZsP1V84RqOTDtrUqjqrrAQD79vKQTUj9v3pSmpoEj5+gCGb1seNQvVRTPfV6xDyFmYoTzMGcLzuVWEtY3ZvbyTSRI7zoXZQZIDG+d4aoX31p2vZSnY4Suym8T6QqzPh3vmiPKFT0BfQ+ySXNW8uNFacCEyTr/9N6eRTvfa2JVe6SoFxL1Xx5OuuKFhos2v1dBKHoVD8ZYupTrHTSmfl/Bpk+8W1xldmyKmS8mdAqy+QafT/7sMB1fCDdtH2PNAjO6/m7OxPH3fgizxnxC+P0W7W3za2bMlOWUoxLX9vnOACB+5I82NxlgA== 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)(36840700001)(46966006)(186003)(1076003)(82960400001)(2906002)(107886003)(316002)(6266002)(66574015)(7636003)(86362001)(508600001)(54906003)(4326008)(47076005)(6666004)(110136005)(8936002)(70586007)(8676002)(26005)(70206006)(336012)(356005)(36860700001)(82310400003)(36756003)(2616005)(5660300002)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2021 17:32:08.9617 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6c38a9c2-e7dc-47f7-623c-08d998a68995 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: HE1EUR02FT055.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR07MB7209 Subject: [dpdk-dev] [PATCH 2/3] event/dsw: make use of eventdev maintenance facility 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" Set the RTE_EVENT_DEV_CAP_REQUIRES_MAINT flag, and perform DSW background tasks on rte_event_maintain() calls. RFC v2: Have dsw_event_maintain() occasionally flush the port output buffers. Signed-off-by: Mattias Rönnblom Tested-by: Richard Eklycke Tested-by: Liron Himi --- drivers/event/dsw/dsw_evdev.c | 4 +++- drivers/event/dsw/dsw_evdev.h | 1 + drivers/event/dsw/dsw_event.c | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 0652d83ad6..5ff8fcc6a9 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -222,7 +222,8 @@ 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_CARRY_FLOW_ID| + RTE_EVENT_DEV_CAP_REQUIRES_MAINT }; } @@ -441,6 +442,7 @@ dsw_probe(struct rte_vdev_device *vdev) dev->enqueue_forward_burst = dsw_event_enqueue_forward_burst; dev->dequeue = dsw_event_dequeue; dev->dequeue_burst = dsw_event_dequeue_burst; + dev->maintain = dsw_event_maintain; if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h index 631daea55c..31af4ede0f 100644 --- a/drivers/event/dsw/dsw_evdev.h +++ b/drivers/event/dsw/dsw_evdev.h @@ -271,6 +271,7 @@ uint16_t dsw_event_enqueue_forward_burst(void *port, uint16_t dsw_event_dequeue(void *port, struct rte_event *ev, uint64_t wait); uint16_t dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num, uint64_t wait); +void dsw_event_maintain(void *port); int dsw_xstats_get_names(const struct rte_eventdev *dev, enum rte_event_dev_xstats_mode mode, diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c index 1f09816945..f16d9d463b 100644 --- a/drivers/event/dsw/dsw_event.c +++ b/drivers/event/dsw/dsw_event.c @@ -1400,3 +1400,12 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num, return dequeued; } + +void dsw_event_maintain(void *port) +{ + struct dsw_port *source_port = port; + struct dsw_evdev *dsw = source_port->dsw; + + dsw_port_note_op(source_port, 0); + dsw_port_bg_process(dsw, source_port); +} -- 2.25.1