From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0060.outbound.protection.outlook.com [104.47.42.60]) by dpdk.org (Postfix) with ESMTP id 74E9A1B926 for ; Wed, 25 Oct 2017 14:00:05 +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=ye0eVzYokuz9tRbe5HC078eE9AsRyJk8ooja+FHHLp4=; b=IBEXJMua+eo1+CvBCz73px3yUs+2QOXOimt/3WPE6DcdyksqiVPOs0hYkl++U6Mba6awd1+cyHMOYszMQs9IeI0+C2ZWeIMxOJ0nFYtl6VVG+d879moXU5d9fn1q+jqbmCS0+2ncwy4PZmT8ILDn8cg02zIVXnaew7T4aJkLKJ4= 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 11:59:55 +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 17:29:10 +0530 Message-Id: <1508932752-22964-5-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: 34eddaee-b8c3-47c8-0fcf-08d51b9fe989 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:h0fYLlAgp9zyuMvJ+Vvzuz+PSw1Z25+VXeuEdla0V7w67a/jXN3D+OP3Ox6boaCulksiedMATd5cnxUSPJPaCz28D4fO8Hh8KzA0tvjoEUuWKb8kuDufGTMiGl7p7GEaNx0tMVy4i8tDCL86Hr2CuPgEqfdfW6EtJjxREDtQM5puJK8KBLXhACsyX4XMIPfInIts6I5gg5kOvC8wa23jyanVQdCS8zQAmS7M74PjMmVQwpCUwNeJ1lF5Pr2NP6wf; 25:W0t1YBPbJwnYn8kqpv7mYkRxBfyky0MSyfguF5RZcrXK9ZVB88Sse9yJ8M5QaDX+XG/jHberZHKqE6gngMv/izqg6NvIxf7WF0V5YaY+F2hD858g9w7IUrYIpQM8I5iqxywx5ZWYF5QO7P+akRUGGwbDL5V7+1eI++VJmIWMYuX9cSrPTrB3wOlw5EuPjgcivhHVc0Ci5d290rRDmWncjrC4wwjaHGjRQZFW2ZPX3kwKYQGHw3x8pmaZq9ou2tKVILASIVpjWa3mkWFBAmYdOpjl5x0lLZgwic25SiQRmXtNxrFAnO9hDqU99b+Hz5VTpoztNFZWSGm2D8HujDmzBA==; 31:wl69n8jXEgeZKG/mQUmYNtHqEqjT3Tt6Q+vNCzi/IC2lFwFt+mPbzF/ny5W/efgj4gu4MoRqkfHkz2fogZSuUZyR8Bd+QnAs+GvHAT/LivKzNIKl+ome2vVYM1IvXM3V0cv7+/o59jjeC7Q/81cyz7Rqw2ALmgQsU5lYiO84zSVde3K/vCRkv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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)(7110500001)(5009440100003)(48376002)(189998001)(16526018)(6506006)(2906002)(6666003)(6486002)(5660300001)(6116002)(50466002)(10710500007)(76176999)(101416001)(316002)(16586007)(2950100002)(81156014)(25786009)(50986999)(53416004)(36756003)(478600001)(105586002)(2420400007)(69596002)(3846002)(66066001)(33646002)(15650500001)(47776003)(6306002)(53376002)(53936002)(966005)(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:iBAnw0JlBJP5n9ew4wcp4iOWms7229j0C+OKz/LFS?= =?us-ascii?Q?yz+brSXP+ezw1I1RrXgCIG/MZMYaryZHc/xyeFLQfXRN9y4oiZIlZTfyD0n8?= =?us-ascii?Q?ZYxiuYbnYN5s75qtJUuRi76rPXgM0PG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ph9emOnQ75mK79MCOI7HfXWC/JPhBwyBYhW5U=; 7:doM/FGr5kP8PpmXdl8vmxsIsVYyKE6mVHUSxWyOzlAYJmymVO9hJ7lgJxO0zV+JkGPbhc7Dgufdhh8tTnaxunnPFyrtQ83PMTxAGFCFf50Ic2kUGm9s9dgq2kL3NImhy7Fhrpq5ZCyYxKP1SwzepWr/Mj1P659hH55hjmjm1FZ2FvEye9KLto8pa76wCs/VT65JGhHK9v2zPGaDwyQWdWlYRWtLwdp/1RmR/Xbi9liQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2017 11:59:55.8054 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34eddaee-b8c3-47c8-0fcf-08d51b9fe989 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 5/7] examples/eventdev: update sample app to use service 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:06 -0000 Update the sample app eventdev_pipeline_sw_pmd to use service run iter for event scheduling in case of sw eventdev. Signed-off-by: Pavan Nikhilesh --- v4 changes: - rebase patchset on top of http://dpdk.org/dev/patchwork/patch/30732/ for controlled event scheduling in case event_sw examples/eventdev_pipeline_sw_pmd/main.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/eventdev_pipeline_sw_pmd/main.c b/examples/eventdev_pipeline_sw_pmd/main.c index 2e6787b..f77744b 100644 --- a/examples/eventdev_pipeline_sw_pmd/main.c +++ b/examples/eventdev_pipeline_sw_pmd/main.c @@ -46,6 +46,7 @@ #include #include #include +#include #define MAX_NUM_STAGES 8 #define BATCH_SIZE 16 @@ -76,6 +77,7 @@ struct fastpath_data { uint32_t rx_lock; uint32_t tx_lock; uint32_t sched_lock; + uint32_t evdev_service_id; bool rx_single; bool tx_single; bool sched_single; @@ -233,7 +235,7 @@ producer(void) } static inline void -schedule_devices(uint8_t dev_id, unsigned int lcore_id) +schedule_devices(unsigned int lcore_id) { if (fdata->rx_core[lcore_id] && (fdata->rx_single || rte_atomic32_cmpset(&(fdata->rx_lock), 0, 1))) { @@ -243,7 +245,7 @@ schedule_devices(uint8_t dev_id, unsigned int lcore_id) if (fdata->sched_core[lcore_id] && (fdata->sched_single || rte_atomic32_cmpset(&(fdata->sched_lock), 0, 1))) { - rte_event_schedule(dev_id); + rte_service_run_iter_on_app_lcore(fdata->evdev_service_id); if (cdata.dump_dev_signal) { rte_event_dev_dump(0, stdout); cdata.dump_dev_signal = 0; @@ -294,7 +296,7 @@ worker(void *arg) while (!fdata->done) { uint16_t i; - schedule_devices(dev_id, lcore_id); + schedule_devices(lcore_id); if (!fdata->worker_core[lcore_id]) { rte_pause(); @@ -839,6 +841,14 @@ setup_eventdev(struct prod_data *prod_data, *cons_data = (struct cons_data){.dev_id = dev_id, .port_id = i }; + ret = rte_event_dev_service_id_get(dev_id, + &fdata->evdev_service_id); + if (ret != -ESRCH && ret != 0 ) { + printf("Error getting the service ID for sw eventdev\n"); + return -1; + } + rte_service_runstate_set(fdata->evdev_service_id, 1); + rte_service_set_runstate_mapped_check(fdata->evdev_service_id, 0); if (rte_event_dev_start(dev_id) < 0) { printf("Error starting eventdev\n"); return -1; -- 2.7.4