From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30082.outbound.protection.outlook.com [40.107.3.82]) by dpdk.org (Postfix) with ESMTP id BED671B30E for ; Mon, 5 Feb 2018 12:16:37 +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=YkYvJ9eKyibXd+cVWozEV8sjP9LBobb3h8xo3btah48=; b=CTbX1CD8P9lSRMFWEwOT7hCTr5Cx3pLDGYKRJaja5PJg9mgV8uHLf9MDK7PzC//0Pr/cnAYt5fD1UqzpnIGPP0LJt/VW1jhEHtF1znZGBUQP1y2GaWRm5Y7O2cMy4Ng5taWUT1kIBr3cCdp33PpsFFwK1bPosw4LqWE5t2RwSiI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (192.88.169.1) by VI1PR0401MB2461.eurprd04.prod.outlook.com (2603:10a6:800:55::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Mon, 5 Feb 2018 11:16:32 +0000 From: Shreyansh Jain To: thomas@monjalon.net Cc: dev@dpdk.org, Shreyansh Jain Date: Mon, 5 Feb 2018 17:01:08 +0530 Message-Id: <20180205113108.19340-1-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180205112425.17579-1-shreyansh.jain@nxp.com> References: <20180205112425.17579-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: OSXPR01CA0003.jpnprd01.prod.outlook.com (2603:1096:600:e::12) To VI1PR0401MB2461.eurprd04.prod.outlook.com (2603:10a6:800:55::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a322e152-5b9c-4bb5-3b11-08d56c89eadf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:VI1PR0401MB2461; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2461; 3:Fjp6PRwF+Roecpt36s+6MbXXtQ6bkzBsS84KyyYu/LtnBxx2haAx9Lkhp+L8Q3pJoonSDlthEKp5xCfqG3XmgAGhWw965HKv1f7xLWP97CLqYrHVK/gzsZ11mjpVvGvleaMPmFJ8R0ei6yT/v7ShpWhL3a82uPs787OjMTpc6CYGLy+U5uhg6rALwxMkkyTzg9/gZXPSt46oDZ2vV9DMbr0OaMqU3qdYz60T6zVVAH/IVCJJwvwfh58R2EUxTPVE; 25:51E2bjWkcILL4IZxci5y2bhbNQbRY6mNLKf1Mk1EsSZ3lxZjug1GvUUFbqR4PATaFvKl8R/ltTI6erp6ZwIaBvu7L8gjYqI0yss2j1Zp6Ee+czj0C95sL3eptNgSbXF5fOzCW2uRowt+wTCqWp0k8RTJwCLuYbnhewcem4DbW+Lxa6BzTyftSPVNrBW6Pvnk6aYpieIL/G+Rt24K+WsBwdhd9+Ft+7b+/2VozSkoza910zrFRlR5tiV8VpnIfI4W4ueayjeK/qTIcwLPQ3Owhb3RNq9ZVDWxWK4V0gwvK+hBUbzrpCmZCS4Uj6rVOMgudo5B+PY/kweO1kwryJklzg==; 31:SLBBdWBkPwNL4z7+MJ3X/QJO1dBadQaV/x4lj9YU4CJ+ipdyDJfFy14hqe99Y4KR61rdHQMLfcHsqGhdaLtXrw20GQE5IWdlvE2QG/u9h/cEsPI1DFWEyu/8CDl9HdLjjkae/bwHjGPEKQ1tb5SrdS/h4DLGXVlb5FdUCvHi3ncbyrQSn9Aiwwzqrk35DYI8xO1ONpBFcMCcZMZ9lvyxwA8rsjtmf4Oi9PRkN1TyBYk= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2461: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2461; 20:YHmaz2+vO2INL2AHKyVHxhpjuscifkHEgG+WsSCjoSNv0WyMw/u1YzZqDXUawKdO9ViMf0NTo2cSfB1gsGqs8rW7RprsaP//zUx0uZRzM3JZwEt9IGnqDXmomPdDLcYBewtbGeuQpdmdjBnIoL8ip9iIr5JK3GXcaecSgaSnPrvblclE+hezX0Bo2u78Ua7VFb6szarHQCnKDnKHrQKyxrerjAPCW0lxYbAo8hOXSEqZkBUED/Cc4IqSQ00EnwsixbzIaTDxP9rznvm6cYRF7dE6v2W7rIigi4v9jT8BpxYEY8lClerbMqXACOBxqhZOo4Mn3ZJSzTEd1put9nSsMIagmlhNU/RN3GnlXNlQ78OLAjZ5DbGOei34AOZxOqaxpvCXOSvlaB00tYUUOZAvD9/akav6uTBsfmbacDjDGJn0OmIqwUNIEk8gFuJ4GrZyfZ+ZBC6HcE9VNtg7od2mt/GvjJiZprSQGm7tTd80UjOzsxyQk/OddzEJfOs+V6gr; 4:tcRTuI4Nor5b1SfSsvelkNRJUyaMjiEyMiFjSdXpoWnfqGGTr05S+EI1S6E6XlvHsIVSk3a/hXYNk1YDNb+uVqDm6bvWB2kQwgntsgBuXDzVJVZGkeZEys2Kk7q9h4ArHbaq2tkqLYy1CUJ3W/X2yED4Ojgpflr7d44zxjouPp22u79jBqoz1oZEKOFhm9ZWvHGA6IJZ1/jA6+YHeVvByAOXqHjoB67SVFn1//Lr9TOg2AQ2T40NXWVVaGTr9CvUbhhVeg73PeVAdcFJ5/8nws3xxIgLuL+wBC5vDG4ytSKcziL1cydQimS8ZKj8x98z 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)(3002001)(93006095)(93001095)(3231101)(2400082)(944501161)(6055026)(6041288)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:VI1PR0401MB2461; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2461; X-Forefront-PRVS: 0574D4712B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39380400002)(376002)(39860400002)(396003)(189003)(199004)(575784001)(86362001)(478600001)(186003)(6512007)(48376002)(81156014)(16526019)(53936002)(50466002)(8936002)(8676002)(81166006)(4326008)(50226002)(26005)(52116002)(6916009)(2950100002)(51416003)(76176011)(68736007)(6486002)(6666003)(2361001)(25786009)(6506007)(2351001)(105586002)(386003)(66066001)(2906002)(6116002)(47776003)(316002)(3846002)(106356001)(16586007)(36756003)(97736004)(1076002)(7736002)(305945005)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2461; H:Tophie.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0401MB2461; 23:5D6Qh5UYP5G7M9S7bvZR2vD2WFwsNGehPN4NnOO?= =?us-ascii?Q?35W+Dh0l+fibStDfk1itv73UWvhN18RRKYpKlZBlf9/d2P10BFUBQHOFPyF0?= =?us-ascii?Q?B+BOuLORtJNKR80wOBzd2swDXRjb9AyyrP+KHG59wbTI0O2V/JuJVoumO1hl?= =?us-ascii?Q?7EN4SDtAWcdOkXpImIlZp9JNpXy7szvnOfruxxR8wl1NkbK3r0Llt1ka3ayR?= =?us-ascii?Q?wyghWFFe67kMMprGB5e/JJeKfQVKAFkF5AEQmAp4SXKt5MjbQDTSGLuATtXO?= =?us-ascii?Q?Ux0gLJSeWCjnY1ln7gkgcE/45PIrh8yyCadHGVdrTlE+wTfqN7B3EywzZIK/?= =?us-ascii?Q?sQAwybMLYQ30cVg/HrYF9k3cVkpTDjmajUV9MDFVtJEt8kDTIm3kGkvTXR+T?= =?us-ascii?Q?MqdA+rvpaAoMokGA3GvaHrGzFt/Hm8r5pvS8I1PsmVZZns62IQcDiWzZyox4?= =?us-ascii?Q?fLKSrbYJIt0UIWpz2BpFs1+2uzoG4fB4LFAGbYTRVnStutTj0eAHHPOYx893?= =?us-ascii?Q?jhhDA4pijp86JKOfyhsj02X09loDfDv/6i9c2GblV8xICKpA3EjMAK4RlZW0?= =?us-ascii?Q?QEpOI7wmPdZs2sXpgH2tQ4TIq2kSrF1FKtAikN0YyikCoFvJX4+U8gGBvFoz?= =?us-ascii?Q?zFk8KExVYsMF4kiVMl+fnDkdFOzuH3MzjrZhiZS6Pq37knWZAs5OI0Z1cg07?= =?us-ascii?Q?ky6ymSMN/ibjqmOckGQupSk5IBGyRw0p6g3nR42sE/qle9yh0CQmIeamKHI1?= =?us-ascii?Q?yp3KXj1HH8DmsPOc52clzYKHHC5kubwUe4uAFx3bWOjHBi4R2iOWZkwKHcIr?= =?us-ascii?Q?hVFjaIVdUm7tg4B9cYBDk2Z+RmNIThPeL6HF6Nl2jzlmX9P3VVg8V4tbaViV?= =?us-ascii?Q?kptZopxu/VLoGxrFMZkSXAaf+vPcq3miHE7nm2CehcSONAh32uZ+dynp8WOP?= =?us-ascii?Q?QBzzK8H0O5dASpl6PaEeVkSq/s78I7f3Uokl5iomUAt5DfU3nJVPp25cXbuP?= =?us-ascii?Q?PxLzNH0lZOqLBSBXCPnC17DHsQEivEPWmZBvIw0dXKiLnJVhym6RdPIYpZc+?= =?us-ascii?Q?LbLu6lMIvYmb/DxDUWKg0KsK09VNYooj7D/9MEsWs/2GNQT2xqX14sseHrEj?= =?us-ascii?Q?ssb/RLOQMO2YWRU5mfbNSjnZvNg5kg7CzrBUoW+1nCH4jT90LdEIq6HeMUlr?= =?us-ascii?Q?ovCRJq6Ut1Wp7pH4=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2461; 6:BC2DioPuUDkOorereIBmuYXxZeZqR9KwxlJv8vWbEVTvD9ovjw9kU51uIf+SR6QUldt/UGiT42o/Xm4nuxKywQb5lnJx08SSXHgsXwY3IEoqOHszwaZirFRcM83pp4BT84nk+kJD10MO+Q0AOP8CTLgCTuBBlFj6pTeRcupBD8aBSFB3QaKmKSBmI8tw11uzBZQueZD137cgYy0hXJzhCJAZXlKEBi+ImsSxZ7R5KKK1Z+bDyR3HOE8Hps5vc2tR4t1w3BdlNBjTUCo++mT1CEda0sXouxiX6XEMJk/UYMfzpbaQE2ThbgbTcf9PXBE3PgnaTeAKSL4OJTmJ4KnSUk0t33OGkUQW7XF5PxQph/M=; 5:DhXUrJ787mj80jnKXSuXujLV7PnjeQsuye46rF61Y9sN2VLnKlh5ysLnIjGrXnwzT42hAv2drgrtiK4AIiuEoXDUjXov9Jn28yJv5Yl1zsyte3i4M8rX8ZSrZ9gvn4EatpLnajHGToU4+km2ImnGV+vrMXwgjE7okjeAwv2mgZM=; 24:ddOKDuX3Qoxz1xgEZot5GGZvQoIZMRDe5GGhHBVsgSkOe7fjY4eORroxe1tSVWa0/nQEFz7GYamUMEc5SvxxlnsRhd569OT7MufUEOIO3/M=; 7:AQnE8Hu1OWFazY5sEO6xxc5Spc6qnVK3WUtAOVOM2axE6gpk6KKYNpT0DTzM3BHHlMV/guLAqOryEfG3+BESQgiZIXRSWq5aUEKykY+xgMQXpTZ/FRtXD4lbM9LdHD7gzow2CqFiowyTQdfSVrH8pozyyTujkPxrTxoP4XOf6eTO69idxeLJneH6nlHovzrR/Iyvhbevqgwzg2VdIsihZVQa3GFCUeO60qFyqASMem2kM+kHjrZNHtc65faoY4SL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2018 11:16:32.4766 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a322e152-5b9c-4bb5-3b11-08d56c89eadf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2461 Subject: [dpdk-dev] [PATCH v3] raw/skeleton_rawdev: 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: Mon, 05 Feb 2018 11:16:38 -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 --- 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