From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0044.outbound.protection.outlook.com [104.47.34.44]) by dpdk.org (Postfix) with ESMTP id 98AA31AF03 for ; Tue, 12 Dec 2017 20:28:27 +0100 (CET) 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=jJqi5HyD975L2eJMNlhCbJoKKv2afkk5YxOAlYo8qeg=; b=PWNgwLobPTR/YdiDnMevPgpkb6I/OrsU0/l0zDugv0nYpdAjUl1zyKbXE7hdXK/7Bzoa8IGkFYwqFOT8dUYSkVp7dkx/B4g+ZCf5HYtd79bH6cGgkz6tnmb5X1eHuI4nbBTpzQIv/dKxEskhaTi5gs+Ll3y7E8YlVE6bYh/0bUk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Tue, 12 Dec 2017 19:28:23 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, liang.j.ma@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 13 Dec 2017 00:57:11 +0530 Message-Id: <20171212192713.17620-5-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: HK2PR04CA0045.apcprd04.prod.outlook.com (10.170.154.13) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed68c692-5f19-4915-4e7d-08d541968433 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:pguGvVdJJoBRgmMJLzlOVL1LEihGp+u+haJ5rl5nnNzHk+LJrutToSMlzpBlYEO2+QEQXp39HGcd0gY+fNfyDheW4NmvxRdaaXOHxv+dlwymY5lBDG+mCpGd7oBEgv8GMcD9tu99DXfDN9waU+xRYbLizsnNJm8KpgwNBvtA4hTo4e2NIEspd8VylPyGRz45s0KjKnbwEAcWhBPixS2jjiOQ/Db26cg1uGQRTV9yZ1lHfm64pCVpzFPbyerMozLr; 25:vQKwA9uv4QGHAE0pAina+ejLfqtEO1ARSNfWB7jRjq6BFhjgyo7ljo6fqJqX3GGtOq55aMlqoAm5yASrQpINgfCO7SQ9LY7YwmijKDrQa2RIZPwoOEvIeE7tcOMmVVYt7XEKPoswOvST7FHBxDi7insVS3ah+xZqzN89DSopt2hd4pcX4c9IexTFt2D8Uh4KR8LyVW0rABNzgzWYkfrdWBY6USylxV5Khs9ULs33P6b29xWz94wIYM6xoN6mWlMji9WmEWim4wNBdwvEjEYG6AprJgcbuXAFaxm822po99c/TJ4C3fzi/+0y1yX9YehlVewulEPe6xCflhr3roHWEw==; 31:ygujcDqUvZVibL47F8fQ7rf+9qfj2mDlLUwrY+JXoBA/oAXw2FdLVAbZxsteRnaHhXyC5kpMx1NYrvRq7w/sCYp6AFhsRqLU1w2ylZDfGnlxVLRSzMVLiR2vh1gFpFgg3YRAVcMnkuD1pY9jOem5fIkZgozPilmcCtrkBYMImBdRLFS/iqRe++315nh6HMas/8Omyk+17vZntZGWoo7GVwCFxX1M+G4JI829Kzte9Jc= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:KBzpitVlM/OkA9AYroQXLFlellfybI7ZNo023j2CrUI5KG6S+AGWauhnkkkOY1Ok9cDc2z80YWwdeVJ8Q/ZAG2x8hc9L8proZZJj+zXEkipPy7P1ch6XygIeI7+Dh9TRfIwbPkbCGsQDTh5GeeEUI2+jLRBJMujdjbxbbQ4EAXgxQEn6fRwQA2IeZcbP0dLC1ZT3eoQ0wsqMNUFO0y0tDinSzq9/0riythb/nEQRTi7d1NHxb4LCnmAidZkKhVJ+V6XCHas1BoEOTgkFwF9pxUNZvJAf3SZewnzQR5+f/LDvICB+r0RNP+nyeba1yJmuSJMhp5glWxyGAH6WsXHVuoPeOQSjZUJM8p1p4Yl8cKRy1hrvJ34bxCdM9QG0yCG3qIT5s956e+F2A1O774GsAy4RqvyLBf+jFSQVuRtrwVw58h6+zN7NSrFBqQ1U0e3QedM1YSUIOqmxFkbyi0dnWdt2/0Ql1vPIeGpYinaah64VmEn1/q05u3Gi1DBXzVYkqlEP4Jzu7G65lzqEA0Z4JwVSwAJ4UycE5CSJd3s9J5yytouub0tYnYyavqcHqb5teQRKSG0oUtpU6V6nBEcoR/f/Y/PSr7sgdK5Yhv6Pmfw=; 4:wmS1zjV8WTvtLtux2Z95baWhFxYnrpEKVAGFTkG45Dv8yT4F4yTDZ4smvR/EPGgjfNPWcfT/KgGjECvFHrtTQZgmtjVu9tLhs0Rct+m6VE1bzZrkR2lk25Se7z4mRoqXaOYwpNiemkDI61UPVx/EJ4sm0dKL9hQbwvFtkL5ynPnmFc2SY/Oh26wuYMDAnnAMA71tdcYjth3guy42eK+pSbKy53W7HCIsPasCzrW4GisFVZcC9CIGD8pDKIM82iZCWLdw7swQVBZ/2zFKd+NM7Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3231023)(3002001)(6041248)(20161123560025)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 051900244E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(346002)(366004)(376002)(189003)(199004)(66066001)(4326008)(5660300001)(6486002)(316002)(16526018)(36756003)(50466002)(25786009)(72206003)(47776003)(478600001)(68736007)(8676002)(305945005)(81166006)(6506007)(386003)(81156014)(16586007)(48376002)(50226002)(6116002)(3846002)(7736002)(5009440100003)(53936002)(106356001)(1076002)(97736004)(42882006)(76176011)(6666003)(2906002)(107886003)(6512007)(2950100002)(8656006)(52116002)(51416003)(8936002)(105586002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:localhost.localdomain; 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; CY4PR07MB3464; 23:RgeYwMTUYOOzzhj/f6Adyl/x02J2Ww7SZmjbR36XG?= =?us-ascii?Q?ns0elNAjSzZkzapFtKyatS5ow9MHYtkXcYk3T4nCDwCMll/pWZ/f/6srQ8Sr?= =?us-ascii?Q?GRGoivJJRFUk633Ahp6hu1umjR3En6FO8JY8fnW+9qtDMXomc89hx9N3dPIO?= =?us-ascii?Q?ouWg+5gkEiG2LfblEqQO1w2vt/GN91Ggwn9uUI78ckzfyt4aiecqlvJSOlW3?= =?us-ascii?Q?PAVPnPAj1beTKQsfXqDpaJgtwOCXX5sLEz45K1xzfQbt3sQzyu2G6EJeJtqu?= =?us-ascii?Q?ctt4WoY4IK9STfIn7uZNNE2oGPHlTcLR+q1Sv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3464; 6:tnObM1IvTSF0kvKUxDS2DJRAMojBcYTXqzuw1L9vY+tAw76sJlJGpqFniFrD0/oyY4w8TXF3s2EFYdWPutpbZWW+YX52ut5omdYWxudKqYsyuPh6GpuzwKaNxCT2qRyq/Lu/las1ojl39aUzu37BKzf5CeGLJFgwzBJklsbDC1QkOk5bULvFlz6T+hfy9Z2KtXT4y1Yz686RlJKdXBI8gUX4/s3pZsZ8wt7A8rB6HhOcHh2HSvEOmZUxKmkmFlXdif8ulk+cNCn8P1RdZACkaPLlN1URUC3ngsUY8lnfFtG9DKuoYg//XJQLCM/41cqaNpX+/ABmVURFsKPhUplYS8gErfIfh6t/ahBINs0XG2A=; 5:CH6kZzQJQRkfn4DPRvjdS5d2Q62L4YTc9rLDlVC8shA7Oq/fncp7dejJ0mChCTN8EMCJ1tvML86IrADdrhXmQQV9FDgnSScwnVAYuC7b4rSKkRaYGNpMPexER07IXKCjZvYqd1ynAW259+x/vPAFDn0kkUXa4+Ebqla9heNc2YI=; 24:+Y2cIMyP4xfu2ohMMAdQ5EQjUKggu4lJy42EH0JG6eKo3JCE7Km1BahTPYA1xqcNv4R4FEKyzfHNhmw6VlKtFYRX72Wl8cndmfSYhRnIDy4=; 7:5MTjiKqg9h4AqVQDtcXhWnJEWHHvPTJpmjaiIkHYT9auTZdkpkrFHc/kUu/ahmT2RdPCuQEbh9AGdl0aUjGaYlZv3dQo3mrf2W1hnmpr7je+VoXctMpIndh0XdsVuN3SnnPjEkgbsWl5GlIrsPk4OVv//xYw0n7GI9r75PV4hRUbWojCI2j8WQdT7fifWHvxnMoIRSsNTC0otMWe4WrupBvO7287O/npReCTaRgq5YLW+hcbnVKNPxPVC8svOnux SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 19:28:23.0847 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed68c692-5f19-4915-4e7d-08d541968433 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH 5/7] event/sw: modify eventdev sw test 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: Tue, 12 Dec 2017 19:28:28 -0000 Modify test_eventdev_sw to be standalone selftest independent of test framework. Signed-off-by: Pavan Nikhilesh --- drivers/event/sw/selftest_sw.c | 71 +++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/drivers/event/sw/selftest_sw.c b/drivers/event/sw/selftest_sw.c index 96ed920cc..b97175f5b 100644 --- a/drivers/event/sw/selftest_sw.c +++ b/drivers/event/sw/selftest_sw.c @@ -52,7 +52,7 @@ #include #include -#include "test.h" +#include "sw_evdev.h" #define MAX_PORTS 16 #define MAX_QIDS 16 @@ -3038,7 +3038,7 @@ worker_loopback(struct test *t) static struct rte_mempool *eventdev_func_mempool; -static int +void test_sw_eventdev(void) { struct test *t = malloc(sizeof(struct test)); @@ -3049,25 +3049,25 @@ test_sw_eventdev(void) */ release_ev.op = RTE_EVENT_OP_RELEASE; - const char *eventdev_name = "event_sw0"; + const char *eventdev_name = "event_sw"; evdev = rte_event_dev_get_dev_id(eventdev_name); if (evdev < 0) { printf("%d: Eventdev %s not found - creating.\n", __LINE__, eventdev_name); if (rte_vdev_init(eventdev_name, NULL) < 0) { printf("Error creating eventdev\n"); - return -1; + goto test_fail; } evdev = rte_event_dev_get_dev_id(eventdev_name); if (evdev < 0) { printf("Error finding newly created eventdev\n"); - return -1; + goto test_fail; } } if (rte_event_dev_service_id_get(evdev, &t->service_id) < 0) { printf("Failed to get service ID for software event dev\n"); - return -1; + goto test_fail; } rte_service_runstate_set(t->service_id, 1); @@ -3084,7 +3084,7 @@ test_sw_eventdev(void) rte_socket_id()); if (!eventdev_func_mempool) { printf("ERROR creating mempool\n"); - return -1; + goto test_fail; } } t->mbuf_pool = eventdev_func_mempool; @@ -3092,153 +3092,153 @@ test_sw_eventdev(void) ret = test_single_directed_packet(t); if (ret != 0) { printf("ERROR - Single Directed Packet test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Directed Forward Credit test...\n"); ret = test_directed_forward_credits(t); if (ret != 0) { printf("ERROR - Directed Forward Credit test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Single Load Balanced Packet test...\n"); ret = single_packet(t); if (ret != 0) { printf("ERROR - Single Packet test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Unordered Basic test...\n"); ret = unordered_basic(t); if (ret != 0) { printf("ERROR - Unordered Basic test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Ordered Basic test...\n"); ret = ordered_basic(t); if (ret != 0) { printf("ERROR - Ordered Basic test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Burst Packets test...\n"); ret = burst_packets(t); if (ret != 0) { printf("ERROR - Burst Packets test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Load Balancing test...\n"); ret = load_balancing(t); if (ret != 0) { printf("ERROR - Load Balancing test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Directed test...\n"); ret = test_priority_directed(t); if (ret != 0) { printf("ERROR - Prioritized Directed test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Atomic test...\n"); ret = test_priority_atomic(t); if (ret != 0) { printf("ERROR - Prioritized Atomic test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Ordered test...\n"); ret = test_priority_ordered(t); if (ret != 0) { printf("ERROR - Prioritized Ordered test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Unordered test...\n"); ret = test_priority_unordered(t); if (ret != 0) { printf("ERROR - Prioritized Unordered test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Invalid QID test...\n"); ret = invalid_qid(t); if (ret != 0) { printf("ERROR - Invalid QID test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Load Balancing History test...\n"); ret = load_balancing_history(t); if (ret != 0) { printf("ERROR - Load Balancing History test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Inflight Count test...\n"); ret = inflight_counts(t); if (ret != 0) { printf("ERROR - Inflight Count test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Abuse Inflights test...\n"); ret = abuse_inflights(t); if (ret != 0) { printf("ERROR - Abuse Inflights test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats test...\n"); ret = xstats_tests(t); if (ret != 0) { printf("ERROR - XStats test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats ID Reset test...\n"); ret = xstats_id_reset_tests(t); if (ret != 0) { printf("ERROR - XStats ID Reset test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats Brute Force test...\n"); ret = xstats_brute_force(t); if (ret != 0) { printf("ERROR - XStats Brute Force test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats ID Abuse test...\n"); ret = xstats_id_abuse_tests(t); if (ret != 0) { printf("ERROR - XStats ID Abuse test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running QID Priority test...\n"); ret = qid_priorities(t); if (ret != 0) { printf("ERROR - QID Priority test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Ordered Reconfigure test...\n"); ret = ordered_reconfigure(t); if (ret != 0) { printf("ERROR - Ordered Reconfigure test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Port LB Single Reconfig test...\n"); ret = port_single_lb_reconfig(t); if (ret != 0) { printf("ERROR - Port LB Single Reconfig test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Port Reconfig Credits test...\n"); ret = port_reconfig_credits(t); if (ret != 0) { printf("ERROR - Port Reconfig Credits Reset test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Head-of-line-blocking test...\n"); ret = holb(t); if (ret != 0) { printf("ERROR - Head-of-line-blocking test FAILED.\n"); - return ret; + goto test_fail; } if (rte_lcore_count() >= 3) { printf("*** Running Worker loopback test...\n"); ret = worker_loopback(t); if (ret != 0) { printf("ERROR - Worker loopback test FAILED.\n"); - return ret; + goto test_fail; } } else { printf("### Not enough cores for worker loopback test.\n"); @@ -3250,7 +3250,8 @@ test_sw_eventdev(void) */ free(t); - return 0; + printf("SW Eventdev Selftest Successful.\n"); + return; +test_fail: + printf("SW Eventdev Selftest Failed.\n"); } - -REGISTER_TEST_COMMAND(eventdev_sw_autotest, test_sw_eventdev); -- 2.14.1