From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0086.outbound.protection.outlook.com [104.47.42.86]) by dpdk.org (Postfix) with ESMTP id DDE261B9C1 for ; Wed, 25 Oct 2017 14:00:09 +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=Vpop2aC6hDj8t6hfyY7THstnEJcpwUoMBr54h1ilPho=; b=WT6fi8DsIM3cZAbd92CrGIPqeiZVSf0tvKBzqB1OGczv/IMI/xHoqINGbIL4iyJQ3mp0FJmys/6AOOD6zX42WmR8RYhCuRWNuREEsv2sRsOpyQdNibYafuV9yPMAgJVotrXsoKkejTvboG7bZq8RiujifSvbV+mC/N9NheiY7cw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) 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 12:00:04 +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: Wed, 25 Oct 2017 17:29:11 +0530 Message-Id: <1508932752-22964-6-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508932752-22964-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508932752-22964-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MAXPR0101CA0060.INDPRD01.PROD.OUTLOOK.COM (10.174.63.22) To CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d25b0a3-c376-41a5-4ec5-08d51b9fee95 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603238); SRVR:CY4PR07MB3462; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 3:gQ4RvzNKxOO4jTHsRmeIclZy5vy0CJpg1dZ8NkRGQNuLzs+5Pb+nbQaffpxAF6ggEEHUrAxUXXTfMA0F725NY2ZmLm3znVK0ACkxP7u2ak79aSu4jemukNpxlQ07LEli1WkLDA1XdDpI4YKOAD65+RPEEIGYUc4yGIzJqcVRwg4WrV50IZJ4hvBEwQSB9OZq2pRO497NvP3hBetR0bciZP/Q8QhaofTasNKSlsyJzENwFJN1RvIy6kJNCpHNszWt; 25:kmT9JbeGvyymMSvYD4AnIBEcUHUn8ux+Lb/btxQ8lWWlXxpfWLQLPboJEUn7aqvw11P22Cm9+AAbQYXr+991y79uz5N6Saf4E9YFLoFCv2kU8Z4nVhpxZfJEQ0JDZcdY6gIVZtBGZZhKQapvqrlFQEszNgSSs+MfJLiffPws7tW+GW9NN3jvN4ryHeUWS6xW+Ey+bT0V/+I0ekeuEHOzFMsyl4PoZZy3+vcJcB5Z28sRLm9E8Oi9ht9WTK2rwz+IozsYw3yRqhClBgvRY4oIQJpBMppD+a0gQLs1a7R52UwTZTr6vSMrZTschtZ6PRXLqEaijhVx4CzZQhpNN8GVrw==; 31:O1Q2SZHICeprW0FmVWPuutQENYwb5mSibBNVPfd/07NoGH2iUcqIfywuem5A5pgXg74mjE99DfEmYxXJV5OmEmRrk1YyDnJMFQYtwqljpBDIGR7iB6OQU3zV7UTrElV6zcw+/A3odwTBkt++8EE+i/9d6J9mNgBmX1a0FVI5uCOAr8H3dYSi2u5r55+a83L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an:(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)(100000703101)(100105400095)(3231020)(93006095)(10201501046)(3002001)(6041248)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3462; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3462; X-Forefront-PRVS: 0471B73328 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(199003)(189002)(4326008)(106356001)(42882006)(8676002)(8936002)(97736004)(68736007)(50226002)(7736002)(305945005)(5003940100001)(5009440100003)(48376002)(189998001)(16526018)(6506006)(2906002)(6666003)(6486002)(5660300001)(6116002)(50466002)(76176999)(101416001)(316002)(16586007)(2950100002)(81156014)(25786009)(50986999)(53416004)(36756003)(478600001)(105586002)(69596002)(3846002)(66066001)(33646002)(47776003)(575784001)(53936002)(81166006)(72206003)(107886003)(6512007)(8656006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3462; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; CY4PR07MB3462; 23:L8/JXGuMRsmh++L+2Zz/DMco78kGW1T0diFIwlr++?= =?us-ascii?Q?4rWkvnat1n12xT41mlJV99y3TEWiXLJ1IWKAlE9EIug2+YMMmGnaqZZINgko?= =?us-ascii?Q?T+6g/y8MRqg9sZPuLOndsrlE4PBTr1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Vbwso10/9Fs0biCiFU5MQMyn5OcCGf5SyAtVjqEYGkvoMN4XQkwJD7Fb1t2quMvyK3qo4V1Sw9O7FkxxI9zjO3heZEdV5RRt2JKGw30c/DgsaM0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2017 12:00:04.2742 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d25b0a3-c376-41a5-4ec5-08d51b9fee95 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3462 Subject: [dpdk-dev] [PATCH v4 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 12:00:10 -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 3dbc337..c0ad748 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 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