From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0048.outbound.protection.outlook.com [104.47.42.48]) by dpdk.org (Postfix) with ESMTP id 473231B212 for ; Wed, 11 Oct 2017 11:11: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=m7/gG5y1aqT2o7MqLSmDPpquvCqywJ34avq7GYwVVh4=; b=c8ydY3Uqyhy5Cr7NscHuO+H1nHm8syxmv+GwrFPDUzbhnznvWBMMhAP9VN5rhYN3CFLPDMLWgxcMNJtTNeFpF/Y1KRw0H0PMIy86VI0mF8Ugo//l93DHP6ToO6rPoxDIWvRmoMsHvCrby3tHBnDaIh84kZHb5eq6KIT+nr9hsnI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3457.namprd07.prod.outlook.com (10.161.153.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 09:11:00 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, santosh.shukla@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 11 Oct 2017 14:39:49 +0530 Message-Id: <1507712990-13064-7-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0014.INDPRD01.PROD.OUTLOOK.COM (10.174.214.152) To BN6PR07MB3457.namprd07.prod.outlook.com (10.161.153.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d02563e-8da1-4dc1-4ee6-08d51087febc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR07MB3457; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 3:3CHXGccCuv1ydsc79zusKHMpFeLYpwq8HUYRN979rEUtkAfPA+fjc2Z6pGHC0sTHL4p2f+zh4vGLo/n9DWZXIBJihPeTOHw5bIzOGefjyJmINYO1bGK3oIdMzXbwauHHB0yD+dxD2sMrAUFzza4OMzG0eml4OSZUeYYNWNxxBowjLr5Bt7bJe2RSswJEy48Ca6BHotkSocZBb5bcRs4bGjPjW1AsbnnAr6QC/dgOvNo+yBhxcMUULR5OjtADzAbR; 25:i3fWnvnHEHCj1XStruKUM2bRv0Pum9gyfps8ZXPUfJsRUoYfPZknkI4wfTLsyhF4RF8Ad91sogh+krCaD46L1NL3/zP3A+bSVAZP2Jh42VUMlap6ZheH3GK2i+FMGGdo+1VeiJuB+6x/46TNa4qbjYFn25bo+/Su6Sthj4sHzsJdixzgILlEFdRPmg4S2043Gj32sXZVAfQNHzulZcCHtlpfWJu9jHb8o9L8cddjwlI8M5yfLwmjiY2PtqGiwQA++Ovn7Cu335i8T6tHIhetBbYjdyM/m6Pi2Yd2BT1JqS43YiLN1iXeelgi0hx/VMtTKYMLvjqVNc46hXtP1psAqg==; 31:E1gG7TGZOcKbdpfRyKaekkQzMX6kWRLWuIPGumisSwQexgNmKR4brGYcbcQMD1QiTn1YSIwlE86njaIzDxIK1KGijZ+2j5lwuv1xe0KAM3trPc/iX31cKFdMvlMl+XbVvPoKqyLDn+JdNkAYB0H2LNG12gg+ut6vNiKdHo6uSPA4Es0kBiIvI2oVl3u3M4Ws0BbPsaJk2Aj9VFs8YlY1YWBmuUtxthONECUU9ZaifkE= X-MS-TrafficTypeDiagnostic: BN6PR07MB3457: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 20:izFJVTG0zrA1fFv5NwHfTbzS37J9gABmAQWnf/JkKg3hrvbz2Z50mIvvGm0uzgRNg9xJldZpTWoyC/z/26HruvYy0Yohg7OGRydaW1vODXIJ8lBy3IzhUTH/vL9K8gcfRNUI0+P4gNa+aKLo0uHz7l5caD2kUNOU00+5kb1XsX2Z6m23YzgHk1N4W7qwwFPTLWj9wjxbJeBTS0B7IlTPbVYJTCN5vDEtfDtpGlnxzsR8EX2gYlyod20uSruD0cjYrXVAKQevxvr7i4YplW0ey82SKcAF4aM319UI99Rg1Dob4bwGGbpzwkxQrUFmI6n8fCKLXQsJXmJSGtau3RNYvbKRWa6gVFZFshwNRjWiys1vuAoaoldE5rDLuUp0Qk0WWt6wZBHGxyHcvaYj5ue+4+WcuMekemzPTFaq8k72ZkByYvOLbdEWEUW+5DDG111Qr5zlHNRVGrSWgc1rYs4Rp29zpkrOdWgzkjuFWMPbOrNGrbZSet5CWsJRaxqva3B5/ymStT4EMsBW/9INOxQULaxc0J6SJWvs/t81MupJtyNHkUMG/DUlsnV2TNHxfYgheGl8C2EAi247Sbgf/05tMGwBHI3BuXGy2t3Su054bTY=; 4:PLR9a/Twok8IObq7E4Qfs/8C0gfpUzCwSoZPFVShOtt3UnI7swrmtRxl2etZZSERVGdrSzVFgeY9FUwTyJhKQQ4aiLqNqQBl6mwjCkizyQPAzOc0D9pDfDfhHggHJ6SXcg5dnCNF+IDLTLhM2DakpaEpFPs/X4CDqMcdkkvww8zwpc2Bd1l0dd/yz42vQmPgxobi4Nth+s6n1YrYSmI/BxUoZfqoFXvj3o37PFB3Q0Vy3ayJESRUHktMPANf1FZwgakENv1n6ORulnQokf14CC2hYSSocQAbalwljkMsR68= 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)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3457; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3457; X-Forefront-PRVS: 0457F11EAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(2906002)(50986999)(6116002)(68736007)(5009440100003)(6506006)(6486002)(76176999)(3846002)(4326008)(72206003)(33646002)(478600001)(16586007)(575784001)(189998001)(316002)(48376002)(16526018)(6636002)(25786009)(6666003)(105586002)(5660300001)(50466002)(66066001)(42882006)(36756003)(47776003)(53416004)(97736004)(53936002)(5003940100001)(8936002)(81166006)(101416001)(106356001)(50226002)(81156014)(107886003)(6512007)(8656003)(8676002)(305945005)(7736002)(69596002)(2950100002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3457; 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; BN6PR07MB3457; 23:fwxNCrEuu4pUNe1eWVWnG76RvKHpy1YThb+jFk2eL?= =?us-ascii?Q?njWbxtBM7I0eF4Z5qiUFK06G4jgiKeeLmpc8LC3DD1efpdQIxTDdOamQ2Sw+?= =?us-ascii?Q?/uQALUBkjBMu8hJbrK8aFGkNZYYFPSqFWWbTjfuDNLdUK4RlC5FQtgTn80sz?= =?us-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rAWUtlftw6Xu6Q2koeqkurZOM9Q8A5hPRggv9o5GJ6hZObktmSMMSgTPHSGhZs0R7SCAiCA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2017 09:11:00.1144 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3457 Subject: [dpdk-dev] [PATCH 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, 11 Oct 2017 09:11:04 -0000 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