From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0063.outbound.protection.outlook.com [104.47.0.63]) by dpdk.org (Postfix) with ESMTP id 60E8B5F30 for ; Tue, 13 Mar 2018 06:30:38 +0100 (CET) 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; bh=XAEj2V6kJSe401eZh20/8SwpFnDLv/qTIbkkjAP8DXw=; b=ne2RHybQPhdnBozYtDNxEp8hEaB1rj7XtH3kBC0f3ShXDx3mT2iRG79aMtIf4Y/4TzxOegfJT0Kt664qvkvrjdKu/wY/Iiw96cEfhwEhCYKLO5sQUITAvIFL0zA8N2KphqxLOADAAOkYzS4h+aPVFR8wGs7StAvC66vFThTvPOo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from localhost.localdomain (14.142.187.166) by AM5PR0402MB2770.eurprd04.prod.outlook.com (2603:10a6:203:98::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.14; Tue, 13 Mar 2018 05:30:34 +0000 From: Shreyansh Jain To: ferruh.yigit@intel.com Cc: dev@dpdk.org, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com, Shreyansh Jain Date: Tue, 13 Mar 2018 11:14:28 +0530 Message-Id: <20180313054431.19556-5-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180313054431.19556-1-shreyansh.jain@nxp.com> References: <20180312092547.18472-1-shreyansh.jain@nxp.com> <20180313054431.19556-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: SG2PR0401CA0018.apcprd04.prod.outlook.com (2603:1096:3:1::28) To AM5PR0402MB2770.eurprd04.prod.outlook.com (2603:10a6:203:98::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c5063ed7-dc54-46ad-8507-08d588a38ce3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0402MB2770; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2770; 3:kwAabfde3StFtiH4Kt5O6AGRZLTUI1ltovfX/ngnWBnbdDSWJeWnjUfqzuLScJRn/v1b9Az5nPSkzLPIcmNmrwa2xNGYREsWdwa74SNkHovPFK1FmcBPON29/GxgsUFJtqxIZF+h+XclF20KTBF7ModcxbK4KlK1a67jXKY8ujKiCxqycdB/kduTcbYFpeeBskwM/IR1aB8P5trrFqKEdgry2QUpZyVCguYAEGa8fLxd+MFEHEY1gW6fiDVdpn4U; 25:muzyNQx3S5n+IV6IRpYD7IuPnx9PEjrtTU2J7qIkxsPrp8zKw6OsHqkWO6sZgbb+T/dcF+wE2evHrfw7vCTIFO84NRIvEzQVafj8rt67x2MLGYHIBH5tXXt+WyrN2kWk/uCedvx4kq4RIWVsxG0GMzO/f6i1xLk7Jo0uAdbFPhSODERdudR9OX/Hjer9r3TKXwGyv6qy+qjU4fwpeFfrEQE7gSRi1iDUHqOfdvA+wvO9TxrpmBpa3MFObU9rZ6pn296gpPJXPhnN7wh5PyfvO/oap5t8onZIsaec3SawsDXaGbYOtVr6dX/fcfKl5Z9VBL98bn+5aaF0gAmFn4Tt6g==; 31:7ESUu0J+nrxHBh3jsUGWBW2kPEM75ResNJKk31Fl07m8TA1lGbFBqo8odbz/1OpCVZXSktKsmuuVbk0AUV23ajj1OTmf5LoO8tx+x5r88GG1M5c6lz/BZ5QPkO1PW1379IXI2B9rkBeVmOjnWW0TWmgg/fK6eIHC9XBQzFZ5QDPIzYXBgMLe0jAB+IJf0kXwPGYpRSXppG5sgM1ZCFrrreuu/53/IkERGOm1x+l5dnU= X-MS-TrafficTypeDiagnostic: AM5PR0402MB2770: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2770; 20:DMK/ID1WGoFoQQsiNr4aho70T3fTJlz8d4dfw/Jh/0gQs4cPQQV0TNxwa/rSQZbW5Kfk+IcH6B3n0fX1Xqop5NHS7L9o4rkKdWdjF8hTDaX5dGyTM/tEiTuc94hfRbya1sUSzynwD0Mn1eqQZeNoKFfQEAJo17I4ptK8JtZHmUikilgistT1S5jBcRX2ajbLduUGSZcPFmsOe+ImG5i3tj1bFpc6eGrToUNGicBJx6t7u0GCh+Qb780hvd4EaueoswxMOYY5U9luZ3msCeNseLe89vhSpcD99OVypMI2CUIAvkHW3dPZ8lofamKqEE7XqBzu9h1xTdHNkZjv/DFhX9Xei6RV4ZckMtQzgxpZTwHFO1aGHtVJ7MQlHMl+XENa21Azj24331EZPZ40uBiY0KzAcKUyquSE4ImppF5XuilMbgw+k8z3OtBiyUCWZGP/6DtO3lc8/75eGKIDHvYoWYf5jC43395tM3tRmj70DS9+aUDfc9QSINs8gLuQQ8eo; 4:T37YgD/wat6YFNKnwIQkSN0otojzwzrMfCCk2aw3fDqrQsBmm1U2tS+L+CpWNlGEONP81DQ3uImhObYG1aJ4rnLQbF/G8coS4X9NE8tF6qEu9NHqd09ONVRdf3H9b5UL9KH+W5wTAo9r9EPA7KsiAWaRqQpESnfalBa4P58AfRHbOEOakItgSAyhrcj8QWXVAhEhsILQTCeJ/VUfLWpRavM7Ve2eWmbBnV20+LYeMM579IfYtVinhVB9YFRdyNUxgsT86jOxno0ERVZ9y6wBssgTyoKZ/bw5c2HdcJw7w1du0Od50LlXKRCbteI1Bq6WuJPsuPuhiyGws7QQXvDukJjwxQWkRSBxWrx4SlRJrSo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501244)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM5PR0402MB2770; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0402MB2770; X-Forefront-PRVS: 0610D16BBE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(376002)(39380400002)(396003)(39860400002)(346002)(189003)(199004)(6512007)(68736007)(55236004)(2351001)(5890100001)(386003)(6506007)(66066001)(6486002)(97736004)(48376002)(7736002)(25786009)(26005)(5660300001)(4326008)(50226002)(8936002)(16586007)(47776003)(106356001)(50466002)(2361001)(8676002)(316002)(305945005)(81166006)(5009440100003)(81156014)(3846002)(6116002)(16526019)(53936002)(86362001)(6666003)(105586002)(36756003)(1076002)(6916009)(186003)(2950100002)(59450400001)(2906002)(51416003)(52116002)(478600001)(76176011)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0402MB2770; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0402MB2770; 23:Dmzz1LnxB633twnO8Rsse7Fvkk5j0dgmruBTZNf?= =?us-ascii?Q?zgOGvYBEQVZT20wn74Jh5F72Fziu6XYkHd9Jx6hh/WxdcGqHBF2MrrJhG8jA?= =?us-ascii?Q?lCV1LuPaOdUv/AHNRyHlKpypNW2cKy4YMiilT+CIrKqH6Ob4AqcRD3lkUC0u?= =?us-ascii?Q?pvD1BAVkld9b/GO1RfrohPzJg00z8fyDh241q0tEqjzqHvtaZ2nFX3mW7CXl?= =?us-ascii?Q?djbrz/beTrgqY2Yfow9qQ6UX+vAcyuULMOQA+rfoO7bx8IBPBYV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610SwxTERM8fvGaku3HtvqCaxW/Hi+M1H52T3ZGzJ8yqNZdSiQ2e616r+SQ+to=; 7:/seVI61F/F9lMqi9L7+AOJjH1FDG1uBaMfgj8wAG8yLT71kNwnnUdHWIWe93B/hTFTWIRIdfesfQFezNAvdGAUMnAYIz2fWZZJeuZG0z1ge4DNWJi2SV6f11FlmDI5RP7js9ZOsJNpms9awY7Nab9l40NnZMwLKfaioj3HttXVlT2te1A5bq7vMREiiuCymldzUysgtmeN8K2HGy7IztQFFliq8RcB6XW2k39EJwg61gYXQsTYo2EUUm+ZLZGPi5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2018 05:30:34.5842 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5063ed7-dc54-46ad-8507-08d588a38ce3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2770 Subject: [dpdk-dev] [RESEND v2 4/7] event/dpaa2: change to dynamic logging 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: Tue, 13 Mar 2018 05:30:38 -0000 Some changes had already been pushed via SHA:72654f090a11 patch. This patch updates them. Cc: nipun.gupta@nxp.com Signed-off-by: Shreyansh Jain --- doc/guides/eventdevs/dpaa2.rst | 14 ++++++++- drivers/event/dpaa2/dpaa2_eventdev.c | 49 +++++++++++++++++++------------ drivers/event/dpaa2/dpaa2_eventdev_logs.h | 10 ++++--- drivers/event/dpaa2/dpaa2_hw_dpcon.c | 15 +++++----- 4 files changed, 57 insertions(+), 31 deletions(-) diff --git a/doc/guides/eventdevs/dpaa2.rst b/doc/guides/eventdevs/dpaa2.rst index 5b8da95d7..ad94f24be 100644 --- a/doc/guides/eventdevs/dpaa2.rst +++ b/doc/guides/eventdevs/dpaa2.rst @@ -129,7 +129,19 @@ Example: .. code-block:: console - ./your_eventdev_application --vdev="event_dpaa2" + ./your_eventdev_application --vdev="event_dpaa2" + +Enabling logs +------------- + +For enabling logs, use the following EAL parameter: + +.. code-block:: console + + ./your_eventdev_application --log-level=pmd.event.dpaa2, + +Using ``eventdev.dpaa2`` as log matching criteria, all Event PMD logs can be +enabled which are lower than logging ``level``. Limitations ----------- diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 8800b47f5..9d9c8d3db 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -72,7 +72,7 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_EVENTDEV_ERR("Failure in affining portal\n"); + DPAA2_EVENTDEV_ERR("Failure in affining portal"); return 0; } } @@ -122,7 +122,8 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], if (!loop) return num_tx; frames_to_send = loop; - DPAA2_EVENTDEV_ERR("Unable to allocate memory"); + DPAA2_EVENTDEV_ERR( + "Unable to allocate event object"); goto send_partial; } rte_memcpy(ev_temp, event, sizeof(struct rte_event)); @@ -167,9 +168,9 @@ static void dpaa2_eventdev_dequeue_wait(uint64_t timeout_ticks) * case to avoid the problem. */ if (errno == EINTR) { - DPAA2_EVENTDEV_DEBUG("epoll_wait fails\n"); + DPAA2_EVENTDEV_DEBUG("epoll_wait fails"); if (i++ > 10) - DPAA2_EVENTDEV_DEBUG("Dequeue burst Failed\n"); + DPAA2_EVENTDEV_DEBUG("Dequeue burst Failed"); goto RETRY; } } @@ -227,7 +228,7 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[], if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_EVENTDEV_ERR("Failure in affining portal\n"); + DPAA2_EVENTDEV_ERR("Failure in affining portal"); return 0; } } @@ -263,7 +264,7 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[], rxq->cb(swp, fd, dq, rxq, &ev[num_pkts]); } else { qbman_swp_dqrr_consume(swp, dq); - DPAA2_EVENTDEV_ERR("Null Return VQ received\n"); + DPAA2_EVENTDEV_ERR("Null Return VQ received"); return 0; } @@ -335,7 +336,7 @@ dpaa2_eventdev_configure(const struct rte_eventdev *dev) priv->event_dev_cfg = conf->event_dev_cfg; DPAA2_EVENTDEV_DEBUG("Configured eventdev devid=%d", - dev->data->dev_id); + dev->data->dev_id); return 0; } @@ -502,8 +503,8 @@ dpaa2_eventdev_port_link(struct rte_eventdev *dev, void *port, CMD_PRI_LOW, dpaa2_portal->dpio_dev->token, evq_info->dpcon->dpcon_id, &channel_index); if (ret < 0) { - DPAA2_EVENTDEV_ERR("Static dequeue cfg failed with ret: %d\n", - ret); + DPAA2_EVENTDEV_ERR( + "Static dequeue config failed: err(%d)", ret); goto err; } @@ -587,8 +588,8 @@ dpaa2_eventdev_eth_queue_add_all(const struct rte_eventdev *dev, ret = dpaa2_eth_eventq_attach(eth_dev, i, dpcon_id, queue_conf); if (ret) { - DPAA2_EVENTDEV_ERR("dpaa2_eth_eventq_attach failed: ret %d\n", - ret); + DPAA2_EVENTDEV_ERR( + "Event queue attach failed: err(%d)", ret); goto fail; } } @@ -620,7 +621,8 @@ dpaa2_eventdev_eth_queue_add(const struct rte_eventdev *dev, ret = dpaa2_eth_eventq_attach(eth_dev, rx_queue_id, dpcon_id, queue_conf); if (ret) { - DPAA2_EVENTDEV_ERR("dpaa2_eth_eventq_attach failed: ret: %d\n", ret); + DPAA2_EVENTDEV_ERR( + "Event queue attach failed: err(%d)", ret); return ret; } return 0; @@ -639,8 +641,8 @@ dpaa2_eventdev_eth_queue_del_all(const struct rte_eventdev *dev, for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { ret = dpaa2_eth_eventq_detach(eth_dev, i); if (ret) { - DPAA2_EVENTDEV_ERR("dpaa2_eth_eventq_detach failed: ret %d\n", - ret); + DPAA2_EVENTDEV_ERR( + "Event queue detach failed: err(%d)", ret); return ret; } } @@ -662,7 +664,8 @@ dpaa2_eventdev_eth_queue_del(const struct rte_eventdev *dev, ret = dpaa2_eth_eventq_detach(eth_dev, rx_queue_id); if (ret) { - DPAA2_EVENTDEV_ERR("dpaa2_eth_eventq_detach failed: ret: %d\n", ret); + DPAA2_EVENTDEV_ERR( + "Event queue detach failed: err(%d)", ret); return ret; } @@ -743,7 +746,8 @@ dpaa2_eventdev_setup_dpci(struct dpaa2_dpci_dev *dpci_dev, &rx_queue_cfg); if (ret) { DPAA2_EVENTDEV_ERR( - "set_rx_q failed with err code: %d", ret); + "DPCI Rx queue setup failed: err(%d)", + ret); return ret; } } @@ -763,7 +767,7 @@ dpaa2_eventdev_create(const char *name) sizeof(struct dpaa2_eventdev), rte_socket_id()); if (eventdev == NULL) { - DPAA2_EVENTDEV_ERR("Failed to create eventdev vdev %s", name); + DPAA2_EVENTDEV_ERR("Failed to create Event device %s", name); goto fail; } @@ -798,7 +802,7 @@ dpaa2_eventdev_create(const char *name) ret = dpaa2_eventdev_setup_dpci(dpci_dev, dpcon_dev); if (ret) { DPAA2_EVENTDEV_ERR( - "dpci setup failed with err code: %d", ret); + "DPCI setup failed: err(%d)", ret); return ret; } priv->max_event_queues++; @@ -836,3 +840,12 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = { }; RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd); + +RTE_INIT(dpaa2_eventdev_init_log); +static void +dpaa2_eventdev_init_log(void) +{ + dpaa2_logtype_event = rte_log_register("pmd.event.dpaa2"); + if (dpaa2_logtype_event >= 0) + rte_log_set_level(dpaa2_logtype_event, RTE_LOG_NOTICE); +} diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h index 7d250c3f1..48f1abd1f 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h +++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h @@ -9,13 +9,15 @@ extern int dpaa2_logtype_event; #define DPAA2_EVENTDEV_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, dpaa2_logtype_event, "%s(): " fmt "\n", \ - __func__, ##args) + rte_log(RTE_LOG_ ## level, dpaa2_logtype_event, "dpaa2_event: " \ + fmt "\n", ##args) + +#define DPAA2_EVENTDEV_DEBUG(fmt, args...) \ + rte_log(RTE_LOG_DEBUG, dpaa2_logtype_event, "dpaa2_event: %s(): " \ + fmt "\n", __func__, ##args) #define EVENTDEV_INIT_FUNC_TRACE() DPAA2_EVENTDEV_LOG(DEBUG, " >>") -#define DPAA2_EVENTDEV_DEBUG(fmt, args...) \ - DPAA2_EVENTDEV_LOG(DEBUG, fmt, ## args) #define DPAA2_EVENTDEV_INFO(fmt, args...) \ DPAA2_EVENTDEV_LOG(INFO, fmt, ## args) #define DPAA2_EVENTDEV_ERR(fmt, args...) \ diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index f2377b983..d64e588aa 100644 --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c @@ -20,11 +20,11 @@ #include #include -#include #include #include #include #include "dpaa2_eventdev.h" +#include "dpaa2_eventdev_logs.h" TAILQ_HEAD(dpcon_dev_list, dpaa2_dpcon_dev); static struct dpcon_dev_list dpcon_dev_list @@ -42,7 +42,8 @@ rte_dpaa2_create_dpcon_device(int dev_fd __rte_unused, /* Allocate DPAA2 dpcon handle */ dpcon_node = rte_malloc(NULL, sizeof(struct dpaa2_dpcon_dev), 0); if (!dpcon_node) { - PMD_DRV_LOG(ERR, "Memory allocation failed for DPCON Device"); + DPAA2_EVENTDEV_ERR( + "Memory allocation failed for dpcon device"); return -1; } @@ -51,8 +52,8 @@ rte_dpaa2_create_dpcon_device(int dev_fd __rte_unused, ret = dpcon_open(&dpcon_node->dpcon, CMD_PRI_LOW, dpcon_id, &dpcon_node->token); if (ret) { - PMD_DRV_LOG(ERR, "Resource alloc failure with err code: %d", - ret); + DPAA2_EVENTDEV_ERR("Unable to open dpcon device: err(%d)", + ret); rte_free(dpcon_node); return -1; } @@ -61,8 +62,8 @@ rte_dpaa2_create_dpcon_device(int dev_fd __rte_unused, ret = dpcon_get_attributes(&dpcon_node->dpcon, CMD_PRI_LOW, dpcon_node->token, &attr); if (ret != 0) { - PMD_DRV_LOG(ERR, "Reading device failed with err code: %d", - ret); + DPAA2_EVENTDEV_ERR("dpcon attribute fetch failed: err(%d)", + ret); rte_free(dpcon_node); return -1; } @@ -75,8 +76,6 @@ rte_dpaa2_create_dpcon_device(int dev_fd __rte_unused, TAILQ_INSERT_TAIL(&dpcon_dev_list, dpcon_node, next); - RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpcon.%d]\n", dpcon_id); - return 0; } -- 2.14.1