From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0064.outbound.protection.outlook.com [104.47.2.64]) by dpdk.org (Postfix) with ESMTP id 01C2D4D3A for ; Thu, 30 Aug 2018 08:06:04 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=XZJh3g760uu4zbolxkLZyPABTV4IIvS+pOFWsI5zLpc=; b=m3/yoZaUqlga9t0tztzaF1D+pUmkFa7tEZ4JtyPX8eBKssi9czcxCRm1akLiuRp2df1XajIKB3LJvlfDxnGoAn8aUGU/sLkMVtcMdKGSCaJRw27WWcrmkpDfqEe2cxzwOBGXqC/VOZbTVEQtpXgqTnjof4U4hkAUo+iwaZXqwe4= Received: from bf-netperf1.ap.freescale.net (14.143.30.134) by DB6PR0401MB2533.eurprd04.prod.outlook.com (2603:10a6:4:36::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Thu, 30 Aug 2018 06:06:03 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, nipun.gupta@nxp.com Date: Thu, 30 Aug 2018 11:33:57 +0530 Message-Id: <1535609039-10869-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535609039-10869-1-git-send-email-hemant.agrawal@nxp.com> References: <1535609039-10869-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: BM1PR0101CA0004.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::14) To DB6PR0401MB2533.eurprd04.prod.outlook.com (2603:10a6:4:36::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b597469-d6ce-41a2-aa71-08d60e3eab33 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0401MB2533; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2533; 3:8bNGHgocRDrb7Rmg2tUogKxooWUemfssKvr4CRB3Soy6JfoB2FZkbGaddMNbhm7GOVtXTRiK5Mi7T0aOg3XYi90tSCvp8jtpQ0nzympuMOYpFq2XluZuNBGtUq7qWaqPmW5WX4HPEv9wzxvxvQOL2tHkesWs29CPgUgzSSnyR/OR6eTh3y2tVIn/gKmCpjluYqNiqYjlrLK0gEzYHboTjSPpTPm0BtOEV4M5oh9NRkjAHLMJTUhee065cxCoWoT1; 25:FAZ7dGzb//8itEdyNCJcnY+3Dhryg+p86Jy2HVKckFpy1eN3uNP8XyLakD9vXb1YjsMbY6O1pLhrD/A5pNdG5Fx3jMHDEyu/8qHSLt/l7FmHNaEzdXe3QuPj0qxTOpcKLneoL0IX2xTn5b8/b+09f+zb+rGnDtJodMBw4lIaALqp9w0XdHPMmDKtstK81ZC/06WE3hlRJof2o45ehYDei4OUuDfQ8xQ6Q9+c6+0nfYokhWu+0BMDG97y9vp0RqJZtgaEUZaY8VFJxXrxBLh/Ogk8J+/iE4+W0BVL9kWIpMfjwLRJmePfXurwdXY70ovI7ac+LzYTUdngxmxmkaciNw==; 31:mqjYPkNck+qlNgsQcBF00obkpWDZOcJWg9yMNwFKhf/kcoV/5k1ivEBtBPlU9bc+TIe42wGmJT/2+hAyVr+HWoO6QOnO9nlLyK1Jxr6PTVnnjNO4pcATLJL0VcGJtjB+qyh147pOUdegTzbtPDQ46X+kEULl5oAbHcnFfbhgje3q4KgWU8984yZIjgJHYB64XP83Sici/6v32JJeSzH29v8RSohTWM0wA5E1oJ+mQrk= X-MS-TrafficTypeDiagnostic: DB6PR0401MB2533: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2533; 20:gBH2CuXWd5VXjnCIP/Lv9mVSG3p78wcil9F5fewQ3u5FeFFR6fqSSoLT/b8vunxS926pd1OXkzoHVQtII4zsHnJOVoGTHXQBgU6jCN+fxBPQyI5w6ZrnAry6NJ4yCSaG5GwRBUMMXpuR648tJF776pLuPNWn7WpAB3g/RSXaJD9+69rF6qq5dumLBEYLU9tGMcgwPvcgCQJ+IoStH0gv/hbTM4/WKjKMuOxc5f7Rcw4qtb9/lwBXZXyo93SEEGoaMp5LTbm8/z8OxRLe4OTSSP8IVpAyULxKNW3GLuoTtJOcq0km8ncX2CLXEHCD+OgiZMTZ1b5U1iFEnGFWsSoQucLj4VzclHUB//69zAH92p5v+IJT0mKycAiGnWuqr+l4xfkmCyhL+V/EXtP+XEH62nA0j0foph8zkHQ9CsVVk0MkUDjy9UFOwkI3ge+BXuIjHkYub6L2CvxfvTyYrlNwsOVwxwAXNgOFNB91icOtQXNmhqZ199NXtGCBKr6TEpiX; 4:eYGLFqkbky6rr9wWbP1ylWZkEAfi3KFaXX2Tl8pEsnd9w0a6ad6VhRCIoIlZA0pMBUDhKjoM2Gdd2zR45sqw15xvobVlYZPdLmRvc7cX5R2HJQBe1carOq39QXt0Q82pxP+W/I6XwYeOxxj6rAd0ETK5NiT8rdw8onhaMiZtcK6DkM7gKWcuEP/Pv5aCX4kvTK/3TH3Cy8xWYULNQ8oMiYw2VgOG83fLxaYxCIwAD0YC5AksZZaK09LCcKCBgQJquBvXB9kCT6kAMb6i0g13Nin9aPpgSrDpTZSnIf4m+y8iWso7PcHS23ndpsq+yZiR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699016); SRVR:DB6PR0401MB2533; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0401MB2533; X-Forefront-PRVS: 07807C55DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(39860400002)(346002)(376002)(189003)(199004)(16586007)(105586002)(106356001)(6512007)(386003)(26005)(6506007)(47776003)(478600001)(66066001)(48376002)(50466002)(97736004)(6346003)(186003)(16526019)(316002)(55236004)(53936002)(2361001)(6486002)(446003)(2616005)(4326008)(305945005)(25786009)(476003)(486006)(956004)(7736002)(11346002)(2351001)(68736007)(44832011)(81166006)(5660300001)(2906002)(81156014)(36756003)(50226002)(8936002)(86362001)(6666003)(6116002)(5009440100003)(52116002)(3846002)(6916009)(8676002)(76176011)(51416003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0401MB2533; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0401MB2533; 23:u3GQdCVirCPEPhNMgHA7C7y8D+lD1Qx3TDh97r0?= =?us-ascii?Q?jexnMRlUrjctREoup9QLMbAKWu1XSMjMeKDeH+u6Da+uRf7L9dSHjA2mBrh/?= =?us-ascii?Q?h9o/f6HVvrtHMG35H236FqyqUEGizN77K+bM/LcW5b80o4T5szFcGNZZpcKv?= =?us-ascii?Q?mrjyFwE0r5HOjfEYCVZCv8/RQUdmpu5epYELK0LjlBSvl6kO9pxZWB6TKOve?= =?us-ascii?Q?IvTgKqhHHngw/Uhlj3BZa+Zcp84BTATtPbkQlkqWifH4VNf4hGaI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zBmNoX2r/XcbAcvpQ6m5ZDk+1ytMv1xdB/BoR08oG524LwBlA==; 5:eBu1MvNkySDaKmqcCSAzxV0raQ2lq+DuAynGsyUC1benMKoe3x3k+BIx/uXRwBSjnk5VXJ/9eN4W6/hllpAfhOmlYgsuryv1qhGquekig8+X7e0CT4KXp6tJWJFh0y0zz7LlRtNqUckILkI1GR3lCEesN904RVHfIxRv+YBiafw=; 7:xQ7zUDVj13vR5B8QL2+pZljgd63ivIbLDM7FW4Xrrk88SNPV0v2NVG1er+UNIUt8cdN1YL3o2wabk/q6uq3/L+LfyrEDKY69SoxcQKfpaUccjq6faXJ69fKiBEhx9rUPRELvvYiJTQp5iC5KP2dFrvoPnXQWu1F8E5OU6OFFrUkQzA2chzTf3qGnpmQr0bcfSjYhQzf6WR4aF4GFMLRZv6f4etYLUjeNc1RJh9i0hW+hEs5GZuUOdfzf8d8YdejR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 06:06:03.4658 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b597469-d6ce-41a2-aa71-08d60e3eab33 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2533 Subject: [dpdk-dev] [PATCH 3/5] event/dpaa2: enchance timeout handling 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, 30 Aug 2018 06:06:05 -0000 Signed-off-by: Hemant Agrawal --- drivers/event/dpaa2/dpaa2_eventdev.c | 19 ++++++++++++++++--- drivers/event/dpaa2/dpaa2_eventdev.h | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index c4064a4..4b56e2e 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -284,7 +284,7 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev, dev_info->max_dequeue_timeout_ns = DPAA2_EVENT_MAX_DEQUEUE_TIMEOUT; dev_info->dequeue_timeout_ns = - DPAA2_EVENT_MIN_DEQUEUE_TIMEOUT; + DPAA2_EVENT_PORT_DEQUEUE_TIMEOUT_NS; dev_info->max_event_queues = priv->max_event_queues; dev_info->max_event_queue_flows = DPAA2_EVENT_MAX_QUEUE_FLOWS; @@ -314,7 +314,6 @@ dpaa2_eventdev_configure(const struct rte_eventdev *dev) EVENTDEV_INIT_FUNC_TRACE(); - priv->dequeue_timeout_ns = conf->dequeue_timeout_ns; priv->nb_event_queues = conf->nb_event_queues; priv->nb_event_ports = conf->nb_event_ports; priv->nb_event_queue_flows = conf->nb_event_queue_flows; @@ -322,6 +321,20 @@ dpaa2_eventdev_configure(const struct rte_eventdev *dev) priv->nb_event_port_enqueue_depth = conf->nb_event_port_enqueue_depth; priv->event_dev_cfg = conf->event_dev_cfg; + /* Check dequeue timeout method is per dequeue or global */ + if (priv->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) { + /* + * Use timeout value as given in dequeue operation. + * So invalidating this timeout value. + */ + priv->dequeue_timeout_ns = 0; + + } else if (conf->dequeue_timeout_ns == 0) { + priv->dequeue_timeout_ns = DPAA2_EVENT_PORT_DEQUEUE_TIMEOUT_NS; + } else { + priv->dequeue_timeout_ns = conf->dequeue_timeout_ns; + } + DPAA2_EVENTDEV_DEBUG("Configured eventdev devid=%d", dev->data->dev_id); return 0; @@ -516,7 +529,7 @@ static int dpaa2_eventdev_timeout_ticks(struct rte_eventdev *dev, uint64_t ns, uint64_t *timeout_ticks) { - uint32_t scale = 1; + uint32_t scale = 1000*1000; EVENTDEV_INIT_FUNC_TRACE(); diff --git a/drivers/event/dpaa2/dpaa2_eventdev.h b/drivers/event/dpaa2/dpaa2_eventdev.h index d2f98c6..8898024 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.h +++ b/drivers/event/dpaa2/dpaa2_eventdev.h @@ -21,6 +21,7 @@ #define DPAA2_EVENT_MAX_QUEUES 16 #define DPAA2_EVENT_MIN_DEQUEUE_TIMEOUT 1 #define DPAA2_EVENT_MAX_DEQUEUE_TIMEOUT (UINT32_MAX - 1) +#define DPAA2_EVENT_PORT_DEQUEUE_TIMEOUT_NS 100UL #define DPAA2_EVENT_MAX_QUEUE_FLOWS 2048 #define DPAA2_EVENT_MAX_QUEUE_PRIORITY_LEVELS 8 #define DPAA2_EVENT_MAX_EVENT_PRIORITY_LEVELS 0 -- 2.7.4