From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0085.outbound.protection.outlook.com [104.47.42.85]) by dpdk.org (Postfix) with ESMTP id 835C01B9D5 for ; Wed, 25 Oct 2017 16:51:14 +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=DuQrvO+CUb/459zhMM3T3rRKliylOiI6UV/7zDH3jCM=; b=XXZZwoZBycYFNM3yU7q8Ll3PvG3U9o1D9mZJpeDlEjxUm8/aXAfDMej/fAjFJrJEMTrWpCf5QoJcYWT5Kl6mCVQuMexsioqTISpvWxPMoWw5UYbSqbqk/a6UQARel6X9noGmZ5RuAZ5DgPjIK3MlOojhdkgJQs4Jd2G2yYwlIFU= 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:10 +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:31 +0530 Message-Id: <1508943033-15574-5-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: e0d80289-877f-4979-ca82-08d51bb7d5f3 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:GghhLmfvbvAjZiC9DPTAyO/Ioi6chCYIZ2o6uS9iHkHPvC/l+z+S0VOaBSZnMskauF0wbRAyph/z0Vu/vD+/ClYGkHDI0I9sfUsJlCaGWXuAzE+IzSVcKO9QIghesw/1KiKGQgL1nHL5U2SUiltLqva0f9jJBmMycAAg3XF24EoHMCP8yvEBtDgKS227GpjGr+Vlr3gennoWorrzna9UJ7drUYYbSlPyhbzRvIAdxqxY6mC0/CYw7FQrtZPhieyE; 25:UVbjYpf9JLJB1FqJieGUZEPXe22yVRn7EyIKe1CwxhGRTr64L4pN8XF7JiAlmWtn0Y/rN0BdVLzvM904gutk4dwYQv8FNqks5sv4Kbq2wWN4v1EfaKEt3hKqnR/dYWvfW2f5Sk58z+SAub9u214ff0OaWEuQRSxolvSlMUE0heeT4BegraG2mC2iT4a2+kYkUGHIJlmqHcrnpEIfNJOCEsqTyyZ0iU18BTkeR48F5OdBszu9ZymQMDTVcBi8afhdI2EXVuI9/53674AchUNJKdNZggZEliXog0dzwrqwJt6SS9F0UDmJyNtEYE0ZiVpZMtwfUn8DdDDJKJP5Cgb+1Q==; 31:2vXzmzmFQR81RKSyYXHxDEOOz7oQYfqjzPDmtIyUFxjxWZXNZ/pIguPsrSV5C61Y+k0by06QPXCQRV9O/VArPUSJTcc2Cvyzv/UkXA8AfaPfLMSLL5QXuM+fMB0VGDBITVPQXWvPemw+VsMUdpeNqHvpq+6gYciKy9HCyZ4LMp2FfWNiktfW9uwvY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959029699); 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)(979002)(6009001)(376002)(346002)(189002)(199003)(81166006)(53936002)(7736002)(10710500007)(50986999)(16526018)(50226002)(76176999)(4326008)(305945005)(66066001)(5003940100001)(8936002)(2906002)(25786009)(101416001)(42882006)(6666003)(107886003)(6512007)(8676002)(5660300001)(2950100002)(68736007)(7110500001)(81156014)(6306002)(47776003)(53376002)(50466002)(36756003)(5009440100003)(316002)(16586007)(33646002)(48376002)(105586002)(106356001)(2420400007)(53416004)(189998001)(6116002)(15650500001)(6506006)(97736004)(478600001)(3846002)(6486002)(72206003)(69596002)(966005)(8656006)(42262002)(969003)(989001)(999001)(1009001)(1019001); 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:AQAPpQe4dRYQdfJzXgudnDyGToxX7ykkF2M3LmV7N?= =?us-ascii?Q?QVkRqAnW5WdVdFOj7/Bku6fOd/xivheaMf50Kk7Kbx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t/RReHyOzhULgMoFpz6FKMM22JFGELvu4uynwYA1TdCZZZC/JpxCk+ECPPZABzUMQQ1VXAgHSWRSdEhixVUww==; 24:0z0Z+apgNMlfSP/90OUJHisLVrs1WIULksqN+TERAuie25Q0VUl5FwdG7EN8+BmaOWO1Dpc6B518SZ5HOlQsq0s6ziqehuPLq6ZrDevLUzQ=; 7:r5Ot1ImcI4QATwTJrF33oJszOKCccPk0jzuf3lfwbsJCUmSTXBtuON79xRhXIm1FDE27Ko3h+7vveaKdp1wrpxFTmr9YKK08GKo/umgQwAh0eaMCB5n0iJ5pg3+SfI8lZBtROc9yx68z1YNfxQ8G3fivZuVnCFCIC4+320NFY02PxXFEP0Vyg58YA7GlfST7TtX0R9Owa4AoENYU1b578U/NpHsDMM5fn0zO/yqTnqo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2017 14:51:10.6839 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0d80289-877f-4979-ca82-08d51bb7d5f3 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 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 14:51:15 -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 Acked-by: Harry van Haaren --- v5 changes: - fix minor checkpatch issue 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..948be67 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