From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0049.outbound.protection.outlook.com [104.47.32.49]) by dpdk.org (Postfix) with ESMTP id ACD342C17 for ; Wed, 7 Jun 2017 12:37:11 +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=D5eI3v6yvQW0+N6S81WO1U+YRGgQsk5+iT+UYkBOkTQ=; b=ICLF9G1MJpPaNO28uMQ+sccoP0+7t11J9CJ6L44Kw2g5cfP83LDxYYaJFUgTi33LVDkY+E6zuDLwZpAhm2Yy+FItUnZUv1gchRHgGcCPu0xGG6aZMKKE1tX73p5yc9NDrIwlWBPZMyMaX4D2lqU3hV6y1rMhaJ/ivHM/EFh/bmI= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Wed, 7 Jun 2017 10:37:07 +0000 From: Pavan Nikhilesh To: dev@dpdk.org Cc: declan.doherty@intel.com, Pavan Nikhilesh Bhagavatula Date: Wed, 7 Jun 2017 16:06:44 +0530 Message-Id: <1496831804-28265-1-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0016.INDPRD01.PROD.OUTLOOK.COM (10.174.214.154) To MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR07MB3469: X-MS-Office365-Filtering-Correlation-Id: 90fe06a4-bafb-4763-5f17-08d4ad91267b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:MWHPR07MB3469; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 3:5kD0txZI1VBgJ3M0/I8FHU+eJxUkwMP0Nrx8SCcOtEIru2V1kScMRypEhbyo667JXWieH3f+p5dIGC5PgJQMXPoUjJiwkwB85eb1K/7HFqYYqzJhNEDEnqpXrpMmEwRyrobQmRTNLDd3pik7BVzO95yB86xo3gs4Rih7OU0zFo97zvraF5tIjaHmLlda5lprpI1+73Ugcl+dJxT3SaVhbL7XEE9XdBULfnpf0jBqfhUGrB7d0M4i5O7wikGbV6xhqrJzPvzMQjX8TmogbMbGZhSkSbzLXO4ki5PKPJ7/T8WpGsrGf/UkHh+23x2Nd/bl20Fouw0tYqmdx83p8BH7jw==; 25:R6zNKoyIx2uiWvWBryNeYbgVDFVfcWBFdSUcZsYfrpmbG1+UreT/klatXmg3Z2DvmzWUWH9jwrHeYzqjqpdOeMBCUyVtHwaHuZVutrWe0GuPyaLKSJ+IkleY0h9Tu9CQgVTZNo8gY+nM+6FknO5pYyp+XgXY9DE5gc0doLg+p/t21Ptmy7t0vjHqsd72qHLU780IVGNgZMqhB7lXscWG3U7Bpsj0UBbGb9+Gf6OR8U4JQ0R4XPpn9LTnG9YmD5D6FDLNUi6OSInITOFFSOiyUniZ7KVLBAk82sSekeGOM3rC+Sh6Oj5qJqPOKSEAeUAdNw441mgDFO3sRsoH7k/VGpxnVOLvG19pVQA8A6E1pAlIvKLfqDgJ16s+Qt93lbUFEpfmBLfKY4faMCpaKSvpBBCQH7KZRV3iV0GHmlWC9Uws6avi5uEHviMyQQRlodpPHLG4mkrYqANo+GqsESx6GJBAj7Ao7E3dxvAlb5SKqGg= X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 31:Pdys7lrB6YhU5GzbKekxmOCqAzfFTAjswdZN01TKJTZ1/CN4NeNfO7KFc2Tve4EzAokxyrGQTcFop1S9MM0ZdPXrp7I1yWdsE+rxR1g7P5X67I1kse04G8/eGlb9wriCpI18DnVCnUgPQfv2TjAfuEBcRDL4WQb2X7kXMxrf9A0JXAllVk7o/ypoLbes4C4XmG7PYvlFijpL1L2/5QNsk/A4rsLCSkzwXmWgWV7P9CY=; 20:qMvaW38RVa7wpffAN7ynRePN5h61LT38aE9mcIe/vdG1NF+fT3GHSHU6hCrH76i9XJ+39C+YLRqHsKMAZRq/Q0ONvTfY37YZzmybRRxLCEni8SKQG1MyUfst2xy6p6xdX42sEhdxZ/nk3+qdRDzAb+k/prkR/2KULcfQY5CdWErMLD1slEyWtq+gm/w3ae7m3pYeHaCZZjT7bv0KW9yHITaqxi85ul5fjV0MKFLYKfVmf820zzgVJfqcUt7r03pBXSwR9TiYuyiDolEwtkQalh2RRE9ez+RJTJ3p9jvbUj/rzjnUltnqFNFvG8F8DSEnwAYhbLlwDTBS/2aoa3PcHwQE2JqNQsa9l5SyWDHPmhRg4G1+Abp80HfqQ/EwaTYJYPztc7MkCXEZT5ifFyvUcIDWHtu2b02cvTpVTnzboXi63SbJ46jn8HiHNqhVFicGvgJ62cOf0gblE4E1sXruXdKqmbzAAZPRUjrAXzEQhGdb1FFS2ur4uoGaNnmAhVcibPzKIyWHMsrgQPnKa0R6PrPVHphVYVNwjK9P9uQ4Y/HMA/izkCPh/2SrF1grfxU8fbdHMzwUxBJv8kzSuwL6q9a+Surl9XXdMrupn6g+Iow= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3469; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3469; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3469; 4:UgrcUcklRSXC54AmvZJmwy3rb1ab6hVwjTDnt1mIGF?= =?us-ascii?Q?tDnXd27wDsa7LKc+tSicMRh+LqonJ4j+c+PlVSbXEizbEoFb942lSHuvQNQJ?= =?us-ascii?Q?VYDZnaSu+Q4iZiW7Oy8nO5nF0LgupWZRt0JScJKkSbZeKAzDro9O1IVjz7Ky?= =?us-ascii?Q?b41HaAA3710sYt7uQyNKUUhp3dHXeWO0Ov07cWxq5Y1ibfzgU/yeH/92FMWl?= =?us-ascii?Q?7VN5zy6xRxxOn9Pt+Bh2kW1/fKqdlbaG+wk0J/Eyp1MNw7xdbU41l7ShZIVU?= =?us-ascii?Q?p2H20i1IUiyZ7247rFrF8NhlejqyN8IOqeJJoSdCX5O+cwu/Ora1XUBpQEtT?= =?us-ascii?Q?gM9UqHZfnEcmgrWDkiZP9BBVPYh5CqI5VBM4WvfiaSw31yge/+nNA9k8az4r?= =?us-ascii?Q?acEdIaKovs6oVA2M+RhnvF43qOupFHD37IIXaS/duTrkq+JAhKhQpmWexfBc?= =?us-ascii?Q?ipEowx86sPRBNuVlBug6ZwDFck1tXCJ/t6khxW2sMVKk0VrwALK27yv8o44A?= =?us-ascii?Q?7lePbxIoDbVG6k03BES0oTKRjoJd0t9f+ysYngfzr8/PDoatqmreii2Fn9lT?= =?us-ascii?Q?iLlSCahSlAYd8f6meNVqCuMq/vm2jXb5gDxDClA7rw1Z6Y1i2HVKs9lQpl+t?= =?us-ascii?Q?TwEcjzvyxMyuD5G29j9VJHSW0osxl5kKTAn4aSHq4UQzVpFu3d53G038h2nu?= =?us-ascii?Q?d0BgQESJv2Wv3MbE6cQSlkqVjiPaeOf7BFrOJZKFHCOqOLzqq/D5eDdNpWzR?= =?us-ascii?Q?eN4S88edExVSwGeicTJYHlLkCQgcabPzgIhAh9azNZHiv7Oig9D6VstkwJ1Q?= =?us-ascii?Q?dR+Uj7+P9B06N3jf0ovonr+BZoIcCxZFjIG0AmNdrUrl3u9IwbWNt3DVJR9Y?= =?us-ascii?Q?dX40ZqX5T6zI1Pu45iWNCJz99ne7HIOUddfpNRJDbBinnRGUe7QR0TyGIglO?= =?us-ascii?Q?ivDfjd7/0LuLR3OiLIlVeGAy57bHXBIM3ZfhO3la9WS0ugEUsNVb4MiautoB?= =?us-ascii?Q?PS1j5uP2bM2L+5G4eTV5lLDeGPUDPfpNPP3tHAmPCHVwQOD1aqRJaHMS72Yd?= =?us-ascii?Q?8lod9isRLPNfIHwKpP8Rk8YEivWtQNqfirmSv+ah/dmwPiPHm9VJBnnMX+Eq?= =?us-ascii?Q?kBcA028Q8=3D?= X-Forefront-PRVS: 03319F6FEF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39410400002)(39400400002)(39840400002)(39450400003)(5003940100001)(53416004)(5660300001)(6486002)(6512007)(4326008)(50986999)(42186005)(81166006)(189998001)(8676002)(50226002)(2361001)(2351001)(478600001)(53936002)(36756003)(7736002)(107886003)(42882006)(66066001)(6666003)(305945005)(48376002)(50466002)(47776003)(6116002)(6916009)(110136004)(3846002)(575784001)(33646002)(38730400002)(25786009)(5009440100003)(72206003)(6506006)(2906002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3469; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3469; 23:TFsk4xymnl4bq0VqDNHQXNiZ1HP5eYJKk5rKJeBLZ?= =?us-ascii?Q?c6tnqStaH3yModmUH8jUz0hmmvqoUgxApKdOk637+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oJUKvXwr7scmRdTCvv+jyGCXmt4uqtZiBCJK+29tAykYIMUlOJP5Fzg+mX+A8fSnwUYII5/5lAMmc7GDQHrXVeoG2h0DxAruYCp3iz6gqV/Yv61upRCITNPCjmj9KvWjoGr7/Bhs+kTLviQEmOvXSSVeBAhL9b5jy7Y/HLClMnQvwqU6VaYe9B5c4CoxHbLi+q7APYX/eo1YPK79u9BRnxBL8I8cEy35NuXYvETOSk9u8/b2xQhf2PP2KLOYVedqG1gNDiUSr8P4GHEVd02WSUqfJUWJ9CEtznyDR5JGEFtr1oTgHfGBucVcwKVgSkxL8YtX; 24:TCS3uYfQfcY90hPWl8rinmXiNOGwtgOLEUuBmCxI4V+RkkmMAdE5jx/OZxmFafS+MPe83QuZykYw8y5mGLN4cKWtojC/Er9k84/Stppq1+Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 7:BkViKf1T7AAtPsMHCeYC6Ytm+FpPuPwaZjCY6fOuMtpi/mzgsO7wIFQk+tcORk9FK2rD6vgY6PY7yPgpNZTYYhlPcZcA9uoicQN5pmt3j7K6+g/Rev+srv3o2STlWQsp+lRrmSPFel24Wgu9hcN27xD21an1dL0a/f86HQrUhlWgjGTjdotLT60KK5DWy7kmjX8adqKTXykNXwBWeHTcOfWZJm92Pjwy4ieW7GqZf5Pm9qUEywz73f4KuP5ts/wzs/X/dsXq7pORQw7SWOojiBiWfQXckDv19rgKn7bg+ZZgwpVyIHaPSziryT2edfW2EYN86stbumbmo9oV0uIYBA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 10:37:07.9715 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3469 Subject: [dpdk-dev] [PATCH] cryptodev: fix cryptodev start return value 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, 07 Jun 2017 10:37:12 -0000 From: Pavan Nikhilesh Bhagavatula If cryptodev has already started it should return -EBUSY instead of 0 when rte_cryptodev_start is called. Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices") Signed-off-by: Pavan Nikhilesh --- lib/librte_cryptodev/rte_cryptodev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index b65cd9c..c815038 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -1000,7 +1000,7 @@ rte_cryptodev_start(uint8_t dev_id) if (dev->data->dev_started != 0) { CDEV_LOG_ERR("Device with dev_id=%" PRIu8 " already started", dev_id); - return 0; + return -EBUSY; } diag = (*dev->dev_ops->dev_start)(dev); -- 2.7.4