From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0046.outbound.protection.outlook.com [104.47.37.46]) by dpdk.org (Postfix) with ESMTP id C621C1B338 for ; Sun, 22 Oct 2017 11:17:04 +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=b5pUsCLz/YWy2cNtHURojUJAkQ4y/q6uL3V1DI+uDXE=; b=Dp8AAQ+I5FFBbVMOq8w9+6H9wA42njjIEiY1oeux32voVo2MlptR4Ei7yOAjdWZ/reDTUEVgc8Y3+3TtL+8Kf5blQHUbU8I680gKGeJdmIt4VOccVX9IrjSK4vReOcsIjuZ2m7OkmcAwshrFKNh8js4wHIE1ObgtegYjKsQ1bpw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (103.16.71.47) by BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Sun, 22 Oct 2017 09:17:01 +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: Sun, 22 Oct 2017 14:46:24 +0530 Message-Id: <1508663785-15288-6-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508663785-15288-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508663785-15288-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: HK2PR04CA0083.apcprd04.prod.outlook.com (10.170.154.155) To BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 37330756-636c-403e-f954-08d5192da89a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:BN6PR07MB3460; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 3:Hana6vDOK2zHGTkm1D1oD8weOEmlu6Ytyj0szLbw57dtT6I77dnZm0OyW4Q24JMk/gTXlpsrF/piwJTOV3n0louXw7OHsKmIW3tDYO5WtcnPFiVx+4B8hsdfukiR3mwkZgM0QZ9UHbGlfZ/vqYHVJHpPMPvs2B+ziUPIM31PKQGyw9+lCtmSiyDxkWaq1llSfqi8WYrz3f18vThRYaqaityZFJ9BYY0gyta+FapG49LIJmyUtXJE+DZcb5A1ElRw; 25:y2Z0Vvc3bixoV8QJ6nCudSlR5NznL03DGDGfY9SjbL7AhJWVtIvpqewQyZszwu1FK2CrPctw2hg2i/GMsajUWifo9KNWXgewhlIfKMGnr/W7VALBcoCpHlapTi2u+7PVX1CKNBsqPJSK1nN/iU5nCx6Blo/+lwbbywZjK70CuVaecCk7zB1zPblljXrr1q0wSaCllbkqpu5XIA0APAkHho+nPjoBZQTOsYSWjj8rgAZBUcZc7XC1+0PaJVCYlaQ8q/c41V5P2uIaUaEyZW4BSZw/eto/tgLDu/sjW6/I8KSsJow2eL5kzoXpyyF/BL5GG0sVfsnNAPXpvyD0oa6vOQ==; 31:IxewmB/3ENOjPeYJ1XVA7CmLyZklhnkJtF0bpEoBEHk9nHzmx/Cu3HM9tCs/21GFbwbmV+iiJR76B5ZThD3r4dqmSjX+++yfytikKZFXy7b6nfvqi0tZAuQMwbrVcyeWhps3lES9QtUOszP7Qau+wAxhpzB/bDse9ALqTdgDcOvm6HlYZr36zerDQSnO2r4BOLMiuTwXSREhPTELDUx+3kMX/YaQ/ACFN7peHCqZvi0= X-MS-TrafficTypeDiagnostic: BN6PR07MB3460: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 20:Trq5DM/fopo/1SWdq4cfUPrzBtXrNRglt96R5bLBnjLayG73zFgO591WFE3lYg8OreIRiCw55AH/AWCXBnwS99qzCb8VQImCu0OneoTMTvj3Li1emxRZrLm48faj4fMtiWCnkhkYFHrM8tQ8bnWwq6F/pj9o5K3MX+MYyNcrfIagAQUlfBbWzYkPSs5u+/rEPhtyAV4uJZPGFLDYdhho1iJ2Lim22IlZQ/8g7KBKv4NmfJvwPTpYwi4lU01Qxl7zud7V/2lkbW0Kpj8tV5gn8iuVFouanj9fkXvX299azfpeSHZxCdxt77dhWhG1SFLCK9jMIktc0VTIFYgdn3PpOvfnkgEQOHj5cchj1v0PTCs8Z0MpAmQJXD4TgtKjyI2LaJh8oAt/YR3yMw4HLAKcvkwE+yP0X3KRV9DAxIjNbtt7NH1FpJDZF4FeRUSZsBond3p3UPyO7V6wA9rDYkzxisxh9ZLBpJpP20ejmjd6M5Uye9MtnHg4BFjg92o4O0c0Um+A+9iJlrCJIt9MvouNk7uPGnW0xPa987alASzHMFGf0za8qQhEd3FKLpFXMuIalNJ6qEzLR7vWnOBFYED3U7m3Ia6cPCHcswr3lKrn9HY=; 4:CUqR5hkuIxgOhdVbhzhYlddNsKNP4J5PSN5lK9U+1MQGxbr9EZWqBABh5bLlOcMCepDqTDWouV8HURAbnlYrjwfJteXu4aWEBvo1Kse+LQMKVEUAGHWt7aJEe/f4SyEIDYQUeM1PYTcqLi+ZMtAXxG47gkuSBN2uInvV8T/DhGYWOl4dT1P0NQEfz/1hHudEL63QhGlrvpUEuw/DxHQXvq4mw/YE5pYRRMeZSbNzEbf/TtdGt7OGFCdxrhWycVycGAqxDOXH4xKhk8hQaUiw1leTEpGVGeUq3w5HChTKGak= 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)(93006095)(100000703101)(100105400095)(3002001)(10201501046)(3231020)(6041248)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3460; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3460; X-Forefront-PRVS: 0468FE4A2B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(346002)(376002)(189002)(199003)(72206003)(478600001)(8936002)(3846002)(6116002)(6506006)(6486002)(7736002)(575784001)(66066001)(50226002)(97736004)(101416001)(6666003)(2906002)(8656005)(305945005)(189998001)(8656005)(5660300001)(16526018)(76176999)(50986999)(33646002)(47776003)(105586002)(81166006)(81156014)(106356001)(2950100002)(42882006)(68736007)(4326008)(107886003)(316002)(16586007)(50466002)(48376002)(5003940100001)(25786009)(36756003)(53936002)(6512007)(8676002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3460; H:localhost.localdomain; 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; BN6PR07MB3460; 23:f3eU19TCRWItGAepuCjg/C03Ilhjzn90z5bDFKoGu?= =?us-ascii?Q?AweDvcY/fMiTBHoYHYoPonOQspREPQoBrU5Mz7YhMEUzUlgMmYWRoDFMCvIV?= =?us-ascii?Q?jIjDEQ28FhKziVSADm7Dt9uQybEqtKRelz+3b0IBr20qxXWNacXbwkpxOqlC?= =?us-ascii?Q?a0rw38TRB4ibtNidoaJzOm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iagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2017 09:17:01.6213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37330756-636c-403e-f954-08d5192da89a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3460 Subject: [dpdk-dev] [PATCH v3 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: Sun, 22 Oct 2017 09:17:05 -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 Acked-by: Jerin Jacob --- drivers/event/dpaa2/dpaa2_eventdev.c | 1 - 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 ++++-------------------------- 5 files changed, 9 insertions(+), 39 deletions(-) diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 81286a8..28f09a7 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -621,7 +621,6 @@ dpaa2_eventdev_create(const char *name) } eventdev->dev_ops = &dpaa2_eventdev_ops; - eventdev->schedule = NULL; eventdev->enqueue = dpaa2_eventdev_enqueue; eventdev->enqueue_burst = dpaa2_eventdev_enqueue_burst; eventdev->enqueue_new_burst = dpaa2_eventdev_enqueue_burst; 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