From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0051.outbound.protection.outlook.com [104.47.34.51]) by dpdk.org (Postfix) with ESMTP id 70F0F952 for ; Mon, 6 Mar 2017 11:34:13 +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=jaOCeL7QIjqAq+GL+yAh79i6gJfrz8ILTaEKuRIojT8=; b=nieCcwWrngiOoTRKP+8UpPBCzmrmzB7Q5wxRefhf/phulywOj69nNlRrJlcOsRAwmOWu0ZMAuR1gct+Ttd3VM1kv8HAMSb537lbjSrxygaHYuoHnX77RqLXIuWWBmfXuLSSY22Br4E7dRBCj7apg682vNw2vcHww6W9HagMTeyo= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (106.200.230.99) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Mon, 6 Mar 2017 10:34:09 +0000 Date: Mon, 6 Mar 2017 16:03:57 +0530 From: Jerin Jacob To: Harry van Haaren Cc: dev@dpdk.org Message-ID: <20170306103356.GA28766@localhost.localdomain> References: <1485879273-86228-1-git-send-email-harry.van.haaren@intel.com> <1487343252-16092-1-git-send-email-harry.van.haaren@intel.com> <1487343252-16092-2-git-send-email-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487343252-16092-2-git-send-email-harry.van.haaren@intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [106.200.230.99] X-ClientProxiedBy: PN1PR01CA0008.INDPRD01.PROD.OUTLOOK.COM (10.164.137.15) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: 174d8849-f7a0-4466-2449-08d4647c539f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:+SCHCkWLiECBFqBRnDUcHkVkMU823fMKpWJ4ff1vdFekRAHwn87hu/MS0o9WaRYJ7y+nZY+Ttspmg/6Im+3gCzuuFDvBwcGyKjQoTGJrNSbiRWzG7UGg9u4OwSnHdUpKmfNp0L2HXRDywF0rl2Lc7Z+gEXYiyPoaVRrfYX00tss6ht6fuKm7sD6mydyBfhwVbIBwoBUG4Yr8fx1ij1YIixNJr8CChONAUXJ7R7LBJuZahw5TrhMvJ/xmBTP8is9MSng3Nae845mmcPQYgMDh2A==; 25:SH2ui7H3j6ArZp8daGfwjYhEXmfStfhojO0/z7tYAj4VSE2RCQForaLUI5z/BSfyqbPz+UGeiyUaQrQpuQ4l+bbUwMOcYqwwTJ0Us45s5djG+hQHVBlWpDAN5jZY9ehSB4hnbleEnzIKuFWV/+eQzTgn+xT1fitOFy1K6whbxXKuBuDlg9zz6K3Oi+TXbvFMYDsFNITHCfPXPJG477dHNXYHKsRhbszM6EMPx1mZpCNSSdKHQNs+sbcietnbP4i+/Ma2DU2u6WlnQ6BjUT2AxijJ0R3lCVczACGO3fzod+Gsy7+tWJd2RehCqx1ElAh0xgxQRrsQNLL/ToySD8PGgSFX3B8tBqAwkNv6wkhr3Ofxedd0LLMvtYbUM5DaFSp9U7/92JYWXbEYBUgHEH0gJDNKas2acZ0BZpoO5jdPCeEgjnRP94jqhKzTnpi29DxAYqCZgM30ZC02q7l3NUpFrQ== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:tafwmmmtqD6LXFRj6mZRS2mBKnVezdLK2l8oaxnC2RefjwTK8lDbc506SGuOjfbm7jGOME5IytOcKme8zArT9uJNL6MDQPf1j6u25IC1xxObhGPe8nJVJlk7tgQvuvSSUjnyVdjru/ULe8FJ+lJBxskMsqGNW6XlKwVPOr6EL6MqZzsB+IP4nxa2SnEiHsPMOb8E7kWrGBCcxFe3Y3GiE/Djczfqste8qTesASsl3hy5ZrgDNHOauBqrxXvHvAocbJtc6AtTX1I6pup30V1ojQ==; 20:H61cEoXLkPLXqnOEAESlncVIE//aXVYOydtT48Lp7GRd676FSscerpfPrZCEgcsGZrWlmqxrUjIt40+Qn9v3POeoICLpzuYtPdVIjR+xmEv0q+Dyv2wKDfxvprBZrOzw/qcMuiIQVWIZYv2FLuCH4RedAYbNoUCH9uC38XrtfmW6jBZZspmpIgkMY7p8yRONn1l1B9tL//IoN+uAYw/lqYbzI/VHqFIo8ocaJKvrFhvFz5Fde7KwugHR8I2uxl7gJzKcGzRY/ily49PMqc7kn4eMT1mJ5Mb2Z1zWLX325zvaDEz9RH5gA72DMzT5iWhdCSKJkylKMKmbqfvXN3CAESY7tf0eBqV4bWkPG08jBdWTycVyTUCM/PXjGA1gWa25ES0aeuQBw+4772bEvN1Pv1ByJpjHNXk+J/rBg75hrG286ilrDriNKDHj9pbJTAWyilQsuIOIZE2v35KuAXKZSwlT3mm1SAu7DsPlURZGFWYF5bM0LSjNaqPyuP0et5/aMQD/qcDd7sT35BAbqY6s4nybo3rcRF/bMS8CkOe8NrZbMfWS5WYq5YQ6Cmn6IaiBRbdGHX/9KS0ENHch+7yUMSH1FAbCwCZca5wpePXzKr4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558025)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:ma79j5X76xjAoWEjw3nc3RZOhH8nb8zYHmu7ZCKMGLfhznDmR9HOh72n6Tft5c3mpD5daRYpmObKCvwXWvV5F/cpw3ogJSnOQKy/48UNhj84alg4uI7DXnA2gjhjX2mDDm98Yz/JmFUXcNYSe60DLGe9igkpcOcnPkbyAhWTeZKAZ1mTsKWYmXfUNe0CGUV6JFHQuO0VWHFQHgRfrNhvlgWZbxyTBiurouiR5Jm59uALRf/FvJbZw2HuPkD8mUJUhKO3Bihoz8GdZ2rjZtUFnfyGq6Ak7CKGlbzMlqZfYgnZrWPtBEskYGOlnun2OjM/h890qRWnEGkFhI+opUy3wWTAVj1Zcuywbyr+bYvA6WwxLQEZ3qYTv6/2ZEmrhanSf2mJn3pQ9GnjdNMv3z7eRYku7yrD1NPO1yzxkzDB9Kqi56RGg0NCcMHhTq+gJRj4iP/to6SfT+l1ZmI7qMZoIpW6Y3Fi1DJ1HX91xv/4yX6+2zJHAP9EZDFrzXNgWBUayK5bVebX35pKZzHpxSJ/OiNtDUcuCLyZflCNh0aEj6pQi3lrWShuDvtE8GWLKUimc56bznrAQAUOiwSVUvVOjVrEsz1c8/BLMoZZME8UmMb35sxRV9bEviQj3EJTIR/maGIexl78/Q22UakTFNrQcQ== X-Forefront-PRVS: 0238AEEDB0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(24454002)(33656002)(305945005)(42882006)(6916009)(2950100002)(4326008)(50466002)(2906002)(6666003)(7736002)(229853002)(53936002)(92566002)(42186005)(5660300001)(189998001)(1076002)(4001350100001)(81166006)(8676002)(23726003)(38730400002)(6246003)(110136004)(6116002)(3846002)(5009440100003)(66066001)(61506002)(47776003)(76176999)(54356999)(25786008)(575784001)(6506006)(9686003)(50986999)(55016002)(83506001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =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DiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:6Uk7hb8Mi4KoA/vtnFYt1un7RdcBQnXSTqg/r3mnSw8As534Z8SXZQY4GL5abYIdZKMKQ0tdZDf1uKML+Rii6hCE0P/cEF6OcY4pWdsn92IH23AN743P0h5emxO8ss4QtCfAw8bly3x/XPfMoL1DoXR8/Iogz2boqOnDDb/RtOh6REf9qx0SsEWa9yhZfafdW+1e40zqHpWK4ktHxvvTY3vQXOxvDPC+usnjypNih/7cVx6ZIT6LWIpTwPnkkvMo68zFzFRubeKJxC9oOAq7sFzgrnelTExo9Zeb7jpFGl5OUPrD+hZ4SbF8+f+fLV5Q2LOBHFZGfSRBRC687PYUOw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2017 10:34:09.6024 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH v3 01/17] eventdev: fix API docs and test for timeout ticks 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, 06 Mar 2017 10:34:14 -0000 On Fri, Feb 17, 2017 at 02:53:56PM +0000, Harry van Haaren wrote: > This commit improves the documentation of the api return > values for rte_event_dequeue_timeout_ticks(), and allows > -ENOTSUP to be returned by devices which do not support > timeouts. > > The unit test is modified to accept -ENOTSUP as a pass, > as the device doesn't implement the timeout_ticks function. > > Fixes: 4c9a26e419a7 ("app/test: unit test case for eventdev APIs") > > Signed-off-by: Harry van Haaren > --- > app/test/test_eventdev.c | 4 +++- > lib/librte_eventdev/rte_eventdev.h | 6 ++++-- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c > index 042a446..756bc32 100644 > --- a/app/test/test_eventdev.c > +++ b/app/test/test_eventdev.c > @@ -519,7 +519,9 @@ test_eventdev_timeout_ticks(void) > uint64_t timeout_ticks; > > ret = rte_event_dequeue_timeout_ticks(TEST_DEV_ID, 100, &timeout_ticks); > - TEST_ASSERT_SUCCESS(ret, "Fail to get timeout_ticks"); > + /* -ENOTSUP is a valid return if timeout is not supported by device */ > + if (ret != -ENOTSUP) > + TEST_ASSERT_SUCCESS(ret, "Fail to get timeout_ticks"); Header file change looks good. IMO, In the test case, We can introduce TEST_UNSUPPORTED in addition to TEST_SUCCESS and TEST_FAILED to reflect the actual status. I guess it will useful for future tests as well. If you agree with that then you can post the header file change as separate patch. For header file change, Acked-by: Jerin Jacob > > return TEST_SUCCESS; > } > diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h > index b619160..b0c7f9c 100644 > --- a/lib/librte_eventdev/rte_eventdev.h > +++ b/lib/librte_eventdev/rte_eventdev.h > @@ -1158,7 +1158,9 @@ rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, > * > * @return > * - 0 on success. > - * - <0 on failure. > + * - -ENOTSUP if the device doesn't support timeouts. > + * - -EINVAL if *dev_id* is invalid or *timeout_ticks* is a null pointer. > + * - other values < 0 on failure. > * > * @see rte_event_dequeue_burst(), RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT > * @see rte_event_dev_configure() > @@ -1166,7 +1168,7 @@ rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, > */ > int > rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns, > - uint64_t *timeout_ticks); > + uint64_t *timeout_ticks); > > /** > * Dequeue a burst of events objects or an event object from the event port > -- > 2.7.4 >