From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5C3141CA4; Wed, 15 Feb 2023 11:29:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7943C40EE3; Wed, 15 Feb 2023 11:29:26 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2087.outbound.protection.outlook.com [40.107.21.87]) by mails.dpdk.org (Postfix) with ESMTP id 15BC540A8B for ; Wed, 15 Feb 2023 11:29:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CIgIJM5WCtJxyngqCFdcbbPuYN+84PERW+9oJ7DbcqoJ1va0pOGWUZ1LRPs3hdBQBFkxcjH7OT5lXwY6ZiNphBD0bGQczmpOb3m9nBt7XSQU9A+k1WUlb1+z3pZo4N5ZILA3sgguxIlW8VLdSp5/3pDT3GtV67xsjVJ2hfBf3O+at0qf4qmhFgUHGVhlZHDdPVXa2wGenTvVRenGmzzjmiriQPYbXXk/oeDwa0sFd4A4zJcyyVpFultxxANdAgwXqUGzRtgNP6h3EVaPfk6MgvcZcmeGoAOPWQgkKCgmcurHyPkZvdXO99WH8O9DawcPntPgUH7lBZLgYv5GUl0AtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WenpKBcc46S9RtYfYq4acsDfhf8ekLzjIHGLp4q0hj0=; b=kmijOwl3gkv0fIjPoOgqulKpA+sM3JjPWHcxz6DFHB5egor1acQhICQyGMVHOdIXJoWr5kyraWe3+gPBc8erRVuMRfoIN2H2RQJ1vZkqWUXG0fSwe0lIkUI+3rMen+30ZVoKK5mCgBkLrV8IpfAlHgBp8crniX9PPONeB5xFFblbspVqorx/RdI1zVY1K/Oq5v/uimUZeiuRVWWGXhGbaniM+gB6jkp8XNRwX0l/rL5YmN1+Hy930LZGv+WKn54qlLcQKKXoK6yJghXi9ptrMcLS617d4xUcYpO3OTFby8/YrzK6XRc7QFqjK/ZwUDg76A6hFOWK/7WgWUoSv3HvTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WenpKBcc46S9RtYfYq4acsDfhf8ekLzjIHGLp4q0hj0=; b=LVo6cRCwB1cB8Pft7Jczb1QIUzDdGfr10Gav+oGwML1adja1ER0DUI3rR4hnwzd0H3Pp7WGCu4KH2CFlOU2eFYqq6KOlCD6FUnFXmvOG4Qh3MJnVRH5VeKN9WpmSrcbEQGwn+8yBIBPywizLMmYPJTxFv4Eah4MTDCie+ZIOsgY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB9064.eurprd04.prod.outlook.com (2603:10a6:20b:447::17) by PR3PR04MB7386.eurprd04.prod.outlook.com (2603:10a6:102:85::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26; Wed, 15 Feb 2023 10:29:22 +0000 Received: from AS8PR04MB9064.eurprd04.prod.outlook.com ([fe80::5430:ce3c:47b4:55cf]) by AS8PR04MB9064.eurprd04.prod.outlook.com ([fe80::5430:ce3c:47b4:55cf%8]) with mapi id 15.20.6086.024; Wed, 15 Feb 2023 10:29:22 +0000 From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net Subject: [PATCH 1/2] drivers: replace printf with log macros Date: Wed, 15 Feb 2023 15:59:04 +0530 Message-Id: <20230215102905.22767-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0108.apcprd02.prod.outlook.com (2603:1096:4:92::24) To AS8PR04MB9064.eurprd04.prod.outlook.com (2603:10a6:20b:447::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB9064:EE_|PR3PR04MB7386:EE_ X-MS-Office365-Filtering-Correlation-Id: 192e8b82-694d-41e5-ce92-08db0f3f80a8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cX3Say8tsMV1JhdeqjuUXEWY+xWG8OW2dJda88cBBskJVUYLcB/fdY7wGeKaOsVTNhmikHnLYfN/NGK8HXWfF9TEv2J/JG/9YvR7b4yKGpDvHJQ0C2mGETXCv8LNiEun0IJoonqv73OXEuL70qOwamdO6HNday82hBPfJNpLBoq1Bzj/owPdneUWr8djwRsyL533b3WCH8wwMPT6Q34xcQZY93BwbFtRqBDwzNd0dqqfnqFRcriIbqzRhz1IDMHGB1BOoE4hm9EPkRfSMHgjEQyMYXtt3GEjiSVwEdUTr3buQOouzX9zpwEObo5BGHYCxr792jtY0nmmcH+VJ0AnaNa1BUBpzUb7tc4nWlWbCr0kMIYxULChRLoQhgjFrLGYSv/dDHU4clu5KFl/gnMVCYJ6abK2xEqo5hWO428IRO0qRFdcAcAzQmG5k7rtAR9z3ZRgdlKXhZh0pWg8CVdp3TkS3WioZ4LdUIo2LTwowM1mnxzunPQtQHCIqLgY7gcEZlHiESxROnMy4IQrfPxE+Jlsr3ZV6lzFMrD1eZ+jmQNUsMLAF+y18pzBJXsM1bzeJ5SQm2cyEdDsMIb34mvI7qGFzJbSbA3yY9n/j3EgKpChjbfdzc92dBqaCEQaizq/LxLUP4yhr5buxZq9lk4ePNFII+X4WYudrQX9rN6Rd0S5EqfHJWo3BAV/we60IYKn0FgHAtVoWzm4biteioiNFA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB9064.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(366004)(136003)(346002)(396003)(376002)(451199018)(36756003)(86362001)(6666004)(8936002)(5660300002)(2906002)(478600001)(1076003)(186003)(6506007)(2616005)(26005)(6512007)(83380400001)(316002)(30864003)(66946007)(66476007)(44832011)(66556008)(8676002)(41300700001)(38100700002)(38350700002)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IDaUmNqt231R2OZoQAzHMTJaXDc58ccy12mP9mYlspTXzR1RRTr8MJjJe8Jt?= =?us-ascii?Q?rnJICQTyyHAd+pHRTEQ6I4KYRoM03lWXvslGKXFZ/8WO13los4xNwIaQNecP?= =?us-ascii?Q?fQUG3sPUr+4E4VA/ilq5n1xeVbyroLa0XNuv/cwQEK/vJe5690dbjDnaeUTw?= =?us-ascii?Q?z2fsDLtFkY8cY5jccpt+Wiew59kTY+ayM43KMUNOkqfLG4LhB0IqWZfcvVse?= =?us-ascii?Q?ZVtENjYkdP2o3z67AiF87qX9BQsj8K5qfZUXrXO155Kw5Kt94PmkMVrKQY+O?= =?us-ascii?Q?c3s/WjNVtq0dTs5BoiPINqQagX1zoZblBdSsOy7MDCDlsXY26qUXReQ9LVXS?= =?us-ascii?Q?5YB5ANAFAfFG2skSaSz97B3SLJx+CQjOSBvekxvhs+FzeJRpFNjYl3VQVHPF?= =?us-ascii?Q?w+vFos/dYlajaXkiNQdSUBtmwlBPoDd8UR6YuxqMlYjTWZA7hfnIo6otYaSm?= =?us-ascii?Q?kl2tvKx/qsjXJWSHQRZdyqFGAWlY70FBfHKG99eW0QhfgA24v5AIGO5+KAkn?= =?us-ascii?Q?c3ZKFQnonlrB4+MXC30anyfDCB0x4qVlJLTVKvXBZASAgHc5FavjlOzV/dZJ?= =?us-ascii?Q?i3ibEVsO2tcvYvL6OnDsID+Eek0Evxtz5Mm14/1hSrNq3JHv4KOGiCArBNBj?= =?us-ascii?Q?Bzbv2+UIQx/+vzbLc3FYiqGneyenHNx1/jOXzeQZVSUkJ6mcMFAtQdK3esAp?= =?us-ascii?Q?AdKs4PlGr8EbQy7PDIJsMLJ46OmkEHs5ysZ7pKtsKD3BDaLPL1eVNctgUzMV?= =?us-ascii?Q?+xbmPBcgz5pGbckPxroptRrwIj/eQQFB74Qmw0aVLUv68P7YN/4/LaLD8UOL?= =?us-ascii?Q?k6F06gwibQ6hbtP1ORayXXbuxUmNm4omzsNvnOfJTCI5mp/Jdn0XFVi/ZR3y?= =?us-ascii?Q?JJOmk+e8LgvveF+2szliEArXlb4iB7g9kKVUA1uPr1SzcqBR5+3l5Q5AIj+G?= =?us-ascii?Q?NaJ190wbMbvlvbplEFUQ3m6X9tbtxKULkqTPRQSoyg/dB/+B03pSu87JfaNI?= =?us-ascii?Q?mORVPtTLQG4py6wiRarKUL1bOMPVaWW15fX+P1T770KJ9CkAh5tQwHhtdegK?= =?us-ascii?Q?5HZL2lLNF/ifvMbZc+ySdmY7ESytbwbZELDGCxwc2yLIu4oBf0g3kEtm+Vdr?= =?us-ascii?Q?ta0l7KMS77P5BSTpZbLTNi01Q8hLRhcBeMc4x/+ARaVncFm35444e0ToGElE?= =?us-ascii?Q?bRsBEmvRtoA4hf8FpP/cNTeg9xrx0esqXx7NSLVzzTDsWGb5iR5tLy50Pl/I?= =?us-ascii?Q?sp2y7/8Pao5FNkWK8YZ4A2phqEovsdpVCYuGOWYOc07mTTmUO6dZXwGYJmBZ?= =?us-ascii?Q?MYIfyWzB82fFDdYnMqHyndouFwQqqdON2PuDrmNGVgRT/U6YOy8bPwcXakh7?= =?us-ascii?Q?TZD2f2oGviQkM3kWHPzNf1oWAL54+YkF4NCyp973RFlO7JXqVoiwfkdzFt2b?= =?us-ascii?Q?RzX6ZB7Bn6OjgcilW8KaS5WCtZqsK1pirk2JXhGm7e5KlGng0aNyfIRDbw6T?= =?us-ascii?Q?XP0kzEATM6lb84DTIjbGhBluTf8hpWrxlo4NHE0JUk21PcC/8oeVdmqDuGb8?= =?us-ascii?Q?hwAz/09jURUUUkMPwL196Zt/szfORQGNBIR0P0c6SxVC4QORKHHgEgJPCKbl?= =?us-ascii?Q?Yw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 192e8b82-694d-41e5-ce92-08db0f3f80a8 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB9064.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2023 10:29:22.7725 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9Fv7QZ+AmxEMlvWR3KVc8eUqI3CcMMl9q2dlfRRSrya9da+YQimLND8bQM8du12JlEB2Aje4g4JeyZilcHMVGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7386 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch replaces the printf with related log macros and functions at various places in NXP dpaaX drivers. Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman.c | 8 +++---- drivers/bus/dpaa/base/qbman/process.c | 29 +++++++++++++------------- drivers/bus/dpaa/base/qbman/qman.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/qbman/qbman_portal.c | 2 +- drivers/crypto/caam_jr/caam_jr.c | 2 +- drivers/crypto/caam_jr/caam_jr_uio.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 6 +++--- drivers/net/dpaa/dpaa_flow.c | 8 +++---- drivers/net/dpaa/dpaa_rxtx.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_tm.c | 10 ++++----- 12 files changed, 37 insertions(+), 38 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index 1814372a40..2fc1e64f36 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -425,7 +425,7 @@ fman_if_init(const struct device_node *dpa_node) char_prop = of_get_property(mac_node, "phy-connection-type", NULL); if (!char_prop) { - printf("memac: unknown MII type assuming 1G\n"); + FMAN_ERR(-EINVAL, "memac: unknown MII type assuming 1G\n"); /* Right now forcing memac to 1g in case of error*/ __if->__if.mac_type = fman_mac_1g; } else { @@ -723,10 +723,8 @@ fman_finish(void) /* release the mapping */ _errno = munmap(__if->ccsr_map, __if->regs_size); if (unlikely(_errno < 0)) - fprintf(stderr, "%s:%d:%s(): munmap() = %d (%s)\n", - __FILE__, __LINE__, __func__, - -errno, strerror(errno)); - printf("Tearing down %s\n", __if->node_path); + FMAN_ERR(_errno, "munmap() = (%s)\n", strerror(errno)); + DPAA_BUS_INFO("Tearing down %s\n", __if->node_path); list_del(&__if->__if.node); rte_free(__if); } diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c index 3504ec97db..af1e459641 100644 --- a/drivers/bus/dpaa/base/qbman/process.c +++ b/drivers/bus/dpaa/base/qbman/process.c @@ -13,6 +13,7 @@ #include "process.h" #include +#include "rte_dpaa_logs.h" /* As higher-level drivers will be built on top of this (dma_mem, qbman, ...), * it's preferable that the process driver itself not provide any exported API. @@ -99,12 +100,12 @@ void process_release(enum dpaa_id_type id_type, uint32_t base, uint32_t num) int ret = check_fd(); if (ret) { - fprintf(stderr, "Process FD failure\n"); + DPAA_BUS_ERR("Process FD failure\n"); return; } ret = ioctl(fd, DPAA_IOCTL_ID_RELEASE, &id); if (ret) - fprintf(stderr, "Process FD ioctl failure type %d base 0x%x num %d\n", + DPAA_BUS_ERR("Process FD ioctl failure type %d base 0x%x num %d\n", id_type, base, num); } @@ -333,9 +334,9 @@ int dpaa_intr_disable(char *if_name) ret = ioctl(fd, DPAA_IOCTL_DISABLE_LINK_STATUS_INTERRUPT, if_name); if (ret) { if (errno == EINVAL) - printf("Failed to disable interrupt: Not Supported\n"); + DPAA_BUS_ERR("Failed to disable interrupt: Not Supported\n"); else - printf("Failed to disable interrupt\n"); + DPAA_BUS_ERR("Failed to disable interrupt\n"); return ret; } @@ -357,7 +358,7 @@ int dpaa_get_ioctl_version_number(void) if (errno == EINVAL) { version_num = 1; } else { - printf("Failed to get ioctl version number\n"); + DPAA_BUS_ERR("Failed to get ioctl version number\n"); version_num = -1; } } @@ -388,7 +389,7 @@ int dpaa_get_link_status(char *if_name, struct rte_eth_link *link) ret = ioctl(fd, DPAA_IOCTL_GET_LINK_STATUS, &args); if (ret) { - printf("Failed to get link status\n"); + DPAA_BUS_ERR("Failed to get link status\n"); return ret; } @@ -404,9 +405,9 @@ int dpaa_get_link_status(char *if_name, struct rte_eth_link *link) ret = ioctl(fd, DPAA_IOCTL_GET_LINK_STATUS_OLD, &args); if (ret) { if (errno == EINVAL) - printf("Get link status: Not Supported\n"); + DPAA_BUS_ERR("Get link status: Not Supported\n"); else - printf("Failed to get link status\n"); + DPAA_BUS_ERR("Failed to get link status\n"); return ret; } @@ -434,9 +435,9 @@ int dpaa_update_link_status(char *if_name, int link_status) ret = ioctl(fd, DPAA_IOCTL_UPDATE_LINK_STATUS, &args); if (ret) { if (errno == EINVAL) - printf("Failed to set link status: Not Supported\n"); + DPAA_BUS_ERR("Failed to set link status: Not Supported\n"); else - printf("Failed to set link status"); + DPAA_BUS_ERR("Failed to set link status"); return ret; } @@ -462,9 +463,9 @@ int dpaa_update_link_speed(char *if_name, int link_speed, int link_duplex) ret = ioctl(fd, DPAA_IOCTL_UPDATE_LINK_SPEED, &args); if (ret) { if (errno == EINVAL) - printf("Failed to set link speed: Not Supported\n"); + DPAA_BUS_ERR("Failed to set link speed: Not Supported\n"); else - printf("Failed to set link speed\n"); + DPAA_BUS_ERR("Failed to set link speed\n"); return ret; } @@ -484,9 +485,9 @@ int dpaa_restart_link_autoneg(char *if_name) ret = ioctl(fd, DPAA_IOCTL_RESTART_LINK_AUTONEG, if_name); if (ret) { if (errno == EINVAL) - printf("Failed to restart autoneg: Not Supported\n"); + DPAA_BUS_ERR("Failed to restart autoneg: Not Supported\n"); else - printf("Failed to restart autoneg\n"); + DPAA_BUS_ERR("Failed to restart autoneg\n"); return ret; } diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 3949bf8712..95c796c4b8 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -818,7 +818,7 @@ qman_ern_poll_free(void) fd = &swapped_msg.ern.fd; if (unlikely(verb & 0x20)) { - printf("HW ERN notification, Nothing to do\n"); + pr_warn("HW ERN notification, Nothing to do\n"); } else { if ((fd->bpid & 0xff) != 0xff) qman_free_mbuf_cb(fd); diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 5966776a85..da0669d554 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -395,7 +395,7 @@ rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size) ret = ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA, &dma_map); if (ret) { - printf("Unable to map DMA address (errno = %d)\n", + DPAA2_BUS_ERR("Unable to map DMA address (errno = %d)\n", errno); return ret; } diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c index 3a7579c8a7..1f24cdce7e 100644 --- a/drivers/bus/fslmc/qbman/qbman_portal.c +++ b/drivers/bus/fslmc/qbman/qbman_portal.c @@ -1879,7 +1879,7 @@ void qbman_pull_desc_set_rad(struct qbman_pull_desc *d, int rad) else d->pull.verb &= ~(1 << QB_VDQCR_VERB_RAD_SHIFT); } else { - printf("The RAD feature is not valid when RLS = 0\n"); + pr_warn("The RAD feature is not valid when RLS = 0\n"); } } diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index b55258689b..9373cee57d 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -587,7 +587,7 @@ hw_poll_job_ring(struct sec_job_ring_t *job_ring, /* todo check if it is false alarm no desc present */ if (!current_desc_addr) { false_alarm++; - printf("false alarm %" PRIu64 "real %" PRIu64 + CAAM_JR_ERR("false alarm %" PRIu64 "real %" PRIu64 " sec_err =0x%x cidx Index =0%d\n", false_alarm, real_poll, sec_error_code, job_ring->cidx); diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c index 583ba3b523..586beceb14 100644 --- a/drivers/crypto/caam_jr/caam_jr_uio.c +++ b/drivers/crypto/caam_jr/caam_jr_uio.c @@ -418,7 +418,7 @@ sec_configure(void) d = opendir(SEC_UIO_DEVICE_SYS_ATTR_PATH); if (d == NULL) { - printf("\nError opening directory '%s': %s\n", + CAAM_JR_ERR("Error opening directory '%s': %s\n", SEC_UIO_DEVICE_SYS_ATTR_PATH, strerror(errno)); return -1; } diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index a6c86113d1..59bcebd62f 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -282,9 +282,9 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) dpaa_interrupt_handler, (void *)dev); if (ret == EINVAL) - printf("Failed to enable interrupt: Not Supported\n"); + DPAA_PMD_ERR("Failed to enable interrupt: Not Supported\n"); else - printf("Failed to enable interrupt\n"); + DPAA_PMD_ERR("Failed to enable interrupt\n"); } dev->data->dev_conf.intr_conf.lsc = 0; dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC; @@ -340,7 +340,7 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) dpaa_update_link_speed(__fif->node_name, speed, duplex); } else { /* Manual autoneg - custom advertisement speed. */ - printf("Custom Advertisement speeds not supported\n"); + DPAA_PMD_ERR("Custom Advertisement speeds not supported\n"); } } diff --git a/drivers/net/dpaa/dpaa_flow.c b/drivers/net/dpaa/dpaa_flow.c index 690ba6bcb3..5c75f4220e 100644 --- a/drivers/net/dpaa/dpaa_flow.c +++ b/drivers/net/dpaa/dpaa_flow.c @@ -68,7 +68,7 @@ static void fm_prev_cleanup(void) fm_info.fman_handle = fm_open(fman_id); if (!fm_info.fman_handle) { - printf("\n%s- unable to open FMAN", __func__); + DPAA_PMD_ERR("unable to open FMAN"); return; } @@ -78,7 +78,7 @@ static void fm_prev_cleanup(void) /* FM PCD Open */ fm_info.pcd_handle = fm_pcd_open(&fm_pcd_params); if (!fm_info.pcd_handle) { - printf("\n%s- unable to open PCD", __func__); + DPAA_PMD_ERR("unable to open PCD"); return; } @@ -108,11 +108,11 @@ static void fm_prev_cleanup(void) continue; if (dpaa_fm_deconfig(&dpaa_intf, NULL)) - printf("\nDPAA FM deconfig failed\n"); + DPAA_PMD_ERR("DPAA FM deconfig failed\n"); } if (dpaa_fm_term()) - printf("\nDPAA FM term failed\n"); + DPAA_PMD_ERR("DPAA FM term failed\n"); memset(&fm_model, 0, sizeof(struct dpaa_fm_model)); } diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index ce4f3d6c85..c2579d65ee 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -103,7 +103,7 @@ static void dpaa_display_frame_info(const struct qm_fd *fd, for (ii = 0; ii < fd->length20; ii++) { DISPLAY_PRINT("%02x ", ptr[ii]); if (((ii + 1) % 16) == 0) - printf("\n"); + DISPLAY_PRINT("\n"); } DISPLAY_PRINT("\n"); } diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 679f33ae1a..6f79f20d12 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -2682,7 +2682,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) priv->max_vlan_filters = attr.vlan_filter_entries; priv->flags = 0; #if defined(RTE_LIBRTE_IEEE1588) - printf("DPDK IEEE1588 is enabled\n"); + DPAA2_PMD_INFO("DPDK IEEE1588 is enabled\n"); priv->flags |= DPAA2_TX_CONF_ENABLE; #endif /* Used with ``fslmc:dpni.1,drv_tx_conf=1`` */ diff --git a/drivers/net/dpaa2/dpaa2_tm.c b/drivers/net/dpaa2/dpaa2_tm.c index 8fe5bfa013..cd6739dcfa 100644 --- a/drivers/net/dpaa2/dpaa2_tm.c +++ b/drivers/net/dpaa2/dpaa2_tm.c @@ -499,7 +499,7 @@ dpaa2_node_add(struct rte_eth_dev *dev, uint32_t node_id, node->channel_id = priv->channel_inuse; priv->channel_inuse++; } else { - printf("error no channel id available\n"); + DPAA2_PMD_ERR("error no channel id available\n"); } } @@ -580,7 +580,7 @@ dpaa2_tm_configure_queue(struct rte_eth_dev *dev, struct dpaa2_tm_node *node) flow_id = 0; if (dpaa2_q == NULL) { - printf("Queue is not configured for node = %d\n", node->id); + DPAA2_PMD_ERR("Queue is not configured for node = %d\n", node->id); return -1; } @@ -590,7 +590,7 @@ dpaa2_tm_configure_queue(struct rte_eth_dev *dev, struct dpaa2_tm_node *node) ((node->parent->channel_id << 8) | tc_id), flow_id, options, &tx_flow_cfg); if (ret) { - printf("Error in setting the tx flow: " + DPAA2_PMD_ERR("Error in setting the tx flow: " "channel id = %d tc_id= %d, param = 0x%x " "flow=%d err=%d\n", node->parent->channel_id, tc_id, ((node->parent->channel_id << 8) | tc_id), flow_id, @@ -605,7 +605,7 @@ dpaa2_tm_configure_queue(struct rte_eth_dev *dev, struct dpaa2_tm_node *node) DPNI_QUEUE_TX, ((node->parent->channel_id << 8) | dpaa2_q->tc_index), dpaa2_q->flow_id, &tx_flow_cfg, &qid); if (ret) { - printf("Error in getting LFQID err=%d", ret); + DPAA2_PMD_ERR("Error in getting LFQID err=%d", ret); return -1; } dpaa2_q->fqid = qid.fqid; @@ -636,7 +636,7 @@ dpaa2_tm_configure_queue(struct rte_eth_dev *dev, struct dpaa2_tm_node *node) ((node->parent->channel_id << 8) | tc_id), &cong_notif_cfg); if (ret) { - printf("Error in setting tx congestion notification: " + DPAA2_PMD_ERR("Error in setting tx congestion notification: " "err=%d", ret); return -ret; } -- 2.17.1