From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0082.outbound.protection.outlook.com [104.47.42.82]) by dpdk.org (Postfix) with ESMTP id 288C01B7AF for ; Fri, 13 Oct 2017 18:37:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rhJ+YnyW01V/KmjyDsFn4n0O2LskYreGba388zU1HlU=; b=UrvgeL4pqouPeEX4nm4OrmAVSEahZycmycmSssUOZEYUysz7XTYj6TiG3FfQ4WJEAJVdMRHAlDIVsAz88twuZ/bW2noA8d+POv6fXZlBSVaEJBCzDzaHwf5egOpDc7KYGj/H4gAb6mYVsj7ewU95AoXtmpiO2gHHTg8sGPwlTXo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 13 Oct 2017 16:37:21 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, harry.van.haaren@intel.com Cc: dev@dpdk.org, Pavan Bhagavatula Date: Fri, 13 Oct 2017 22:06:49 +0530 Message-Id: <1507912610-14409-6-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507912610-14409-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> <1507912610-14409-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: DM5PR05CA0054.namprd05.prod.outlook.com (10.174.188.171) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8354e65d-a057-4684-3a8f-08d51258ae70 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:hj9hPGCWWMhlShuWqWLEBqMdyJdlr+wu2jssJ5F5iuaJbJzwCMgaV9GZyyi7UgaTL6/hse+G0sROvHd8OLD1/k+YaOQyjLUaLE0a58YkhqRnKtGNixtX9OOTjCc6ddk0AafAZKsUKQDKBatrOUaWk6Tz++MJvBmqAnHPRwyOAI1CypeqXKmIp3P6OMt8BGjyxsg+t5zXf2A7C2ld0CB7OMTgoD1m+DhiUU1Y3hRU9sRQ+DqpDyHlo6N3/dC4BR9F; 25:P/FdcICG9NCEG801nMmzrh7oCSShGzaXK5KrAHLHTwu41WYOkja5uijXtuJ6pCy4OfvOyHHWkv0saCHD9FKgW7jReDBDYTdAaXEfc3a5BF+Yl01ld+uIT5hT6BlDhpS6yi1YUPZAOSWw/ljLJqLr4836z/2RFmKCU/NS6jDlCNpAxEWG2Vg1VwSs/Mx8kja8OgVFtDcozkQwwq7CurmlCXt+QcPfg8SzZUtKUi2JIYYR/rL9TfCEl33c0dbIAEwwYHtl0nsaWHZit45hhRQE/Vpw8frgfzYv5K+ZWYjQcuvLwd9hy3QCITLVkMz8c+V5GkzNkvMVH1XVORZDm1kEAQ==; 31:nxQDKhAfnsboTr6MKTMm12gEALYaMKDhUar93zr4aalsCIHy5FQGQQd4tTheAnMXZ6GbC2jODseA847swub9oyyutf9/LATCxa+dmszWSyzaHa2oIcLTT/LapdMykZ+Oyzh3tt2qCoWmM107ltlbruKMeKIviBX41loDEpdW44xO0g6nxxK4aq2NfvIj8Zr/uqPg6a4uszDJ2emmrjNUmbzwXHFd4GCYQe3thQbubZI= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:7Zh8oHwxo96VhGPpBtb0Jx+AsX1THRmMvt6o2WNXUJwPvUfkqdQFSwtgSJ/ftvE/iN5DCD9+zb1uaL+uZqEISGX+52Soq8dhTS6vHghCp8j9euM+U9D9QUUcQTo4FhIQIKkfaADtIMwGH3u/lZ470RvRX3wLjkT/X5L9Mjgi/XychXExOKerdCatfZh5N0uP/Lzro3Zl3MaJxdSSf2me4fwMsZVFxxxpb17QSMxueEdkDLSdq5YEIYbt9EP2CnlJGe0FkHPOlPWIeFa93q3IM0D0j3l+1UhlHMeSkBDZTvUfDYue2nmrAiX6r06WSoEZdE7453X1Wci4F97KYu2EtSI+4yIxituW/YTA8dy8CmPjJfdzpWUYeCerG0vRjyyqq8j5L7YQ9SW7nJ4JFxZGmEzdipfafY0Jdy9fYHnhsOuKs2BqKB1gzW6JQrI8GfgWv1jzPU038X+gi/srMXta6EKasSVD0GHEOiYtKPa34bGaeDWyhYkcXs050DFx/Z3i1qr4VmK1IHXilU+NWdYNiIm8cVN8heqwPr32+7iuVdKLSk1Dri/A4sZLoBQswn0iYrmSOITCt4uvN1C3Xa8GAvc0yavN0/OL1aPtNDeG8eY=; 4:ackw2hsy0DWo2WVGaL4zmQCoR0xde446idJxZkJ1lUDRjzWJ7uhm48gXecxNrJ17MbZEUKnmyQeoZjN8ls81WUGFe83bnLHzdeYvStplHGqwRBWkBZjzpEcWunZ8YxSGAJfNL7ObiJyh+UOs6hSosuKDNxqMlqkEKrBHA62GtA1jFLdcuVi5DSMbgTjsPwPb7LahxiImb/X9cM5FQl7hXjX/pWyOlhIJMAtY6bX8eInn+6WXi/TKXHjizIXoHbkC34YMF5Tq6dpkplMOBOVjFbKrvnMHWpKktKDqcXlSYs8= X-Exchange-Antispam-Report-Test: UriScan:(271806183753584); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 04599F3534 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(68736007)(5660300001)(53416004)(3846002)(6116002)(33646002)(6486002)(316002)(6506006)(575784001)(5009440100003)(50466002)(72206003)(478600001)(4326008)(2906002)(2950100002)(25786009)(42882006)(107886003)(6666003)(36756003)(53936002)(5003940100001)(48376002)(69596002)(97736004)(105586002)(6512007)(16526018)(106356001)(50226002)(8676002)(50986999)(7736002)(189998001)(101416001)(16586007)(81156014)(8656003)(47776003)(81166006)(305945005)(8936002)(66066001)(76176999)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3464; 23:ZF2ye32J6bKqJU1sOYESEukmBfu7bWAAW5BDQIvdq?= =?us-ascii?Q?0maBK1TrJUAMae5gzYsiekW4hyUqdBtEq9zjjsgj6ojJv0DO/94svP032azL?= =?us-ascii?Q?iBYHBHVtWfoLG10S0HgaL+D9VDTURSc8RN+Yxa11P56Syt6SDu1Y7sA+RAVd?= =?us-ascii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LJ0r9M+dvpubQ52Fdo1/28mMktR6B51mhE8benrVrMcn0+Tyxfb64yH91rVIvpeIBLr9N/HS/7+6rXIyZTBbQ63TDhF/K6aYes6GBkPwHyHuM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 16:37:21.6812 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH v2 6/7] eventdev: remove eventdev schedule API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 16:37:25 -0000 From: Pavan Bhagavatula remove eventdev schedule api and enforce sw driver to use service core feature for event scheduling. Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx/ssovf_evdev.c | 1 - drivers/event/skeleton/skeleton_eventdev.c | 2 -- drivers/event/sw/sw_evdev.c | 13 +++++-------- lib/librte_eventdev/rte_eventdev.h | 31 ++++-------------------------- 4 files changed, 9 insertions(+), 38 deletions(-) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index d829b49..1127db0 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -155,7 +155,6 @@ ssovf_fastpath_fns_set(struct rte_eventdev *dev) { struct ssovf_evdev *edev = ssovf_pmd_priv(dev); - dev->schedule = NULL; dev->enqueue = ssows_enq; dev->enqueue_burst = ssows_enq_burst; dev->enqueue_new_burst = ssows_enq_new_burst; diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index bcd2055..4d1a1da 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -375,7 +375,6 @@ skeleton_eventdev_init(struct rte_eventdev *eventdev) PMD_DRV_FUNC_TRACE(); eventdev->dev_ops = &skeleton_eventdev_ops; - eventdev->schedule = NULL; eventdev->enqueue = skeleton_eventdev_enqueue; eventdev->enqueue_burst = skeleton_eventdev_enqueue_burst; eventdev->dequeue = skeleton_eventdev_dequeue; @@ -466,7 +465,6 @@ skeleton_eventdev_create(const char *name, int socket_id) } eventdev->dev_ops = &skeleton_eventdev_ops; - eventdev->schedule = NULL; eventdev->enqueue = skeleton_eventdev_enqueue; eventdev->enqueue_burst = skeleton_eventdev_enqueue_burst; eventdev->dequeue = skeleton_eventdev_dequeue; diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 9b7f4d4..086fd96 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -629,10 +629,14 @@ sw_start(struct rte_eventdev *dev) unsigned int i, j; struct sw_evdev *sw = sw_pmd_priv(dev); + rte_service_component_runstate_set(sw->service_id, 1); + /* check a service core is mapped to this service */ - if (!rte_service_runstate_get(sw->service_id)) + if (!rte_service_runstate_get(sw->service_id)) { SW_LOG_ERR("Warning: No Service core enabled on service %s\n", sw->service_name); + return -ENOENT; + } /* check all ports are set up */ for (i = 0; i < sw->port_count; i++) @@ -847,7 +851,6 @@ sw_probe(struct rte_vdev_device *vdev) dev->enqueue_forward_burst = sw_event_enqueue_burst; dev->dequeue = sw_event_dequeue; dev->dequeue_burst = sw_event_dequeue_burst; - dev->schedule = sw_event_schedule; if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; @@ -875,12 +878,6 @@ sw_probe(struct rte_vdev_device *vdev) return -ENOEXEC; } - ret = rte_service_component_runstate_set(sw->service_id, 1); - if (ret) { - SW_LOG_ERR("Unable to enable service component"); - return -ENOEXEC; - } - dev->data->service_inited = 1; dev->data->service_id = sw->service_id; diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index 1c1ff6b..ee0c4c3 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -218,10 +218,10 @@ * (each worker thread schedules events to its own port) or centralized * (a dedicated thread schedules to all ports). Distributed software schedulers * perform the scheduling in rte_event_dequeue_burst(), whereas centralized - * scheduler logic is located in rte_event_schedule(). + * scheduler logic need a dedicated service core for scheduling. * The RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED capability flag is not set * indicates the device is centralized and thus needs a dedicated scheduling - * thread that repeatedly calls rte_event_schedule(). + * thread that repeatedly calls software specific scheduling function. * * An event driven worker thread has following typical workflow on fastpath: * \code{.c} @@ -263,9 +263,9 @@ struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */ * In distributed scheduling mode, event scheduling happens in HW or * rte_event_dequeue_burst() or the combination of these two. * If the flag is not set then eventdev is centralized and thus needs a - * dedicated scheduling thread that repeatedly calls rte_event_schedule(). + * dedicated service core that acts as a scheduling thread . * - * @see rte_event_schedule(), rte_event_dequeue_burst() + * @see rte_event_dequeue_burst() */ #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3) /**< Event device is capable of enqueuing events of any type to any queue. @@ -1065,9 +1065,6 @@ struct rte_eventdev_driver; struct rte_eventdev_ops; struct rte_eventdev; -typedef void (*event_schedule_t)(struct rte_eventdev *dev); -/**< @internal Schedule one or more events in the event dev. */ - typedef uint16_t (*event_enqueue_t)(void *port, const struct rte_event *ev); /**< @internal Enqueue event on port of a device */ @@ -1131,8 +1128,6 @@ struct rte_eventdev_data { /** @internal The data structure associated with each event device. */ struct rte_eventdev { - event_schedule_t schedule; - /**< Pointer to PMD schedule function. */ event_enqueue_t enqueue; /**< Pointer to PMD enqueue function. */ event_enqueue_burst_t enqueue_burst; @@ -1161,24 +1156,6 @@ struct rte_eventdev { extern struct rte_eventdev *rte_eventdevs; /** @internal The pool of rte_eventdev structures. */ - -/** - * Schedule one or more events in the event dev. - * - * An event dev implementation may define this is a NOOP, for instance if - * the event dev performs its scheduling in hardware. - * - * @param dev_id - * The identifier of the device. - */ -static inline void -rte_event_schedule(uint8_t dev_id) -{ - struct rte_eventdev *dev = &rte_eventdevs[dev_id]; - if (*dev->schedule) - (*dev->schedule)(dev); -} - static __rte_always_inline uint16_t __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events, -- 2.7.4