From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0085.outbound.protection.outlook.com [104.47.1.85]) by dpdk.org (Postfix) with ESMTP id 88B491B6A1 for ; Tue, 6 Feb 2018 07:29:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=N4JxEaHx4WiCUnT+q+lejwN3GL5LD9id01dWXqjuAL0=; b=hOviCU7e4OzPui+RluTouSnfXw4vNXNb6FbliN/wj7vHPh4hrMTOYthv4N/pRtOSbCzG59sshtL5yD0q9L/zFa5JNecB8UTPywxDDdIY0n0c37PPgIVukPCQ1rzj1tStUEPWzJXgwD5oAKFf2PdboTLq6+1cZT0WwKsj3DyprCc= Received: from Tophie.ap.freescale.net (192.88.169.1) by VI1PR0401MB2464.eurprd04.prod.outlook.com (2603:10a6:800:55::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Tue, 6 Feb 2018 06:29:08 +0000 From: Shreyansh Jain To: thomas@monjalon.net Cc: dev@dpdk.org, Shreyansh Jain Date: Tue, 6 Feb 2018 12:13:38 +0530 Message-Id: <20180206064338.29838-1-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180205113108.19340-1-shreyansh.jain@nxp.com> References: <20180205113108.19340-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: OSBPR01CA0010.jpnprd01.prod.outlook.com (2603:1096:603::22) To VI1PR0401MB2464.eurprd04.prod.outlook.com (2603:10a6:800:55::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 165c85a8-db2d-4efe-9463-08d56d2aef77 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:VI1PR0401MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2464; 3:4QVLlhtc3J1TDsD5+dOwEAnB0Fzvgcp8zA4VTsES0o378Dj5DEO1orik6sxh/ksZY/HwP7Yrj9opuZBnThHsHV/NE3WPZpUAa522WLBmSg8CysC8jwJNHPE3Lmr/g5jJ9aXsCvEABxazVKMxn3nhaMpEmyHn93YKgDo65KEOoIVtnWZzAX9YzGemjIlyn5PbEBrC/lqUZ4EXVqyuf7z/MyMw7Oc/uPbw2kvFZtlR0gRH10QhXNJRvzkRnEOUncAi; 25:KOdxW7/d6zjq9EvjqHWETvaLiAEvme0nBRW4ikqKZbtku6WHLQguYsOwr1nJKnWQNuhhPMS/nSO9rEft1Iuzx4dLNLpFvyVh23Xq4k7tQ1pl0RxGkDao9KWll6aTQr/BjV9IC/9hGaWtY957UW544m7wwc8yVNjlyKArNjyYBhD9kUOhDI+YLiLVSDwAdnSLlZ5IY+R65p/aagceUDIlZO+9IIhMTjFgdLR9+u9gRijn4ivus4MaUB8QXlS/0smkYogJe5AqIiDirAssVJsQJFuCsd+v76dB8bvlYTeJIzXTAYkHN+IKa7UM+UBf0YF3SG0mj4dfNyR3iWTF683JEw==; 31:83h1dhEU4+6DfReBqkFy7yxkb0B8LsZkr9z8q/KdNwkpsIZL/dGIOHE6yDe+B+EudrjPWBhGsb3sAqqwwjmmkY7WrfooOQkWNvvxgg5PYzF6IaIhteMT3x5gwwq0Y6ud/BLpS4jsLsb5DZC3kAUbd3hw1+ceqh+cbyQ/gX3z1Dl11/KcbZhor2gE9QqAIdTLMPKSHHpgPM+R5gHQ1zDZYBVvFLqcIJSZ/BmLJQvp8rg= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2464: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2464; 20:f6obWP+bCu8IHGdL+pbz3FN0ILJEZeUd8mDG9sWw3VvOztSHuvERY696zF8g93Sx1pL3SS/DvgbMrjruRZmxIwLgLkxkE0a87n+M/5BfoTmrOyDhNJnadtPVL/tbb/L+COTP/1otsNQyzGu08dolLmvCASnTPaOuTZTON3wxErDHKGztPvdypVTWPrEPWYwXYmMLajSgO3sGt9HXtaMC8oUrb7exslQ4NtcB4WqnnLeyOgaDuT9QUhuhB7wc1zpbEmWsrTPrqPXvWMr7+eb5fgoqDEYy7F6NHPiANrFylIVYuVQvqed2j2D4iP4VkQhbuAa/Q9OSciZUWO5fuPtiA8tGgS0Fjcz4oiWfa7JnL73SkANUwsvZsSG76jBPVnIbC1fb1kITi3l3nrDGftdzZ39zW7f/zBTKusZukPFuB9BVXiSm2BPglXIk9/dJiLLDyi+ybIrRcuWnVLEoUqH+dykV3TMnHcSzBZ24Gd5Ab4UM9i/V1WxuahxQbvSnJfqb; 4:q4lyOYq7GlvPsM4MmvMw0YdiGAlvpJclk84JoxMXe4ijFFUUXL/JHqde2NHEtfjXbQdnUPW23EmjLH+lA6oHWiqODVue1A0ywShJbgZoG7PiJ5KgGT6Wc0V+Qn4fmo9YkwQ9TDVvL+w04k9Fd1xUvfX3Qa8wHVjN82Uv64p65sCRUNIc5RujCR1GzoTG5IyN6rWRpbftNK0wcUDJPiuDyrtTpJsi9WIDmCabefXnOFhQk137tlQ0hGu5RYyPTrWdOFXhe9A5/EexyjYLU1GokgPyVSSkrW0KpQRAoQo7Jze/f5WfTVCjZws4Zpn9pei/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231101)(2400082)(944501161)(3002001)(6055026)(6041288)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0401MB2464; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2464; X-Forefront-PRVS: 0575F81B58 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(39380400002)(376002)(366004)(39860400002)(199004)(189003)(305945005)(26005)(7736002)(48376002)(16586007)(186003)(6486002)(386003)(6506007)(16526019)(50466002)(6346003)(97736004)(575784001)(86362001)(6512007)(53936002)(52116002)(76176011)(81156014)(4326008)(51416003)(81166006)(5660300001)(66066001)(8676002)(6916009)(36756003)(2351001)(50226002)(6666003)(106356001)(2950100002)(25786009)(6116002)(2906002)(2361001)(105586002)(8936002)(1076002)(68736007)(47776003)(3846002)(478600001)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2464; H:Tophie.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0401MB2464; 23:cBBvd+/GX0+FiM/Vbe4Jj1pe49p7aJGItqc6CYG?= =?us-ascii?Q?v3js+9gtfOVeXDHK4io0wf5smZ5XgpYUg5zV5NeQZbFKJddSNQHfGWONnUfy?= =?us-ascii?Q?3v0PGgXuwg3fmru8zcDkM+QcVFBlTwgN7huAIcGUfAxuccfhdRDXP1H7xKLJ?= =?us-ascii?Q?G5EWEBMwG4/VBpknRKWUa6Qs9v2oubdArT8BX1uCkdEdJmbT4wx0AnOLSPxR?= =?us-ascii?Q?Ar4Ms7mkWj7Rx2BgM3XLtChHsqX6CuOEUHQWRiHMcEEo/JrsO5fjzml2gR0S?= =?us-ascii?Q?/2FwdzFt49eRoi77qcmGHxHp5v1b/xn+Axlh21YUp7MwV7ASU+kFCep9x0ZV?= =?us-ascii?Q?EskV9BtNnpeh7MVtvyvf+dzhyl1fFzU11q8m5MAdS22YYHEBz4iJyYp4ehiw?= =?us-ascii?Q?Prr7JZ0qO9o4QC+TecYKveUnYYWERNz4J8GEoWuQeR0cc2Ndt7sdU7XDttzq?= =?us-ascii?Q?9jpErbLQKnrAEbOqE87RPgR9Roq8H2UwNG8cplCWUo4R5scdWOufd90AdKgx?= =?us-ascii?Q?bEMt0U960vxitAFfGcAhRVxjG0whLyhU+XaWzZWExho4XIsd1ODALdz1KMiB?= =?us-ascii?Q?fomjHXIHpgunPvoXAbGnOZ4VVPsY+mErLzeQs/YRuvdWiBVtYrSaZDDdJwJo?= =?us-ascii?Q?HA+CJDaBFEn4GF39QEUF9njQ1QQ35aWfY2ItAN5Vvz427NLM8iQ79o49MFnD?= =?us-ascii?Q?vLCGLmBoyXf04xnYgCSEyURfY94bLbaiGCivL4GMVulUR5d/FaCEE5WrjBVt?= =?us-ascii?Q?IHVMtERTVhvUanOj0E2u1QWObl/OPE396o/o22X1r2D5i/xDKlw82CozoWXb?= =?us-ascii?Q?sYkMkuEsL23QX9UdZB6ibrGuAKUa8TvKVv7JKYuJd0xOunKfv6SxvUftoOuK?= =?us-ascii?Q?Vnhnd+0OBwBpUdCOuy/jiURpLnaHRe2egU8D76V81QPqDXO0s94rHatq54a6?= =?us-ascii?Q?kpHD3szOuLSxQHng0H0/S2T4+TtvVlG+eftxsOK1ivjXbmQqJTX9OecH8Su8?= =?us-ascii?Q?jfb4YBr6JpSM5iSNvoPnuna9gFO0kHXNM7asGPOsdUqZb0t0wuRJpJwGNB2Q?= =?us-ascii?Q?KOihfpQ6KW8eq2z7obNmSxujuk4YInBZrUS/Q97H9vy0mWCo81j4lKJWA47Y?= =?us-ascii?Q?V+flmiRQdLcyLJEn+nGyt+wMV2Rz7/AkujtcK/J0u2zA6Jvjqoh5xMfqODTO?= =?us-ascii?Q?u9egaEiSK26M0MVtHVI1P/zCkqZqTlOf0y0NL?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2464; 6:J6jgBeTIosfnPtMM4FH4ihRHen5+E8TOfYLwA87YArx1objewDDlzPl74LRFK4X2XbM8HL0pnFITZNp2mvNMLWtOdOOYJGrMC5Aunu0caS/Dz7wPRyZp6j8n9V4h3oGykZnar3Rax7ghpVtyIbs6OaOaxz3RLWELAbsdhTfMiKTs7nxA6aM18AJiyT1lWJoPny0f+um56iEaEIFnbGF0jUa7zgYrTGsaYMKPhuJ0HLIwfQjKtKjIBTwez+2QuZoh75v6msZz/gYS+/GTIeeCWmSBLm6UYOW4pKjEWCrRlXWyI9o9XJ0Rjqnxy9a2osdlLQ92Bz79iVOO4fEy694qZQa1Ao7konJG5FGzeNgK1bs=; 5:7UDPN7kyqCcZBICstY5PlOiNC7GmYx3H+wy7k/sO7eqapEUW4Xsr3GWinNSlrtuvDs96i4W9LiQl7fAD1lsC9X2nkm+Z7TDQl/EcdrUFbU/Rg2C6CF+4IlfnsQXNC1bFCsyDli8UnjYIxrQcqjy5LGNAaA500QVleG0avMsGju0=; 24:nbRPNQyrNeDGt0xo3LHx/pXTYad96fPw5hETEg/toiDlva3isYtTfHRK6MQFNy0nqtxxsNmDpoZGPeZl0V41nilVb9pDh1GbLoFGHXWERO4=; 7:aQSI1KVjG+XlwPKTwCPk7y5yMrfWm53ynLnLo09E6kEuXMTV1nlQ4Eo3N9PqxDJnKNHEUtNzXwlpQfk81piRfiYtrRw7PZsOkjDAckDvbosqp+3bQ9agXNojreUzYIBcKdVL7CclcKRklZeCZ/h6FXR0yC+EWNF3tPz0BDpmNqVRZ4L/XgILkx/EUE1inmmF/FZrdLgktBlFT2iMXfNFyRRbuPan8qZyhC9KpnLJL3ff/OugKxMpr3n/FzY5CCj1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2018 06:29:08.4717 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 165c85a8-db2d-4efe-9463-08d56d2aef77 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2464 Subject: [dpdk-dev] [PATCH v4] raw/skeleton: fix device start 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, 06 Feb 2018 06:29:13 -0000 Device can only be started if firmware is loaded, as per Skeleton rawdev driver semantics. This patch fixes original implementation which attempted to start the device without loading firmware. Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases") Cc: shreyansh.jain@nxp.com Signed-off-by: Shreyansh Jain --- v4: - change patch headline to raw/skeleton from raw/skeleton_rawdev v3: - Moving 'Fixes' below commit message - patch headline made specific v2: - Fixed headline from drivers/raw to raw/skeleton_rawdev - checkpatch for spelling mistake drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c b/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c index c7931d869..795f24bcb 100644 --- a/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c +++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c @@ -297,10 +297,25 @@ test_rawdev_start_stop(void) int ret; struct rte_rawdev_info rdev_info = {0}; struct skeleton_rawdev_conf rdev_conf_get = {0}; + char *dummy_firmware = NULL; /* Get the current configuration */ rdev_info.dev_private = &rdev_conf_get; + /* Load a firmware using a dummy address area */ + dummy_firmware = rte_zmalloc("RAWDEV SKELETON", sizeof(int) * 10, 0); + RTE_TEST_ASSERT(dummy_firmware != NULL, + "Failed to create firmware memory backing"); + + ret = rte_rawdev_firmware_load(TEST_DEV_ID, dummy_firmware); + RTE_TEST_ASSERT_SUCCESS(ret, "Firmware loading failed (%d)", ret); + + /* Skeleton doesn't do anything with the firmware area - that is dummy + * and can be removed. + */ + rte_free(dummy_firmware); + dummy_firmware = NULL; + rte_rawdev_start(TEST_DEV_ID); ret = rte_rawdev_info_get(TEST_DEV_ID, (rte_rawdev_obj_t)&rdev_info); RTE_TEST_ASSERT_SUCCESS(ret, @@ -319,6 +334,10 @@ test_rawdev_start_stop(void) "Device stop failed. State is (%d)", rdev_conf_get.device_state); + /* Unloading the firmware once device is stopped */ + ret = rte_rawdev_firmware_unload(TEST_DEV_ID); + RTE_TEST_ASSERT_SUCCESS(ret, "Failed to unload firmware (%d)", ret); + return TEST_SUCCESS; } -- 2.14.1