From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0068.outbound.protection.outlook.com [104.47.34.68]) by dpdk.org (Postfix) with ESMTP id 1127020F for ; Thu, 18 May 2017 10:49:00 +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=aDVRWgnqFU/CgzD09M4mG29qCId7OQNCVcSkvHI0mHY=; b=iIHa2eKzwHWFWJJJPYapxLOB+GnuGOOoJWGhblSkCW9LgP5u86nqEsX7qqwHngkiAkIxouOlIpGat/PYekpzDNvuRp9saDujRW7oL7KWMO/xpEscJ9g/k5sN7NjxPGM/NECdxySmGL0TqEGkHEkDi7HVhvkmkTVD/bXUJpphNDQ= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Thu, 18 May 2017 08:48:54 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, narender.vangati@intel.com, Jerin Jacob Date: Thu, 18 May 2017 14:18:27 +0530 Message-Id: <20170518084827.13626-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0110.INDPRD01.PROD.OUTLOOK.COM (10.174.144.26) To BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 003b80e5-1536-4e27-0a78-08d49dcab924 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 3:R+PUvmdI0k7viRPGtyMVqEgNxAQde/LBDm6FZIepEkVTEsjtR6zijCkQAXOkRKzID7+XygGu8njv1AlFqcui8Pcjjpmg23C/mYkqj2Dty2bb4bhUN2sRmh/CNG6yMR/Rln/+4Ds2yg4Vdn6+MF4lM7y8T1BwvJpCVigT+42RmoJzavXmAgmjDeTGVNdmMOAh92aAVe5Lu8ZTvdLCUIFJK4x3T/jVk0bDpAehTVmtlhop9QfebSKsbJj5OCqLWVAOvsx3d/XXT0ZKE31av3m84nrGpEu0s/ToBRwPP0Yj5FLi1+EAhyi/Jve4dzHzZRUTF0y0AgkW0oyPHBiFOEvCkg==; 25:52cuTwVHJhbOia4r8EtVvPEIu8rzQ8pQ7lVsWRdSpJDzGBQMjjZPPupbHlh9SglvUerjL9fbMF5rgVIVHe4XLs2wjiKet4+vcSTIUa5bbrHrLSE9erot23eIAWp4frLfDnEJ7fOVSADCAc9F05gS4QGWpYBL9PYeb9WRDm6LKfTFetqsE6u7IAI8pijftR2n6JMAAbDsz/8FB+NMa/8cDYFBocYU38U0DTs7nqmX8SSP0xpiCJfti9JNLbmDMe/OFnS0RrgWgq8MsL3XrnsXitYvgtTPFf5ETlEdbFayWSJOuKVQHqY2z3Bnme4Wh+jR4gH7WIK5wSAioFsewkPEwilK5ztlf7BcX75l3bqFesz2Q1wSGe+Zb6tGG6X2l+iQPREHhFn+ROnorSNa1DkFAc4DxCsqJyFKIshC8QJcZVefXY7zMLJzPXDcVA28O9lIOmRAWvSlBJKLKQ8dMxE7W3MJX5KQNbB4d6nxm8OOf2A= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 31:FKi9MaeijIO1k0lznOTDA3IhlgLJG46F/LEe58I2m8ByiPM+g+nBowh1piI2WUxnYZ3cjwV+t6bqzG+Z4Ll/R7mLVukwSqb2fI//QHDoL53ggz32qAuCzVy1JvulEJviF8Rbw7h5vmjt1Hgl50vzv4Q9tP641ILyD+T7c4xAq+s9Jfb37PnnWIbKfOJOUEmMOa3pqYbmJCh01XT4Itc4BibBlMe5o6QqpVWmb3AEyDA=; 20:vJut6bJ9fBkB2F2uWBNGLEy/QJdlmxtTLFZEQ1Y5XoufVO22WxWsk/JILe5pNAT+BqG2LbS2Ba46PuJivxa37yg/5nGHam4q/b8fLYMD0KAwbzSf59klflGKRoBFGt5Vu4Gnk1/EFMDTKGT+1V25RXiv3A79LIHKraHnvS/oOyOxwTWYQPuPQoFsF8SoRrCk+NHgkoED4stfjJ3+/1A7ICS/YhcbZHbfER0C96oU+bYFk9t2Dh6KLKq0NAQbEpnHa93sQKFEuQPYSIa8SXNFgJAhQMe9oLMVxF3JiSIxtIfbB4CkSPqOKtShXLZ8nyCLCOwM9nw3nPlhn2oaT6NWTDswKMor1/wU+ScYaAJ3Ix8BARn+WRvplD3FyxkN1i01xNsVlx4dN7MWKTrCZhfOgeQG3VqzxPrhgDQRVYep144d6sOtvK8enrGDauAly4rI/S+zAGZ2qGWvLGK8Ydzjg6xtls2K+bnDm7aSMXXUaQhVgjg7xnYYwguqVmgpQsosBhsnWUs44c4WLzmL8Ek4IaGE5ATaTtVVxl2GDu80seiGaCOQ7zNmHGVNJt6t3moS+TQ634ENmZnHlQeUK9Wg//QliCprPutKBby74Ae/AVE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(20161123555025)(6072148); SRVR:BLUPR0701MB1713; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 4:iZM/LJboq+HSFdbQHu2a/36FxcF2teXePMUAPoxyPbRSVTNMTL/liMAr7QM+UNk/E6Ue7A4UYaVLAtZjVXr6e4s1lAh2NWcSC91S+g/TG2yLD0bZ0/4bBuazQzdQHWCYvx3IdkyBhK3aoEG/EYNvmaFiZ+U/rSn5axtwxbXdCEy8YnLFyvMKQ/Rh8t7v+Yp7CvwA2zZltsxF0h/JehmvJCAtQ7fO/F2P3tmzy4dB/tK3UGU6MRk4UASKGk2KfC4Tcbav7DDWFoxAeXExswcAdg27OKRZ9qRh+pLNdBof9KXMcFqOrvkuYEKsGezcIBT25tdW/HsGBaXGDC3MD6ae1bDrBFRgeGzSn9m8s1iMaRk7/7r33ltldO0S4pE7NaeFvokdAGxV0X3d9bnTtls0OmxVdoDmsJlSmt1XrTA+omutDfvMOxN5s7mmoYrcXFrqfTqJUVlNo81JnbqzKxdw2SwSXeSyRDrN6MkBGqAhhkynqQEKsys8VDXxeQxG5oLOYsbBWKawZQJn+/Kovm9e7iBc4kZxXsw/J7iAbjIRMLz2MRHecgt/sH84i+HPeana4VDWxBlttVSe4QvogfOOlvHpHUuiobv51CoXwuAL63+WUixRc9r9mDYj5hFlye/QlE9SYUrCplejDLNPc2iT0k+/ZRtE/RHpZ9XhKIVznyAQqvRvCBIxq3Sneez9JDfyDd8YwAIe6VxKtJox4Yp2j5jZAxUunneSs4doLEH53t1Qqjdsf7v3CVSZHpZe6hlHDQpN6ubal81d4U7khx0E/Q== X-Forefront-PRVS: 0311124FA9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39400400002)(39850400002)(39410400002)(50226002)(6512007)(47776003)(6116002)(53936002)(66066001)(3846002)(6506006)(8656002)(48376002)(4326008)(6486002)(6306002)(2351001)(2361001)(50986999)(33646002)(1076002)(42186005)(53416004)(110136004)(72206003)(966005)(53376002)(81166006)(38730400002)(8676002)(25786009)(5003940100001)(305945005)(7736002)(478600001)(189998001)(2906002)(5009440100003)(6666003)(42882006)(6916009)(5660300001)(575784001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1713; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1713; 23:SSYfuyK5AdcaG29vYrbtny6b7v02SmOsJQso/9R?= =?us-ascii?Q?/gRPZXkjDi2oTK34ODBHdka34eHNBRGfyhO6PWWSy+1rklYHfJC8tjn7kIcc?= =?us-ascii?Q?DFXPvQM/mdshE3MIn0N7VvlQWDL7Z4pL59bUFs/PWJzZ9DHUtBadnjxt+t0j?= =?us-ascii?Q?9aUGJ54Oa1xVTZ2TF3lYAOxo6MQK0+Y2XCpeWTIFPqnOigkbtHUlOQQpcLsc?= =?us-ascii?Q?1vR9QtxBoLTlTukqI5FSOtsmpKc5OJvWYhZQT0JRDPTEjcxkwouUEjoTZngl?= =?us-ascii?Q?sTVvnrqGs+YsicU+QJc+rIQuApOY3g7AP6hnaHwNFRl4qhxzWDPxiTR0S/2W?= =?us-ascii?Q?jE4ooQh1hytAo7+5X/P5P/6liHSpmxsJq1E4FAnFJd3G5/bwi0dCq4CPPIRv?= =?us-ascii?Q?nrVreDXFlPFWLw5mnpFD4a+C8UYy73o4YXC4f6VwKfMKlNYDRu0BIoSJro4U?= =?us-ascii?Q?r1d8JQGH5Z7wkrSNGfvg2MDZ5dcEFgt/wERbq/Kt/t0n4Gq/r9eVyeNpEuDa?= =?us-ascii?Q?UoXjdgf4Gc+SkmJaFlBLjulro9dSi0/52EfZCCYEyViKB0obHlmoFnyFN3Yz?= =?us-ascii?Q?TDNiGzljZolsCWJzO7y2ZsyS7CU5zgZA0c88JiuSdr+gZOIW0GYSeZHmNmmS?= =?us-ascii?Q?Z2QxHUYeNolff4adyANeOH/ygBT3nf3YuAzUKMk25xY4+UpUcgMjZABsS5MR?= =?us-ascii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0z9GWhUnm6/vjNJ9QW39jF7lXSLmRyrxLNLs/stxTl9OuKaPvQotKME45orF4z7c5dCRGgsChf4MmrYjPoIJQozqvMhlpTa7U4fdr9gx+MjTerge0s19jqvBVE+smlRUmA==; 5:4zHwZQKzU3oc8mGhFmS1m0ArO/YUt6gz+05ThkmsUzFsfI6gPh/xuI0tbxnTbCEuqHFJxypLhqqLJHUhuH6Lvl02fcstAmLC369S77dxqGHExg2OfoIFkhygMKf7RdYnuBCszEbRM7ZXxZz+Mgd1Cw==; 24:sMoRSGdXfzLnOJuN4GdcZfPizma5Om+bbEJvdggv6zNSn3n29K13rmzhNYXDL/OC9k98JQ8v0pxxf6co3MxD4Wb9wLoSU78blCwZpE6pYzM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 7:IO9YdJb04cr/uqRpIxc8bRMmsw7wo4oLVHMrvI9SxlsPOOUzyHrZ/GtlxNOg5/mlxB/FJgACrdZuOAUsCzQA20bZIW5uXG0GmLnQd/XcY0JxeOfnT2SnyYsfid0eE6ct35cnw9YjABH8ivwq+rT12O4vmauuWd32GVKwedbtXtwAmIxlOwe2KR6CYtpqHsYgyaDRcIrtnmnW1zpqVSDCQfmPacFI9jsbxgzflvffnxUXu+eFMlAdwKUJKvUztBWqh50BINidkvH/IRqNRuPN8W+7wxqG5MaQPkCjtVVBtx6VlJ3dODsOn9xNgIHRLeyX0qb/x6ux3dfMBKEPZceudg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2017 08:48:54.5171 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1713 Subject: [dpdk-dev] [PATCH] eventdev: define the default value for dequeue timeout 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: Thu, 18 May 2017 08:49:01 -0000 Defining the value 0 as default value for dequeue timeout will help the application reduce the configuration setup if the application is interested only in default timeout value. Signed-off-by: Jerin Jacob --- This patch will fix following error found in the event_pipeline RFC application http://dpdk.org/dev/patchwork/patch/23799/ with event_octeontx HW driver. EVENTDEV: rte_event_dev_configure() line 379: dev0 invalid dequeue_timeout_ns=0 min_dequeue_timeout_ns=853 max_dequeue_timeout_ns=873813 --- drivers/event/octeontx/ssovf_evdev.c | 2 ++ lib/librte_eventdev/rte_eventdev.c | 5 +++-- lib/librte_eventdev/rte_eventdev.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index c80a44379..5499b1bf7 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -194,6 +194,8 @@ ssovf_configure(const struct rte_eventdev *dev) ssovf_func_trace(); deq_tmo_ns = conf->dequeue_timeout_ns; + if (deq_tmo_ns == 0) + deq_tmo_ns = edev->min_deq_timeout_ns; if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) { edev->is_timeout_deq = 1; diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index 20afc3f0e..8cafffe03 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -369,9 +369,10 @@ rte_event_dev_configure(uint8_t dev_id, /* Check dequeue_timeout_ns value is in limit */ if (!(dev_conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)) { - if (dev_conf->dequeue_timeout_ns < info.min_dequeue_timeout_ns + if (dev_conf->dequeue_timeout_ns && + (dev_conf->dequeue_timeout_ns < info.min_dequeue_timeout_ns || dev_conf->dequeue_timeout_ns > - info.max_dequeue_timeout_ns) { + info.max_dequeue_timeout_ns)) { RTE_EDEV_LOG_ERR("dev%d invalid dequeue_timeout_ns=%d" " min_dequeue_timeout_ns=%d max_dequeue_timeout_ns=%d", dev_id, dev_conf->dequeue_timeout_ns, diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index 94284337d..f39fbc6b9 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -409,6 +409,7 @@ struct rte_event_dev_config { * This value should be in the range of *min_dequeue_timeout_ns* and * *max_dequeue_timeout_ns* which previously provided in * rte_event_dev_info_get() + * The value 0 is allowed, in which case, default dequeue timeout used. * @see RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT */ int32_t nb_events_limit; -- 2.13.0