From patchwork Thu Aug 30 05:33:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145494 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp407014ljw; Wed, 29 Aug 2018 22:35:25 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda34sNdUN1MIgd0gmNwhWbfIdUaEHzCJ0qhFEvQUjTeowygYuR4CISBTep0uMJ63exAwqIT X-Received: by 2002:a1c:7305:: with SMTP id d5-v6mr672838wmb.53.1535607325415; Wed, 29 Aug 2018 22:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535607325; cv=none; d=google.com; s=arc-20160816; b=M8xvbE44A/wRjvFYYVF2VE//cYlRyEgKan0VImG5Hi73nZ2GsmZwpp5CMF8/i1ZFi0 HRMoBamZ7h7fnQdYNDLMQvHewg2F2rGc8OawFSXiT+oO6/6eyI0tdylDY/bxqEW8XR/k 8sOAdtdqRMgnYANJ9ESiB7QbkDp6KV046SVMYSWzU9jhliaB9V2/dqVTO9XMopxs7hwb XP5LOuzxfMrFTnnQ/Sed8OdEWRpmt2OsdRmtRIjPkKcUJm6lM0Nhco6uf9Y0iMzZnFGk 4yJ3dYS1Bps1q49qBkdJiyqonOTTcC/BK7Eviq6wfCJwmXgjsHv3cIzdddMkeeeQVCVT beJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:cc:to:from :dkim-signature:arc-authentication-results; bh=m+uMLbUUUSyFei7jYChBImjURMYvSn5DZY29HAxXKBI=; b=hwhR8jQD0biCnZENUiVQjO9BfU3pidsSqX0KY8El3RNmqodRl7g+/YPfAXCqh4g1JA wzjBV7h8oLHTMGDKk+OdzIVipeM4H6gdWhHFTImd65Z4fw+5SIXJGCnPetwa43co7beU b+nO/zfmN67lm9qR2HGuMf0k+aFIR+S1eaaDggwC24cNzgTvgyMddmht4ZW6cGOr34n/ u4518xrR0GxLXl7brWhZcQFMbdYW49cgDfvPkgsyjxBTzKuSjbZDMqBQan9lkjOnTIIf 2CXCQdwYgS6+W5objCF+MCQDh07z2d85NsoC0zEnT5bryopHJEbxJCLyGIWOBuz4M9Pb lmiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=nO1e2C6c; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id c17-v6si5181815wri.363.2018.08.29.22.35.24; Wed, 29 Aug 2018 22:35:25 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=nO1e2C6c; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E1552BF7; Thu, 30 Aug 2018 07:35:23 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70073.outbound.protection.outlook.com [40.107.7.73]) by dpdk.org (Postfix) with ESMTP id 28FBC2BA3 for ; Thu, 30 Aug 2018 07:35:22 +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=m+uMLbUUUSyFei7jYChBImjURMYvSn5DZY29HAxXKBI=; b=nO1e2C6csxKEr+Sgf4F6geWfnF/4Nq4mlOTSPrX++YhBQ5IGwEkPI/y1Y4AM96u6Cp7aCBiUCqvN/Ujfua8XfrcrnMltJkV+dzz27m4/YH7oTRzBIMeCg1Ajne5z/VyIu6jPAA26QoOrmBgko0fsDmGW49JxcbzI4OKhHG5mLvI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.143.30.134) by VI1PR0401MB2544.eurprd04.prod.outlook.com (2603:10a6:800:56::22) 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 05:35:19 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, nipun.gupta@nxp.com Date: Thu, 30 Aug 2018 11:03:15 +0530 Message-Id: <1535607196-26782-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: BM1PR01CA0082.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::22) To VI1PR0401MB2544.eurprd04.prod.outlook.com (2603:10a6:800:56::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 743ffe5c-22d0-44c7-7d57-08d60e3a6022 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:VI1PR0401MB2544; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2544; 3:j7vC8QCAZ7ZzxBNm54xqL1CJF53BSyEGzoxNb+BqJXqxESfii+faL5xxQc+hyGMsEZ3oHgyt32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m6lePIkYgsHDmMCCVao0Ch9tlzpkuUW/M+ADWUxZJz8W/m3jvzNfpprLXAIgjivi7VCyyYGKnDdC30GZB3I7QHTrjKW9IAFtYq/Y2+50a9D2K0IGpq+1Sj8r05B+P0udaujaymGkYnG9QRz4Y8e3YTDpyacUKQ1FflViox1SwesrmE6isjeZ+1CVAk2gfDLL6b4MBCypaBR22Z99KHc8HdAXQ269RGpQ+P6EbGgyY5HAiBlXO/vfbJcFzL8Txqa1DQ6SW8v/KmXUVlevK9f; 4:t+vIjW4KuuEFlsznBaF9MgjvSFWpgUCeXlGs5iCfyLaKo4JzD63fBCHL/mO2WUCMijU/eiYEoGcE+fIsJsu1kSNbOFZbv6z318F9WhSpJfn8mp/1Bi0AUMZQmpCnGk1tfZpVD9563006trtUkhQfZrpw3Tbbcm5DNcMdfBwNmiQ+AUQ8O8dTBVFRm28xDXykSo1dPcYWAiEyiAojca+YRPuIxKlHHkUCHT4Jv3D6ncKNlsfcY4IolVQyKSICVOYMNapQHK1n00tcOiKMdfCMJtulsDE/26DB/vyDNWoJhlQirYe3cPr0l1FhQemf1f5+ 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)(3231311)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699016); SRVR:VI1PR0401MB2544; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2544; X-Forefront-PRVS: 07807C55DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39860400002)(346002)(396003)(136003)(199004)(189003)(4326008)(8936002)(5009440100003)(6916009)(305945005)(3846002)(186003)(48376002)(16526019)(6666003)(478600001)(2361001)(25786009)(105586002)(68736007)(7736002)(47776003)(44832011)(50226002)(2351001)(106356001)(6116002)(66066001)(97736004)(36756003)(16586007)(51416003)(8676002)(6512007)(55236004)(81166006)(81156014)(386003)(6506007)(5024004)(316002)(14444005)(956004)(50466002)(26005)(5660300001)(2906002)(2616005)(6486002)(86362001)(53936002)(52116002)(486006)(476003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2544; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0401MB2544; 23:b7YZ+TAFBJWdQ8QNs70B/Sa4Vk2/ZA0l30UsX5B?= 5aCFAW6+V0b+Fx+nl4/mcc1F8BzJg1WpNjbzblDed0zCVd1h5fNnj6tR3d7zySmyZEgfVP1KS2rszDa6WpDEjZREF20nSZLt5DRnTHkNgzysMA9WBBxou7g1PvVHxlsPhjqPR4I+5E184zIJtpKZOUoTnJn6Fw7QXjFBfXDoWn1vTra/PtaVtGRx97EuM0byJ6kCXTHMOq/AbtI90OHzVnSuPWLXpb5+PO6hHAgfMzr355i1efu0ht2qj4974jcKoKWvtU1RYa517h+8eI6CLOXX4oxPk1i4fYtZgH8DaTFRCwhsmCYxDBxQUKQxuy0XUHO+4nDOS9zvIb9NctFqLPxsC5YHBJvLjYP4g+O00N+jqgTdIz8VemjvccyVVbIBgiGTNEhmUSNj3byjIPWNfcxxj8t2kPJw/LuCp/o/BWVyNUsnbP1kUQambvxeScGpoddRf82v0h4m/TSXoJj78LyIGCkvZr35XaxzpgiHFPxCwHuPu5oAErF3xhs9xgwqfgqSCuej6Ot5TMbSHWSIBu6Q3g9oGPGBhVP2UWwhvcw7cKiVQJLDm+E2g1ybCZJo8jtXwheKWZ6HPS4wcRDWlpJhNgsFUcVodXykeQT0sE69VVJmdJYaIHwo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wFnTlZMjK51DFZY2xgXFh16GROaC4RXXVC6B/sgangxTZqg5Cr62qbKxOF77acKyGz6D7Qfjkr6P3AHc/BcuZBC0rdftzJBhKshForOrpQ2llSRuhuOwa1z27siVXcJ94/9Al251MmkjwVHjGxHI37q5cFncZER4Voafupqk25Aw9XL43d4UhtiqtFWapWzUgXkKf1g4bgbfNnX+UVx9VVf5dEY7cBad/oCoxIP+167Pr0Fecj4fblh1iusmez7kOHaqYGJ3eupT3RotcSBnWGSxapcn/B5bGwi1MZ+Axpi+aCAHQn8N/4j72i0WaaytkG0FM3NZGZsxTQOmJcqNeo1Dumpnj8okVmjOfmqC6+4bkmfeG53umtyaXZItp0ir0468XQ8abrfPsnG9zaYELkuSexEobEP3YgsEbzkWXJoKAyQRN/wNg==; 5:j9gpJjxrjesUKlArAoESTGLSztnwR1LESmlwPbk5BbpSX0g6HLi1sLIHuML1W8cDa3g5OtWsbIKQV/74OfwKSn7dhYP4IFFp1S/A36eUgfsCZMCSBp4/iyC/kU/Iv7bIVDrovlUQVGLzTbOHC+dGvJfWwgjhwLWVgdz7gfBEdok=; 7:M33wSq/3CfgeNxIF9BGjaU+lGZUDY3w0ePl/4Uo5WInzZg91Ys3moBRDVC94ePX5Zzdk+is/Z5Cuup4LtwpCUrxk0/WZq3aLIWsdJzAIwfAyW4LDUo+o79emI46jwj+lE/EbMHYUEHQJKFjn5EVC9NXjPuqeartNdJig/JshJ8ZnCHdrpW9rGGSceI56sqrcA/UnWZ5i3KtAFBgVybdJUb9pzErbtZyq6GvpaUkmHiSIeHIxvwK9Bb5WOn0x6A8l SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:35:19.5702 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 743ffe5c-22d0-44c7-7d57-08d60e3a6022 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2544 Subject: [dpdk-dev] [PATCH 1/2] event/dpaa: remove duplicate log macros 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" align and cleanup the debug log prints Signed-off-by: Hemant Agrawal --- drivers/event/dpaa/dpaa_eventdev.c | 58 +++++++++++++++++++------------------- drivers/event/dpaa/dpaa_eventdev.h | 7 ----- 2 files changed, 29 insertions(+), 36 deletions(-) -- 2.7.4 diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 5443ef5..9ddaf30 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -49,7 +49,7 @@ dpaa_event_dequeue_timeout_ticks(struct rte_eventdev *dev, uint64_t ns, { uint64_t cycles_per_second; - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); @@ -175,7 +175,7 @@ static void dpaa_event_dev_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *dev_info) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); dev_info->driver_name = "event_dpaa"; @@ -220,8 +220,7 @@ dpaa_event_dev_configure(const struct rte_eventdev *dev) int ret, i; uint32_t *ch_id; - EVENTDEV_DRV_FUNC_TRACE(); - + EVENTDEV_INIT_FUNC_TRACE(); priv->dequeue_timeout_ns = conf->dequeue_timeout_ns; priv->nb_events_limit = conf->nb_events_limit; priv->nb_event_queues = conf->nb_event_queues; @@ -244,13 +243,14 @@ dpaa_event_dev_configure(const struct rte_eventdev *dev) sizeof(uint32_t) * priv->nb_event_queues, RTE_CACHE_LINE_SIZE); if (ch_id == NULL) { - EVENTDEV_DRV_ERR("Fail to allocate memory for dpaa channels\n"); + DPAA_EVENTDEV_ERR("Fail to allocate memory for dpaa channels\n"); return -ENOMEM; } /* Create requested event queues within the given event device */ ret = qman_alloc_pool_range(ch_id, priv->nb_event_queues, 1, 0); if (ret < 0) { - EVENTDEV_DRV_ERR("Failed to create internal channel\n"); + DPAA_EVENTDEV_ERR("qman_alloc_pool_range %u, err =%d\n", + priv->nb_event_queues, ret); rte_free(ch_id); return ret; } @@ -283,7 +283,7 @@ dpaa_event_dev_configure(const struct rte_eventdev *dev) * can be created equals to number of lcore. */ rte_free(ch_id); - EVENTDEV_DRV_LOG("Configured eventdev devid=%d", dev->data->dev_id); + DPAA_EVENTDEV_INFO("Configured eventdev devid=%d", dev->data->dev_id); return 0; } @@ -291,7 +291,7 @@ dpaa_event_dev_configure(const struct rte_eventdev *dev) static int dpaa_event_dev_start(struct rte_eventdev *dev) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); return 0; @@ -300,14 +300,14 @@ dpaa_event_dev_start(struct rte_eventdev *dev) static void dpaa_event_dev_stop(struct rte_eventdev *dev) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); } static int dpaa_event_dev_close(struct rte_eventdev *dev) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); return 0; @@ -317,7 +317,7 @@ static void dpaa_event_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id, struct rte_event_queue_conf *queue_conf) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); RTE_SET_USED(queue_id); @@ -334,14 +334,14 @@ dpaa_event_queue_setup(struct rte_eventdev *dev, uint8_t queue_id, struct dpaa_eventdev *priv = dev->data->dev_private; struct dpaa_eventq *evq_info = &priv->evq_info[queue_id]; - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); switch (queue_conf->schedule_type) { case RTE_SCHED_TYPE_PARALLEL: case RTE_SCHED_TYPE_ATOMIC: break; case RTE_SCHED_TYPE_ORDERED: - EVENTDEV_DRV_ERR("Schedule type is not supported."); + DPAA_EVENTDEV_ERR("Schedule type is not supported."); return -1; } evq_info->event_queue_cfg = queue_conf->event_queue_cfg; @@ -353,7 +353,7 @@ dpaa_event_queue_setup(struct rte_eventdev *dev, uint8_t queue_id, static void dpaa_event_queue_release(struct rte_eventdev *dev, uint8_t queue_id) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); RTE_SET_USED(queue_id); @@ -363,7 +363,7 @@ static void dpaa_event_port_default_conf_get(struct rte_eventdev *dev, uint8_t port_id, struct rte_event_port_conf *port_conf) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); RTE_SET_USED(port_id); @@ -379,7 +379,7 @@ dpaa_event_port_setup(struct rte_eventdev *dev, uint8_t port_id, { struct dpaa_eventdev *eventdev = dev->data->dev_private; - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(port_conf); dev->data->ports[port_id] = &eventdev->ports[port_id]; @@ -390,7 +390,7 @@ dpaa_event_port_setup(struct rte_eventdev *dev, uint8_t port_id, static void dpaa_event_port_release(void *port) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(port); } @@ -466,7 +466,7 @@ dpaa_event_eth_rx_adapter_caps_get(const struct rte_eventdev *dev, { const char *ethdev_driver = eth_dev->device->driver->name; - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); @@ -491,14 +491,14 @@ dpaa_event_eth_rx_adapter_queue_add( struct dpaa_if *dpaa_intf = eth_dev->data->dev_private; int ret, i; - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); if (rx_queue_id == -1) { for (i = 0; i < dpaa_intf->nb_rx_queues; i++) { ret = dpaa_eth_eventq_attach(eth_dev, i, ch_id, queue_conf); if (ret) { - EVENTDEV_DRV_ERR( + DPAA_EVENTDEV_ERR( "Event Queue attach failed:%d\n", ret); goto detach_configured_queues; } @@ -508,7 +508,7 @@ dpaa_event_eth_rx_adapter_queue_add( ret = dpaa_eth_eventq_attach(eth_dev, rx_queue_id, ch_id, queue_conf); if (ret) - EVENTDEV_DRV_ERR("dpaa_eth_eventq_attach failed:%d\n", ret); + DPAA_EVENTDEV_ERR("dpaa_eth_eventq_attach failed:%d\n", ret); return ret; detach_configured_queues: @@ -527,14 +527,14 @@ dpaa_event_eth_rx_adapter_queue_del(const struct rte_eventdev *dev, int ret, i; struct dpaa_if *dpaa_intf = eth_dev->data->dev_private; - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); if (rx_queue_id == -1) { for (i = 0; i < dpaa_intf->nb_rx_queues; i++) { ret = dpaa_eth_eventq_detach(eth_dev, i); if (ret) - EVENTDEV_DRV_ERR( + DPAA_EVENTDEV_ERR( "Event Queue detach failed:%d\n", ret); } @@ -543,7 +543,7 @@ dpaa_event_eth_rx_adapter_queue_del(const struct rte_eventdev *dev, ret = dpaa_eth_eventq_detach(eth_dev, rx_queue_id); if (ret) - EVENTDEV_DRV_ERR("dpaa_eth_eventq_detach failed:%d\n", ret); + DPAA_EVENTDEV_ERR("dpaa_eth_eventq_detach failed:%d\n", ret); return ret; } @@ -551,7 +551,7 @@ static int dpaa_event_eth_rx_adapter_start(const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); RTE_SET_USED(eth_dev); @@ -563,7 +563,7 @@ static int dpaa_event_eth_rx_adapter_stop(const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) { - EVENTDEV_DRV_FUNC_TRACE(); + EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); RTE_SET_USED(eth_dev); @@ -603,7 +603,7 @@ dpaa_event_dev_create(const char *name) sizeof(struct dpaa_eventdev), rte_socket_id()); if (eventdev == NULL) { - EVENTDEV_DRV_ERR("Failed to create eventdev vdev %s", name); + DPAA_EVENTDEV_ERR("Failed to create eventdev vdev %s", name); goto fail; } @@ -631,7 +631,7 @@ dpaa_event_dev_probe(struct rte_vdev_device *vdev) const char *name; name = rte_vdev_device_name(vdev); - EVENTDEV_DRV_LOG("Initializing %s", name); + DPAA_EVENTDEV_INFO("Initializing %s", name); return dpaa_event_dev_create(name); } @@ -642,7 +642,7 @@ dpaa_event_dev_remove(struct rte_vdev_device *vdev) const char *name; name = rte_vdev_device_name(vdev); - EVENTDEV_DRV_LOG("Closing %s", name); + DPAA_EVENTDEV_INFO("Closing %s", name); return rte_event_pmd_vdev_uninit(name); } diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h index 583e46c..3994bd6 100644 --- a/drivers/event/dpaa/dpaa_eventdev.h +++ b/drivers/event/dpaa/dpaa_eventdev.h @@ -12,13 +12,6 @@ #define EVENTDEV_NAME_DPAA_PMD event_dpaa1 -#define EVENTDEV_DRV_LOG(fmt, args...) \ - DPAA_EVENTDEV_INFO(fmt, ## args) -#define EVENTDEV_DRV_FUNC_TRACE() \ - DPAA_EVENTDEV_DEBUG("%s() Called:\n", __func__) -#define EVENTDEV_DRV_ERR(fmt, args...) \ - DPAA_EVENTDEV_ERR("%s(): " fmt "\n", __func__, ## args) - #define DPAA_EVENT_MAX_PORTS 8 #define DPAA_EVENT_MAX_QUEUES 16 #define DPAA_EVENT_MIN_DEQUEUE_TIMEOUT 1 From patchwork Thu Aug 30 05:33:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145495 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp407111ljw; Wed, 29 Aug 2018 22:35:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaIy8l+xliION7oH8KzqVjzMHgO1gP1/OTeXQJVz2y6tVO2NFLAB7TKTXRdpnla92AK7D+D X-Received: by 2002:a1c:9945:: with SMTP id b66-v6mr651492wme.159.1535607331500; Wed, 29 Aug 2018 22:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535607331; cv=none; d=google.com; s=arc-20160816; b=k2BjLwFuTX5VXI7Y+fNm4b4bTS51zBW0yYIezqnPYRR9ug0Od2gH0heU2l18LDZpRw TA0Tr3+wlrfqmv4MGlac/3Fe9a8VronrZ2LmQQ/SaL3kHb58IMxtyhJlVx0RCEvCBZX8 2KfKSXXnF6pBYFjg+ZQ+3smyGC+dNRl8V1j9Zli6egs8LFYF8oOW2bRr2jfEkJ3THk54 yw4DkoTybN+TZw1SBvZUjx0qyyJsYsSZyEexhxzkk89FfI8f/Gcftpfk81W0q2IBzn91 iap7YiJonSAsNAxdji/TtVz0cJw91yKDgb1ZQX/9TMLxcv85Y9Sr47JXmH/3PonNxd4o wtnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=ElSI8/MafyvhjtEwqPrzEtQzq3WMUY4EoxWJ2Rld2t8=; b=vUJdKmBbD5Jz/fMRV+vF6Rq3xbKLNDYP8gNI8xA5Wi+PlvE0rMZzOGAuKyoUjHAxkv Dz+EI+/Gq73EE0R3gTJgoQKA6XBbJepZmFYSFKEHx9JTL8wLyGKTBGF9nEK+hOtmckE8 GxkGp+/+7wCJG81YtuWIqgalsqYLZjewDd72k+aDHS4wbDy2O2oKsO12BjZ96ibDvGBa FhYnxK0qMySjZ0dy5AKrfMom1GWmj5Xvziu2yFTJHZ/AXq+7tOzATF6IHQLCwSSYCpXx ualr9ArrL+/Z9hhUPt+SRLVWVspNBknLU9S1FD+JpPxq5rQJV7H2j67NRdPeTX3On20k xA6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=V4ch8zzD; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id h2-v6si4535439wrs.261.2018.08.29.22.35.31; Wed, 29 Aug 2018 22:35:31 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=V4ch8zzD; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D7FB4CA1; Thu, 30 Aug 2018 07:35:25 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70073.outbound.protection.outlook.com [40.107.7.73]) by dpdk.org (Postfix) with ESMTP id 73A702BF7 for ; Thu, 30 Aug 2018 07:35:22 +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=ElSI8/MafyvhjtEwqPrzEtQzq3WMUY4EoxWJ2Rld2t8=; b=V4ch8zzDb4YC3+Zv+FH5m4KCTB0xpU1ziQ5yHq3CtACDChoAYgPMcyJszMJjlGGhATHNx1kj8O4xYoASdLKxhVBDH1D7icI6xwsf1exJ9JLu1VHZp4sF3ctzB2mbKvJuCPE8FAcJZmMnsCdYNAuvMGfrhTIqCZD6sL45pNvMRCU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.143.30.134) by VI1PR0401MB2544.eurprd04.prod.outlook.com (2603:10a6:800:56::22) 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 05:35:20 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, nipun.gupta@nxp.com Date: Thu, 30 Aug 2018 11:03:16 +0530 Message-Id: <1535607196-26782-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535607196-26782-1-git-send-email-hemant.agrawal@nxp.com> References: <1535607196-26782-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: BM1PR01CA0082.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::22) To VI1PR0401MB2544.eurprd04.prod.outlook.com (2603:10a6:800:56::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b28ff111-0657-4b71-f17d-08d60e3a60d3 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:VI1PR0401MB2544; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2544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gDjU9Yhit83cSZiIZ5eiooyFdJ9VfRrDC6+JlyWum8L/9EhL626fn+E00erLQ8xsPXU2g8Rx5fPEzCILPZ10U8CuomhqBfukLhNz9fxzQf0TiIGW8OtjVgYlKX4ELOT6RtcntPNwtJEScb9LrGaGFC0/UdZmM79oBTLoAIXZyyGNxQ7VcSk3p/ZWci1UW8pTejjkNG+7dPdzd+k255EO8gH2S4HeFN0MS8tGlsDwjQMMeVurW8REAzzbcP1bKRpea1NvjCgm8orj6mm/OvNyoQUvORzEjcF6hH7fYgdr9fiX9LgbDETDty5UXgzC/kXFWgnfepecd1BqDwVwC3R0rkA0awrm8a+7t; 4:FeIt0KAp9AvJZ9quqD07ewCLn6K6TSL0WlIljKKGQptdSZNEuIrFMIk4m/BJ2lG61MoAYGle23aajZzzbG4lMHcvLXmq/qX9bTtRGGrHpsvakFSszqcbsDpp2dwNuhwPsR28PfP+CWuRSKIdfaVlp8UK1rGLti2TFEL8PsMT0KpPJ4SO3c5cQjipsjtbAzykAkAdb/Rf2+AVJa5T43PPSUPyZypl5GGt4ZN+AM1NK8VwBrAxGbUAW8t7rOm8UgcrU7NWWGxpWScIHH/JRZAho6t9Wq5cYAjJE/qUplUq9ITq8uF8oQ//wfATpQHfYVzZhWHg0Wsi4E/UmCGHLtnHVLw0HvwxxD8YEgvNqkIkdW4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(3231311)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699016); SRVR:VI1PR0401MB2544; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2544; X-Forefront-PRVS: 07807C55DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39860400002)(346002)(396003)(136003)(199004)(189003)(4326008)(8936002)(5009440100003)(76176011)(6916009)(305945005)(3846002)(186003)(48376002)(16526019)(6666003)(478600001)(2361001)(25786009)(105586002)(68736007)(7736002)(47776003)(44832011)(50226002)(2351001)(106356001)(6116002)(66066001)(97736004)(36756003)(16586007)(51416003)(8676002)(6512007)(55236004)(81166006)(81156014)(386003)(6506007)(316002)(956004)(50466002)(26005)(5660300001)(2906002)(2616005)(6486002)(86362001)(53936002)(52116002)(11346002)(486006)(476003)(446003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2544; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0401MB2544; 23:3xgDq1FGqVT2WIPg1rTQCIUkL1/kdDGtsaLC+JZ?= mpQ6C9q3z/s++2xC0GdI05ssgvZzT/9rGssJGRIISE6PReUayz12tcmaR8ERxVcQP79og/mCotNIqxerZCzRcYwVpxUXUnOh6C3UlxlEMXEpxTdTM+iXBw48k0Y/NFYcmM1LvXcvKtV/0A18hBRlXQXuYE6aeTX/Nyt+XWEAokyuIaPBFnf0PbuPAlX45WDKaDr7CXYB9/ou52yMS81RP2XULQHbnfOi1s6nexXgluI4h2pC8UHTbqSHTvfNO1Zou8SIBvN5pwAw1ATH8MSQE/5bsNYNJo2PBHqyjBUHY7W5qITleIkomkq0RE8fmHi+SOTP7klMZPc6QeiBGDh4xzVqcqnKxdTgSubeZsoTiBz+PWPpS1Op7HCW2n/jzKGweRfQwbA8Mi0H7at70n1Mnz+NABh/fQ8Cl6lzwx3v+BFTa3x9ZRQvB1W7Ora3EoqqosTs6nOkZiLdO8k582fXSdMSFulpudrsNZeuLwtoHuCilLxDX6yOS5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2wqHjIRoTDPowclJjTfnLuIvKEGp7tTBqhF3kwmLeSmM2ehtP1yIBufTKU6v2zMvd8ysTorhmLXxiZs= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2544; 6:QtBjnkSVXXo/DbYHVphGH2wXR0wvLWl/SgYT18HZDSe85JvvcxlneawJe56c17vyxLfthCl174njp0wY1fTU7xyhPtFFtBg8Qulzn4GITdspqED375bZA1NXwLxBiIsjqlmSGSbcHsq+ZTKV0CNNp+GkSBDBdCssHdH9Ei9fPvr5LufSgYIMDL2OXMnAgcuF13icpDBbO3ehwppwjPjYm/RgA6C+MV4l6mmTSIcIkvGfCRja9b/ErHflmv72CQwdVdrMcv0WamX/G4G4XeuzTZEM2zrRFpuFdMaSWvo460ZWhmF9UxhneurgjCeNKIPnGoi8jiK17FZTUI4Y2oehWQ7JxqFbhcciERF/pSf1ewYHmbmaf3fPoyTxFoeDpVF/LcrzbUcUW+F+jqkHPEJkJevW6x6i8Kr9e7v5u3+784/37+tpzSvc+FATYRGloJHA9B/YBm9s+iOm+8XXEpA2Jg==; 5:c6eniW/pj+ad2hWHWrUpjNlXyyF97ENQpg9kgerdlO5n6I6ksA2NuFcJeDPBVwPWYkxupYxloDo0IKXqYGw8v40qyMTauI/dUGsvwUW+yiXJrn8jhafr8N/EwcC8e583GRiizfADCoImL+tAtrtC1o0YpWMMfOFjeOdhhdqJpgE=; 7:8tL1QTKdsgdmdGy+B9EBakY2CDGxnLz8k5xVPE/ciMOc9e8mgwnoKZkex/rKY/YRYQJCrp22mg/wJMq7L5IPRGd7X9hvWtMJ9oXYlKmGAoPXcx0O6ymAWBD5HARYyGeU9nLGoupM7D2wUj2U+vU41YnkCJ1WAq6Whc/gBWfL1jkY4rUP80+cxLIBybvDL0/ElzhP9DnKEyF6xZ+aqe9L0iV94i6eV3E7LbBRVhGN4B9CFoGCJAs+GKu/hKzee6OH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:35:20.7292 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b28ff111-0657-4b71-f17d-08d60e3a60d3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2544 Subject: [dpdk-dev] [PATCH 2/2] event/dpaa: add select based event support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Hemant Agrawal --- config/common_base | 1 + config/defconfig_arm64-dpaa-linuxapp-gcc | 1 + drivers/event/dpaa/dpaa_eventdev.c | 148 +++++++++++++++++++++++-------- drivers/event/dpaa/dpaa_eventdev.h | 8 +- 4 files changed, 115 insertions(+), 43 deletions(-) -- 2.7.4 diff --git a/config/common_base b/config/common_base index 4bcbaf9..01a6f17 100644 --- a/config/common_base +++ b/config/common_base @@ -199,6 +199,7 @@ CONFIG_RTE_LIBRTE_DPAA_BUS=n CONFIG_RTE_LIBRTE_DPAA_MEMPOOL=n CONFIG_RTE_LIBRTE_DPAA_PMD=n CONFIG_RTE_LIBRTE_DPAA_HWDEBUG=n +CONFIG_RTE_LIBRTE_DPAA_EVENT_INTR_MODE=n # # Compile NXP DPAA2 FSL-MC Bus diff --git a/config/defconfig_arm64-dpaa-linuxapp-gcc b/config/defconfig_arm64-dpaa-linuxapp-gcc index c47aec0..cdaaa4c 100644 --- a/config/defconfig_arm64-dpaa-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa-linuxapp-gcc @@ -21,3 +21,4 @@ CONFIG_RTE_PKTMBUF_HEADROOM=128 # NXP DPAA Bus CONFIG_RTE_LIBRTE_DPAA_DEBUG_DRIVER=n CONFIG_RTE_LIBRTE_DPAA_HWDEBUG=n +CONFIG_RTE_LIBRTE_DPAA_EVENT_INTR_MODE=y diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 9ddaf30..b82a8a9 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -47,14 +47,18 @@ static int dpaa_event_dequeue_timeout_ticks(struct rte_eventdev *dev, uint64_t ns, uint64_t *timeout_ticks) { - uint64_t cycles_per_second; - EVENTDEV_INIT_FUNC_TRACE(); RTE_SET_USED(dev); +#ifdef RTE_LIBRTE_DPAA_EVENT_INTR_MODE + *timeout_ticks = ns/1000; +#else + uint64_t cycles_per_second; + cycles_per_second = rte_get_timer_hz(); - *timeout_ticks = ns * (cycles_per_second / NS_PER_S); + *timeout_ticks = (ns * cycles_per_second) / NS_PER_S; +#endif return 0; } @@ -100,6 +104,58 @@ dpaa_event_enqueue(void *port, const struct rte_event *ev) return dpaa_event_enqueue_burst(port, ev, 1); } +#ifdef RTE_LIBRTE_DPAA_EVENT_INTR_MODE +static void drain_4_bytes(int fd, fd_set *fdset) +{ + if (FD_ISSET(fd, fdset)) { + /* drain 4 bytes */ + uint32_t junk; + ssize_t sjunk = read(qman_thread_fd(), &junk, sizeof(junk)); + if (sjunk != sizeof(junk)) + DPAA_EVENTDEV_ERR("UIO irq read error"); + } +} + +static inline int +dpaa_event_dequeue_wait(uint64_t timeout_ticks) +{ + int fd_qman, nfds; + int ret; + fd_set readset; + + /* Go into (and back out of) IRQ mode for each select, + * it simplifies exit-path considerations and other + * potential nastiness. + */ + struct timeval tv = { + .tv_sec = timeout_ticks / 1000000, + .tv_usec = timeout_ticks % 1000000 + }; + + fd_qman = qman_thread_fd(); + nfds = fd_qman + 1; + FD_ZERO(&readset); + FD_SET(fd_qman, &readset); + + qman_irqsource_add(QM_PIRQ_DQRI); + + ret = select(nfds, &readset, NULL, NULL, &tv); + if (ret < 0) + return ret; + /* Calling irqsource_remove() prior to thread_irq() + * means thread_irq() will not process whatever caused + * the interrupts, however it does ensure that, once + * thread_irq() re-enables interrupts, they won't fire + * again immediately. + */ + qman_irqsource_remove(~0); + drain_4_bytes(fd_qman, &readset); + qman_thread_irq(); + + return ret; +} +#endif + static uint16_t dpaa_event_dequeue_burst(void *port, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks) @@ -107,8 +163,8 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[], int ret; u16 ch_id; void *buffers[8]; - u32 num_frames, i; - uint64_t wait_time, cur_ticks, start_ticks; + u32 num_frames, i, irq = 0; + uint64_t cur_ticks = 0, wait_time_ticks = 0; struct dpaa_port *portal = (struct dpaa_port *)port; struct rte_mbuf *mbuf; @@ -147,20 +203,32 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[], } DPAA_PER_LCORE_DQRR_HELD = 0; - if (portal->timeout == DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_INVALID) - wait_time = timeout_ticks; + if (timeout_ticks) + wait_time_ticks = timeout_ticks; else - wait_time = portal->timeout; + wait_time_ticks = portal->timeout_us; - /* Lets dequeue the frames */ - start_ticks = rte_get_timer_cycles(); - wait_time += start_ticks; +#ifndef RTE_LIBRTE_DPAA_EVENT_INTR_MODE + wait_time_ticks += rte_get_timer_cycles(); +#endif do { + /* Lets dequeue the frames */ num_frames = qman_portal_dequeue(ev, nb_events, buffers); - if (num_frames != 0) + if (irq) + irq = 0; + if (num_frames) break; +#ifdef RTE_LIBRTE_DPAA_EVENT_INTR_MODE + if (wait_time_ticks) { /* wait for time */ + if (dpaa_event_dequeue_wait(wait_time_ticks) > 0) { + irq = 1; + continue; + } + break; /* no event after waiting */ + } +#endif cur_ticks = rte_get_timer_cycles(); - } while (cur_ticks < wait_time); + } while (cur_ticks < wait_time_ticks); return num_frames; } @@ -184,7 +252,7 @@ dpaa_event_dev_info_get(struct rte_eventdev *dev, dev_info->max_dequeue_timeout_ns = DPAA_EVENT_MAX_DEQUEUE_TIMEOUT; dev_info->dequeue_timeout_ns = - DPAA_EVENT_MIN_DEQUEUE_TIMEOUT; + DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_NS; dev_info->max_event_queues = DPAA_EVENT_MAX_QUEUES; dev_info->max_event_queue_flows = @@ -230,15 +298,6 @@ dpaa_event_dev_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 timetout value. - */ - priv->dequeue_timeout_ns = 0; - } - ch_id = rte_malloc("dpaa-channels", sizeof(uint32_t) * priv->nb_event_queues, RTE_CACHE_LINE_SIZE); @@ -260,24 +319,34 @@ dpaa_event_dev_configure(const struct rte_eventdev *dev) /* Lets prepare event ports */ memset(&priv->ports[0], 0, sizeof(struct dpaa_port) * priv->nb_event_ports); + + /* Check dequeue timeout method is per dequeue or global */ if (priv->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) { - for (i = 0; i < priv->nb_event_ports; i++) { - priv->ports[i].timeout = - DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_INVALID; - } - } else if (priv->dequeue_timeout_ns == 0) { - for (i = 0; i < priv->nb_event_ports; i++) { - dpaa_event_dequeue_timeout_ticks(NULL, - DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_NS, - &priv->ports[i].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 = DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_NS; } else { - for (i = 0; i < priv->nb_event_ports; i++) { - dpaa_event_dequeue_timeout_ticks(NULL, - priv->dequeue_timeout_ns, - &priv->ports[i].timeout); - } + priv->dequeue_timeout_ns = conf->dequeue_timeout_ns; } + + for (i = 0; i < priv->nb_event_ports; i++) { +#ifdef RTE_LIBRTE_DPAA_EVENT_INTR_MODE + priv->ports[i].timeout_us = priv->dequeue_timeout_ns/1000; +#else + uint64_t cycles_per_second; + + cycles_per_second = rte_get_timer_hz(); + priv->ports[i].timeout_us = + (priv->dequeue_timeout_ns * cycles_per_second) + / NS_PER_S; +#endif + } + /* * TODO: Currently portals are affined with threads. Maximum threads * can be created equals to number of lcore. @@ -454,7 +523,8 @@ dpaa_event_port_unlink(struct rte_eventdev *dev, void *port, event_queue->event_port = NULL; } - event_port->num_linked_evq = event_port->num_linked_evq - i; + if (event_port->num_linked_evq) + event_port->num_linked_evq = event_port->num_linked_evq - i; return (int)i; } diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h index 3994bd6..2021339 100644 --- a/drivers/event/dpaa/dpaa_eventdev.h +++ b/drivers/event/dpaa/dpaa_eventdev.h @@ -12,8 +12,8 @@ #define EVENTDEV_NAME_DPAA_PMD event_dpaa1 -#define DPAA_EVENT_MAX_PORTS 8 -#define DPAA_EVENT_MAX_QUEUES 16 +#define DPAA_EVENT_MAX_PORTS 4 +#define DPAA_EVENT_MAX_QUEUES 8 #define DPAA_EVENT_MIN_DEQUEUE_TIMEOUT 1 #define DPAA_EVENT_MAX_DEQUEUE_TIMEOUT (UINT32_MAX - 1) #define DPAA_EVENT_MAX_QUEUE_FLOWS 2048 @@ -21,7 +21,7 @@ #define DPAA_EVENT_MAX_EVENT_PRIORITY_LEVELS 0 #define DPAA_EVENT_MAX_EVENT_PORT RTE_MIN(RTE_MAX_LCORE, INT8_MAX) #define DPAA_EVENT_MAX_PORT_DEQUEUE_DEPTH 8 -#define DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_NS 100UL +#define DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_NS 100000UL #define DPAA_EVENT_PORT_DEQUEUE_TIMEOUT_INVALID ((uint64_t)-1) #define DPAA_EVENT_MAX_PORT_ENQUEUE_DEPTH 1 #define DPAA_EVENT_MAX_NUM_EVENTS (INT32_MAX - 1) @@ -54,7 +54,7 @@ struct dpaa_port { struct dpaa_eventq evq_info[DPAA_EVENT_MAX_QUEUES]; uint8_t num_linked_evq; uint8_t is_port_linked; - uint64_t timeout; + uint64_t timeout_us; }; struct dpaa_eventdev {