From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0072.outbound.protection.outlook.com [104.47.33.72]) by dpdk.org (Postfix) with ESMTP id C39A96787 for ; Fri, 3 Mar 2017 18:28:58 +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=yNoSW5eZMY+fo9Sy04N+xlxrl/jh1mhQXJiPXoNDk44=; b=OeVtP6Ta9nZ/Ac2myS8UQwl5qfnE+8ng5msboOUEJYNkujRIRL+ZHB7jmyHQfpLA1iaMBQdN8SFjQfY160KtacoldAoX0nVeB7V2AbII0oQDw7dv/8odd+fWdUOJgAKKwOfEzPKzh0fTZ2eVXgqG/b7w0Lw4Sz98W6XtMKfUmQw= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain.localdomain (14.140.2.178) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Fri, 3 Mar 2017 17:28:54 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Fri, 3 Mar 2017 22:57:43 +0530 Message-Id: <1488562101-6658-2-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BMXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.174.214.159) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: ca6eeb14-13aa-47de-f8c1-08d4625ac5f6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:KokgqMyzgMZB9O1ICr0zZ/cD35rwfE9e+7/GCN97hQMItQP+NhtECKullFjtJO6Kw13sZBXhSmj7qmVUtHLQyCfHYeVy4rfXlUwUtbNUMXJo5OKmMx+Cnhrcx7CSVNvUCv2a/1GJsZ86dfW5iGvKV/AFEGixDKvly+PF2ODtrCSL/DMk+hLRsh96pbUy0WO/SnuS9agqUqAJ2kitYn4rR5RsNQXbpe6+Lyvqa/vFa3iO+omXcsZLL2+tJef8tV+74ei/fhUPQSqmghKxPUnzEw==; 25:v4ilKvukmo/uHIY4JT688MWTCxQWP5NIjxAYZ4/uJ++oOXQGnJTQgsCmC7llX3eTK0OtLi2QMfjxkzJ69fQZo+YY6bqME/RBYXSJwDhZxT3IpbocSp1AyTrBXmzMjbXiPUY18pLRnNxnjKXxkkjZkKVx+h3tUTtfVl/w0Z4RMd6sjK0/OdJsH1SEQNuOtvH1ktqPinY3zRuMt+pPTMp+4d/B6e7z9OFfLoM2KNLvqbR+KRpjrmi7HTe8Q4Snrna5JMriAflCTGGhf8sthMNVaQ1zSdGhR4SzxdIYoFGrL/Qs5SSh7XgLwW/wGpxjElaq8AACKAtFF5AZKHLWLlqNS3lm54aFg3U6/2KpqPLpE/L09lTk0u5wacbDoTffZL5vIjmM/aiTFPXAe9EnApOyVCet27/JjJekv/KvE5JlHD2ojR+6lYFyAezmX7sKAR1dsqBI7m13PHViW2U+Ozxp7w== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:Uqhm09YBts8LuOat3oujjFDmgQ0Q481SFYNrWDa9PoE5N8ae66aRciG2esq9uCvvlV+yjqI8piVEaM3OMWURqmFd+LS0BSZV9b7WOTFX+9VGyfpUVawQT/YJAtENiSuvl9v45ryC7Mp2mRt4p6/ZotVien/b3lkCY5Dqp6qqYEZgXlAHAGNYacrDRC+7aL67TNm5Ch4Q1BA+or6J9vlEDfXxk0e2A0FO+yzgIrZlYuhtBSTdJecbyKOB+F/i5Q1M; 20:NuHbcoaoD3s7ooc+MYX2+kPgVKEuEIhxJwKVqpyUVbP+Zl979Clo8kmQG/BTxLc3CrxbRhgec5XvWvKi8KwgVz7jC6wXzq2/X72lx2yqE13mTxBfQmANod/pF4+qA//3bEMXVvg5LMqU1L6nyRa56XoGygS/ZuK8CzpRAdU64EfLfksxm7JRgC3SHVafuy5H0oWNIKArW8pMaUYe2o1jWL/E5cMA5rxCrEQ8BaM8HQzmlN1Z+THgBmSamRhZHN0CIofiS3THUl1olS50C6fTY5KOw9ByAvg2f97BltKaHRAy1S7JdCnYeygG/zTTz9XF+vXkRF1UhjoppWJovr81E4Hrn7puJaMVxATHbrBBV5ChO+UuSI6xVTseSmxWZsVaOZsMoTfpBgzdJMLVywE7sl40y/gbwyxB9OZx2DeuYKI+z7DzwY3B8GjZxsTN37tk5E2LvjeRBuv32zQfG/mfroCjEEd2vgP63sKnZQl9XsOzf+besiTaS1N8YIu7EdmMHC6Ww5V8SPa9OZ2pVcNsdmrQcE7C7UAyWkn7b9yMPex59AmMuKktafUWFsaTjzZiYucVmonnXxA6Oyym8+Rfym4sJjm8RwBcnVdFTCIGsDY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:0sb8FwvqwqCXgCVcUtBylM1LBWUDF+OqA9MCBjtfeqWlT5TVrafTXM8E2kbBNQic6tT8iTpJUJYExJ+Au35hle05Djp8FRa7Ao8y44d98KjTGAyaztXzUOcUIa3vZxGhTGl04kk5Q9NRdYy6oUZQj/o3nbEr07BeKuGKqQG7ekM+IgY8P2Y418agjEyP6HbeUi5LObWqUitqJN0g9Ey7AcJL3YXwB4eY3NqCZFqOmpz4fU4dU9QARSYIL6Sv2BvOyOTeDGbqvBKzRF3lFKpCzBRjDlZKFOYeuhli2lB/QhiOOLFy5fiPTktuhcTh5k0jGa0KQbrvAdJeNBAS0Fk8MAYyGkQ3J9ttojGSADLDRVFHE3ibqvcLA0ueGGvCvDZQrYOk6ikVSpe15wDPXfBG/y5I2UCT24ZZs2aqVOHyY77k18345uz7dns2CjDuzwW9kZBcuxKE8Wz+ylJdtdcbBmJbR53rlys3Chqt6NxN/dANCQ0SVTvmbBs4Ll3tbz0rA5rSD1P3xhgYu47w9RmKMJFSh/2tWH9z3ElKcIJQMWRf3ENeK449JNKx0LYUq1JPurulzeYh9lFt0JWPUm7+/UgFy67xAg8nCHKUx5FPkNQ= X-Forefront-PRVS: 0235CBE7D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(3846002)(50986999)(6116002)(36756003)(81166006)(6512007)(97736004)(2361001)(2351001)(6506006)(575784001)(5660300001)(42186005)(50226002)(8676002)(6666003)(106356001)(8656002)(2950100002)(2906002)(25786008)(47776003)(6486002)(76176999)(33646002)(7736002)(107886003)(42882006)(66066001)(110136004)(4326008)(38730400002)(6916009)(305945005)(48376002)(92566002)(5009440100003)(5003940100001)(50466002)(189998001)(53936002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:8VN0KazG3yIG+zI3XAG9ugL9Nv5aeRzSWQLRLkk?= =?us-ascii?Q?xgaTuRL3e6h0VKFUZ2Vu2fJDTuEzNjMAns2TebAQAtJ5D7FfVHvzC7iLh0lm?= =?us-ascii?Q?QlAlTfGOa6UK7TqUGkeZzSw1YB8k6GgwpdVjnznUGCmHu/6Z2VSA8MI06tEO?= =?us-ascii?Q?TJi2KFwWYjUn0IwQJDSPURJVZEWgFxFfXcjhf3mikUha058bIY0PJdn/Gn3X?= =?us-ascii?Q?IfFy7NaB1aIjLLp5zk9aM7drf/nyHjW33S/Apic8/k01lQ9T0M7hvF8KfGr9?= =?us-ascii?Q?uynCHLaRCgHO9lKJkRwh+0EeF+ybypKBLdHnVJZmk4EGaQZksGbiknyNUTf0?= =?us-ascii?Q?+RYVefokbxKvgGPv5cFGWmaGhpe/szgmGEMH9gC55sdydgVJm5GCDk9tc85v?= =?us-ascii?Q?vzjN0jdzy2T4ve8bnfO1kEoJba3uOtHoSlph9VJNMp+NYlcgWasRKN3ikp/r?= =?us-ascii?Q?ZkaglVA8x4lipA25fAHD/4wPDdpDEaeMHm4pCZZap5OQIy9bTBSxnjhWRvCj?= =?us-ascii?Q?Bz56UUiR1pVFSSvcud8M+0O3tCE1cJlqqoP8S3emmaUwrWsfefvaoZtd67e7?= =?us-ascii?Q?GJTN3sFp0CKe0nupDB3qpK4vd9wGXO4nFN1U0rKGl8TVSzsGLqfGmz1EkXFt?= =?us-ascii?Q?ZLPjZyEDmrlXpzAiRV7LYafV4L5ta7ykyohg3eafCrqFZqem0l2XBrV8+f+0?= =?us-ascii?Q?iWsBy9zGA7oebe2x94+E567CuJWCQ1fNNP8JzNxBXXdhtObc7kuGbMfd5XTd?= =?us-ascii?Q?tfZyrkHYCZAgf72KZEOMPPalrNP8NkX5wz9MpmpAZeLSFnbKaHcVCjrKODL5?= =?us-ascii?Q?3jWXEKg3E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uUQgL+6dviywSdQ10EkqCZ6GOXOH1HDjWFbTKkJ4oRB7bX0K2+aOpck2V4qWMF31PsJhozQfUbVy0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:o0LLvzarItucPno3B76OMGUK8e9+yxILZP3F6ou50Pa9XWoFwUbzNkyUbtenUkY5+0obF27FeMNe4RgIGAO1Tpv9xZPv8/XJ2boPmW/h7SMZMBQ6GJuufv1YwQM3G/zewziVilUAA/3MCLmT32oWX8H3jQFbRb7hC1sqIHo+ZPSqY2aUCSda3SnqltvWa1ETYy4diw8rKcKU1uohoP4UVg1mw1xxtKYAhRMtsodY9dfjkVA0CjTRVqyNO8B8cQO4GdhUIe4aQMm6S3DD+JZbEcOksLwElOsUz5kYw/IZdkpbYpP2C7AFNuzEmgKm+SkqW3I7LkkHjIwB20AFH9EcAg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:28:54.2395 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 01/39] eventdev: update PMD dequeue timeout conversion callback 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: Fri, 03 Mar 2017 17:28:59 -0000 eventdev driver may return error on dequeue timeout tick conversion. Change the pmd callback interface to address the same. Signed-off-by: Jerin Jacob --- drivers/event/skeleton/skeleton_eventdev.c | 4 +++- lib/librte_eventdev/rte_eventdev.c | 3 +-- lib/librte_eventdev/rte_eventdev_pmd.h | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index dee0faf..05ec58b 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -319,7 +319,7 @@ skeleton_eventdev_port_unlink(struct rte_eventdev *dev, void *port, } -static void +static int skeleton_eventdev_timeout_ticks(struct rte_eventdev *dev, uint64_t ns, uint64_t *timeout_ticks) { @@ -330,6 +330,8 @@ skeleton_eventdev_timeout_ticks(struct rte_eventdev *dev, uint64_t ns, RTE_SET_USED(skel); *timeout_ticks = ns * scale; + + return 0; } static void diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index 68bfc3b..178bdcf 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -902,8 +902,7 @@ rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns, if (timeout_ticks == NULL) return -EINVAL; - (*dev->dev_ops->timeout_ticks)(dev, ns, timeout_ticks); - return 0; + return (*dev->dev_ops->timeout_ticks)(dev, ns, timeout_ticks); } int diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h index 828dfce..45ac8ea 100644 --- a/lib/librte_eventdev/rte_eventdev_pmd.h +++ b/lib/librte_eventdev/rte_eventdev_pmd.h @@ -406,8 +406,11 @@ typedef int (*eventdev_port_unlink_t)(struct rte_eventdev *dev, void *port, * @param[out] timeout_ticks * Value for the *timeout_ticks* parameter in rte_event_dequeue() function * + * @return + * Returns 0 on success. + * */ -typedef void (*eventdev_dequeue_timeout_ticks_t)(struct rte_eventdev *dev, +typedef int (*eventdev_dequeue_timeout_ticks_t)(struct rte_eventdev *dev, uint64_t ns, uint64_t *timeout_ticks); /** -- 2.5.5