From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0053.outbound.protection.outlook.com [104.47.42.53]) by dpdk.org (Postfix) with ESMTP id 04D7C1B9ED for ; Wed, 25 Oct 2017 16:51:16 +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=I2fBzFMnxKP+Qbn2BWMAxpyugaoCrrpu5DQwETLRnYM=; b=Yq1Y8uLdtulRU7UgMOxsmPzZ0BkjVMDxe3YVdw6sUUVawrW/E9OslLG/RIvedkn18Ni1MWXz5KY30n30qPoRIhnJkHWyVyaYaeONo5hDRtUAcXbfXiJGtZ853YREDpqKUHVY2vcs+gmN12nB/L/5oL6O4BT4Aqn0cHDFHoaXSAE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Wed, 25 Oct 2017 14:51:13 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, harry.van.haaren@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 25 Oct 2017 20:20:32 +0530 Message-Id: <1508943033-15574-6-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508943033-15574-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508943033-15574-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MAXPR0101CA0009.INDPRD01.PROD.OUTLOOK.COM (10.174.62.19) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f479b65-c6c3-48d1-c76d-08d51bb7d76e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:rc0cRF43k9VnxTn34zMp3v7qiH+tO0kmkV11QZ1eJ2T1CqUC6Z5tW3bmZ12ntakELneJwEZzrHkcY2FlK4LuLbMGAAS6LwH1yoZmJGLBuAfhAQCzDO1UdIV0/dxZ/Gt6JEyNWaeOp9YtFZgOwys2QqXhB/csDfSba3C0FlwiSs9kOSKRa93YvEdiNHFPtNBY7VWUrGux5zrnb0GJ2xxUFucUI7HKqChO/q6mkc8bKdK3mQekpEdEWlUqgb7Cjpt2; 25:rAhKqJDeg0W/UuFkAuGDBK4EP807RrkeqGbHMNsAe3ZXSB8Ca6q8hMIC+Rfb5HJSgVZ+UppiF4gTDeGY7Ihs0PZJl4yFnuWQ3gNx5O8pCdSjE9dtbnf/iQkLtnPGRRb69auYxOt9CvgTRkODCOKnl6uvSV89tc0pe7/i0qmL7Bg1xOmfcKrM9bGilqYZEyWYSmzScwocyBUcqYbsPnmKTFo36IwicC3OzS+X7TgfdlAW367wIcFQGytwZB5wCAo/Th7N8o8VktYVw+PiptUIdWnQJMKXRO2Fxib/GY14M7+MY3j3RNF7CXDVlDdFWvAL53rOb3sZCS96It9GKwF/WA==; 31:qFopXXAiRJGccXm5SN0z58DxmDBuzoR9nGRum7D9Nxz8hRjLBew0sCJ6AGAVtQikAVQmXiktyImc1ZfuUjNLScpum8G2xTQoI+uvxezgokWPtpXUSHlEmAmDMpsp35/ht5I6SZloX3a2hWctQlSOhcnaXTZpIA2//g88JHsidUKCOcoBXR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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)(5005006)(8121501046)(3002001)(3231020)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3458; X-Forefront-PRVS: 0471B73328 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(81166006)(53936002)(7736002)(50986999)(16526018)(50226002)(76176999)(4326008)(305945005)(66066001)(5003940100001)(8936002)(2906002)(25786009)(101416001)(42882006)(6666003)(107886003)(6512007)(8676002)(5660300001)(2950100002)(68736007)(81156014)(47776003)(50466002)(36756003)(5009440100003)(316002)(16586007)(33646002)(48376002)(105586002)(106356001)(53416004)(189998001)(6116002)(6506006)(97736004)(478600001)(3846002)(6486002)(72206003)(69596002)(8656006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; 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; BN6PR07MB3458; 23:JvA0Dc+Bp2hSB6ioexAowxisE3yOENahd5J0v1BJW?= =?us-ascii?Q?zjx1H24bS+8bZ7i9eDysc68xM1ClnLs0L9JY1SHrYvsVshhG1GbbFLSw0JIU?= =?us-ascii?Q?luizWqiPipYUHNKAIFq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zI1/Vsg72voP1m+G23M8POENfPa5UOuQ304jBIkfhwS8+2P27hnx13xnjMkCzO7zRicdVhqgsU8E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2017 14:51:13.1716 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f479b65-c6c3-48d1-c76d-08d51bb7d76e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: [dpdk-dev] [PATCH v5 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: Wed, 25 Oct 2017 14:51:18 -0000 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 d8f5f7d..45e2ebc 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -785,7 +785,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 7bdc85d..cfbd958 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -157,7 +157,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 92fd07b..178f169 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -615,10 +615,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++) @@ -833,7 +837,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; @@ -861,12 +864,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 a7973a9..f1949ff 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. @@ -1052,9 +1052,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 */ @@ -1118,8 +1115,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; @@ -1148,24 +1143,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