From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0069.outbound.protection.outlook.com [104.47.37.69]) by dpdk.org (Postfix) with ESMTP id DAF75A48F for ; Thu, 11 Jan 2018 11:24:04 +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=B6USIU3ivXmYB/ssabWTWTPkrKyZWSTIBPgFD9ZcsF0=; b=gOqA4ww+dVq2l1AOUV02LzmK9eipjx7Uuh7QIyD4L/u8tBMJvZz0vFqUg8iTpsGXwatTIHQdsgFAZeoC+lBIr0Kdxe+LIatnhsAkiro5kn4SxWAT6W2yOq4bE4SiLdJbhnfDL++N+wrk5/yIW/KfjyNdDMyKQDWtC3Czkh0Jop4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (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.386.5; Thu, 11 Jan 2018 10:24:00 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, gage.eads@intel.com, liang.j.ma@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 11 Jan 2018 15:51:53 +0530 Message-Id: <20180111102156.12726-8-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180111102156.12726-1-pbhagavatula@caviumnetworks.com> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20180111102156.12726-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR2001CA0023.namprd20.prod.outlook.com (10.172.58.161) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a7629a5-5b51-4db7-be56-08d558dd6ff8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:2JiCzl2TNUJremsG01j/E3xoGNziBbbuGV4XDNYPekPDzyxZ8DQ328X7S6Rf4AvgQzR93xpjM0obcq3EUkcTjCNibgaYFFXrUWT8T41/gAkBi9MoYlXk9+MKazNsEfAfkBEVN/KEe7uFIAuDHKvD/T/PMkAnhG6jX0BczxVKVUGPT7oNnGABN+PbZdXGiD/cWf2SqmdxT1s7qwZltC07Qd1JxoU0i+ZWX8JK2GH83wEB6Bb9sc+GzntkHU0sWpE5; 25:iIiSV97LggAt78lyTENJFwW5Qg+yQ8QXCWCYeHEecAwHUyQBmyGM+TJxcshBh6XN/Zfp2UDBoGjxlB5WlOU2dAiLCzStKCMr6rq2rdh3s5QQ/F5pZ6QA/qVK+D3kBGYAwOQUUMbOlETSx5odmdN35bi25QNDPipNzxNru4rN3M0uHNqOKGFZER0RtpqBOesZ5TzwD0yXBiMTuIacl1u4JF/LsdFVZMPQIASKgAweE5Mv1VNox5sdF3KDUFKbV/2z0pjd2t6Vbiqy3OJpryJ/MHESysMKPWOjFZAus71CxDfqsdSmGF1ARooTwVIpnG0WhgiTzQxLVKb88lOTdrrurg==; 31:qGnCsD9eKAYBwWg3o0p/emnoUhU5Bh68ffkTuPohSPFXi4LBCaYHiUL1HoQ1QZHhR7mwhp3Uw/uji+lgs34pXwRSS5sY/nbL06QZelf7c74OyBzhjcgMKZRlQ1BELyU/efyMdm33Gs3YYOfv/6SjZodZKV/OWYt9X6c6XV3SGTfcfFhrp3iNmmPg03bXum3bv5gLqrJ6tL2glvnV7JdpPrU31NLH9/+PrW8C5oxLHsA= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:bpSbhEiNP//bfV1aUuaYbbZbEfLAjkGsTux+IWtB0r4tWdE4dlyaquRTmOiABURmPygJJ0JMgx+6hx09wKxwKm2X+i524WwbFV1nmJQGYHZK0gLNL7zZndf6RHfYy/Y/CW0uMggrZkZ9Ea3VI0ooU9rakeRVvkYR9VmzzhvxltCl+Wdgko52SRhqbimIdBGxwXBdLuIlQ2eYSCAmzI/N838RIO8Wy1UShz9Dw0sF9B/VRg+91Mdv/QtIpj60bqjOE4ushhxshju5oqG9bKUMUw+q23cnBgqJnexmVbcmzbUHTzywUTyxFpc+IJ0eu/JG53A3haFa0iRWlg91R/uv7GJLAxnmONy5yqaU0VJhHM+ELDF8Z3k/C3CbidFjeeEStbNPBK4h5KEa713xaSCbW75I65qsZOUI4F9U4Oh6rpFczxosHL6gs0KMqht+e3UrnpeytqZGKjWRU5KV5bdE7YmHmG/k38NY/pI+AF+C998QyljbmfoA8WkZNj60ERiuh3IHMqehTFnz6/1Yi1gVougNmQki7ny/tq5RGjq6jfc5dgZcG1XUsXW1UCjn01ZCzvEx9ZB0pyIrO2eTJCEdB2VT0+4/vpR7RGZiJRyv7fY=; 4:a4D8hU+mGugdlpJYxbqEYPCyOaxZV1o5cApjQS0gZjPrU2NgRDtYwUruqwrX6+aGl1Qhmet1gyznYoB9BW1We6D52hFksfb30V9znwWKoMsg1C9Teq8h1mKCQRWt4G/X9JaTMQ3jf0npQo7PD3APo+0/Aqs5h3lAw/ned+NwemLkuItVjcSb9c4HmsZETUofmhUEDhmlpRPbkwtYXcNRZPam+k202B9rMlyBu2RSwGN9SQaJDLKUsYz/uDvneLCWhpb9Rdxzfq48RtlQqSbgXVqILfCNMXjFS1LdrB5CE3v7EmlFAnWYbKifIRFxchXP X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(3231023)(944501075)(10201501046)(3002001)(6041268)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 0549E6FD50 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(39380400002)(366004)(376002)(396003)(189003)(199004)(6116002)(2906002)(8676002)(6506007)(47776003)(97736004)(53936002)(5009440100003)(72206003)(1076002)(16526018)(53416004)(51416003)(66066001)(50226002)(16586007)(386003)(76176011)(25786009)(6486002)(316002)(69596002)(48376002)(42882006)(106356001)(52116002)(8936002)(6666003)(7736002)(6512007)(3846002)(81166006)(2950100002)(4326008)(478600001)(107886003)(5660300001)(81156014)(68736007)(105586002)(50466002)(305945005)(36756003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:Pavan-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; CY4PR07MB3464; 23:jHeX4azPs2Z7sH9pGVf6oMKxSgtjCgimVKY4vpH75?= =?us-ascii?Q?TpvEpX+pVfIbGxkm3WKRJRy21Jbi7txFU6Fc2DEUeT4ZgRhxzW44dXrUNP9l?= =?us-ascii?Q?XClMswKhfsgwOWQ8D1zhWy6oR/PrndBok9uDpLWtSOjm1UFw1PpnLQFwRInN?= =?us-ascii?Q?rkdwRy2CkJ+y1aac2euxOaLFHS5h3UCP1LxvxzMhAdfGudWnkNPNlnn5btXU?= =?us-ascii?Q?Xp02LBzzdeUqpCgjxFcjCtY7gB6vr7lA5bcTR451B33R7as+C38JKri/EWsX?= =?us-ascii?Q?68CWqJ306Sq+uS2THVsmdT23VAOgqVcctxqfbn+9dXcGa5RTzK1SRkfUG4ri?= =?us-ascii?Q?PFGAr+v6pd643FrOTazi0WxDpoLca80pda2Olc78d8HULHLsaSAfeawyENhQ?= =?us-ascii?Q?h6Xvhq1CJ4ulB8M2vDn3DJrkk2agDPMfPdbUny/Ne2ck4o6tzmPWdFeD60X0?= =?us-ascii?Q?P51w2bzrxkAx969dOMRIixV3ow1TDW16aDGfmTZ3qAur+YNpMZWs55JhE8AL?= =?us-ascii?Q?LpHs9MSCWHroYWTpVReYvHFB3LkfDypeEpwwSTpaHmyYB6YkQPWZgASI6YMG?= =?us-ascii?Q?VP0cC0e5Q4sot7gxoCSqPsLxpjsWKpySi/hiaPwlf1y6ibEm5OLU2fP+OvXP?= =?us-ascii?Q?Z5gn2ObsTuF9pgiEg+aYZBYclLsIJpk4upC+uHQBqWsexXKXofN+ld4Uj24i?= =?us-ascii?Q?vpragZdkSQMFVFY0HPxx+owxRdYGYTFMRUSjSI4T+vgIGj/XZ3v09OshzTZY?= =?us-ascii?Q?bAn9df0zSEe6dlImgmRO7tnyOvxcckOlPrBmGMxq3mjx/o2TURwZ94yATC3l?= =?us-ascii?Q?a1vEK4egaG4uWhkItcc5NnGSfDKB03LE85uNTXhe1nKNrUGYb8n7f4+cFltZ?= =?us-ascii?Q?pMozNQe/C2eNOhl01kZvQt+ywmTN2Y+bmS3yFcmwfhDqpzbBgHvw6hAB+9wE?= =?us-ascii?Q?I2K25qqNFIHlQRZiR0z5XAIt0zQi3AgVgMp/Np9LjAz/XvOADv13CxXPbrTU?= =?us-ascii?Q?JMSNeGTlG5rcdm162/n8cO5svZDt2J/IG/4u8ioQiha6khadn5K7AHBTT++e?= =?us-ascii?Q?IDNk0uHiNBYaVBv8ylDHSysu/27aJB8LOevHFiwhRuE/vr5ltwe0pWNBANZw?= =?us-ascii?Q?75on6UVB+7x5pn0zc5XZDTndv5/AJTGZ5Dwi2vrGk/8pknH2z5i/uBTalQNW?= =?us-ascii?Q?Wci75cHcNdE5pakq94QaaeTZ8521oAEQeno?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 6:wLG01+gpxyR8HZgxnmybtaRYGopIofnKevASxQgeApQUYCZXYMwIzUt0OOgn24tPq71sawC8uwx7/4yVd4/wcZX7gVvZJkM+NVENtwojwThw4FYe5d8bRZd7TOCssy9ZUWcaLLE2zb9DFBDLGI9re3ZdOHKlQDePYRBPT/mxENfgKw558V6W/z9t1OQJ7fiDeCG1tv1lO3fFBlPB5cGuNDMjZDsF/nx05UngSNtVIgucE2ywfZ3t63TRE7bwnEISq3gmYhYinYA8ornTJWqpBo1xRG//AXsjM/razApGUsG8H10SRbvRAWp41W7acVnxM8BPM0e1WZWLd2uinqNu8ZlzewVCRKn0ayZoOclhnuE=; 5:5gyrjXAoYeMuUKga6pmifHiRGLP/eVTPFaz2Or9EiHnuxEOmP5YDh0G5zYg70DdKApTMMsPmvTebJ03tUfiHAoMl5FAhA/wFFJkttQ5U6rBLSca0wKKfUnzquXLRBQP+OApLcmRdCZ5blSlOiTSEMQCUDS11AaPD7TMLaTwN8Os=; 24:gpEXgac+5guypgVZxUxfbtQHJO4XGg0k6m/nQZxmRwfjhOYrMHkygM4ss7JaJ3/vofpHt6deRqmMd8XSV+lE0B3ImyjISOlRQSibNmEAoLA=; 7:YeMNtlYvhqwG4SvT/fmwo7a8eaOEa7xe8pF3POMrya6daDERihZ6JYBYvb4rl3Ihf3bBkvWpNQXs44fAfhA0R26RUUQyC38sXXAOa1mbQBb2cRTnnRJF8lPi+EG7U6RTk26hPr9t6MrOnhVViaYFiIIqiLtzv/o8qE9fLOeiyGuPpHNwHlojiwKDYFQ3UNIlYRfKaRJFFio+A8biFWjcoVQGNCqw2Nwjt/eKP1x1bA6Pb7tBkkyZxxmVVlj4KId1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2018 10:24:00.5507 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a7629a5-5b51-4db7-be56-08d558dd6ff8 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 v5 08/11] event/sw: modify eventdev software 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: Thu, 11 Jan 2018 10:24:05 -0000 Modify test_eventdev_sw to be standalone selftest independent of test framework. Signed-off-by: Pavan Nikhilesh Acked-by: Harry van Haaren --- drivers/event/sw/sw_evdev_selftest.c | 70 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c index 4108b00bf..0e84b2003 100644 --- a/drivers/event/sw/sw_evdev_selftest.c +++ b/drivers/event/sw/sw_evdev_selftest.c @@ -52,7 +52,7 @@ #include #include -#include "test.h" +#include "sw_evdev.h" #define MAX_PORTS 16 #define MAX_QIDS 16 @@ -3042,7 +3042,7 @@ worker_loopback(struct test *t, uint8_t disable_implicit_release) static struct rte_mempool *eventdev_func_mempool; -static int +int test_sw_eventdev(void) { struct test *t = malloc(sizeof(struct test)); @@ -3053,25 +3053,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); @@ -3088,7 +3088,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; @@ -3096,146 +3096,146 @@ 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"); @@ -3249,7 +3249,7 @@ test_sw_eventdev(void) ret = worker_loopback(t, 1); if (ret != 0) { printf("ERROR - Worker loopback test FAILED.\n"); - return ret; + goto test_fail; } } else { printf("### Not enough cores for worker loopback tests.\n"); @@ -3262,7 +3262,9 @@ test_sw_eventdev(void) */ free(t); + printf("SW Eventdev Selftest Successful.\n"); return 0; +test_fail: + printf("SW Eventdev Selftest Failed.\n"); + return -1; } - -REGISTER_TEST_COMMAND(eventdev_sw_autotest, test_sw_eventdev); -- 2.15.1