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 B413445561; Wed, 3 Jul 2024 14:17:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CBC440E7C; Wed, 3 Jul 2024 14:17:54 +0200 (CEST) Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012061.outbound.protection.outlook.com [52.101.66.61]) by mails.dpdk.org (Postfix) with ESMTP id 7134D4029E for ; Wed, 3 Jul 2024 14:17:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LznvFueTyZiozqUqgddDpXvwxZQkPKL3SNacpCZz8FlGG3JDpJKsckG8beLmJxvuz4dqoN/YNELqGDeNBt1GCSkLIYTZshShhn9NPGpQ2SFMHB5OtHfWX5WkIEXO6LU+q6kB7FfK1jkCoC2pOgVnFrk5tXOC1U5SsVzyX6HAmSVE1lnhu3Q9vd4o2T1OVI+lpqcn/5cr7IJBTT9K3mUtZ51zNLunI8p6Cu1SV167/IWbIYHdPGy3/vYOUi0RjKbhKNrWjsglUu2jtsAwcXNs/11HEH1lxjNw/vEU3Px2Xa5hA8ZpdzNuG95HFqvNPTeqdASLcdrV6XbWzbxQr2Q9pA== 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=O78gpBNhFpHqEL8intV5xOK369aNcBzJ4uqBEimfXOM=; b=haXhkyHFLogw6xGUGOtls5W6tydeppgEsqExWw6Szt/Wx3WTPCLM4G/nC4VHz1spVR0ndW+odMolkLym54Cfext1sw52bQFZe9v8AOL/I8hLgNfVc6OBbc9iuTwnH5Cc3Z/4+yn4zUT6Reo+WdGvtWP1svultX5AhUZop+BPkzqSZuoCKA/boi+KR6apv8MII/wCM9Ogc443iVz+1kthG+iX41Og2TaGuaXGcu8fEb1lW+quE6u7kRMlJiHe2xA5VxcNC5XYGxZD949VcDp+R+IJThajsI9TjBhSTfjp/Ska+CFpbUfO7F0Evp4f7cRsPVAj1ckWl45srwju6KjeMA== 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=O78gpBNhFpHqEL8intV5xOK369aNcBzJ4uqBEimfXOM=; b=aJZf/TT+jk5Yo2RNAgYrb+h7kt/wwuRLqEq3h1gB0I1H9W640suvCkeHm/dm6UhilbATqiegAHExhE+3IIqZ6sTky83LwVHv3trNh59kyfqrp7E9EtqoMdIn0M/wF+VPTEiDKPVjVI9isqEhT8Xh/L76BRniwKas66fpQzJEnfU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by AS8PR04MB7800.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 12:17:49 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%4]) with mapi id 15.20.7719.036; Wed, 3 Jul 2024 12:17:49 +0000 From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, stephen@networkplumber.org, david.marchand@redhat.com Subject: [PATCH v4 1/3] drivers: replace printf with log macros Date: Wed, 3 Jul 2024 17:46:12 +0530 Message-Id: <20240703121614.198015-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240702130856.3927348-1-hemant.agrawal@nxp.com> References: <20240702130856.3927348-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0027.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::14) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AS8PR04MB7800:EE_ X-MS-Office365-Filtering-Correlation-Id: 307f5de5-11cb-4f61-3190-08dc9b5a27c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?WSuRii39e9CpOM2oYmOQb6tR59n5fMI3XpjQL7YjQzQQxc/iEaNTlRQmgv54?= =?us-ascii?Q?XgsurFCSORWzlkwOv8RPOvaUO/wABHtCv7n2W+Iqq50NIQk+3M39/fjW/c1/?= =?us-ascii?Q?mr8DvW7FqW2x+W5BiFVl/fhNRAjh+OT6E9jzbwvOG+hS/HLr+CiTSUJr813I?= =?us-ascii?Q?Hbvem6BpiSzhuZHeOQKr88dVOxSdvnI8g5+dR+aHL0CSoQL9e371etC31/v6?= =?us-ascii?Q?s06dFhqJqkuWYTDO02ij30tBvHjfEz+YJc0SwVPsr7IGEnr44a7zs/KY+AYk?= =?us-ascii?Q?KgNKi7A444e5UMh7B/+o7GH7ANa1/nW+D8yi3wNUtl9SEtV0rMB2ZwCjV+uS?= =?us-ascii?Q?EoJK/vgAE6cMPfdAyaHoWpXnhm3wB3m69SshHgfVmWk7v0B1qrCkShQrl2Eq?= =?us-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P4FM0LG1df8Ha8sbeqNUlSefFSb+tMQ?= =?us-ascii?Q?LkNSl4eUDuoPAlylicUyf5xrmsfE+QB28CPBU+AXHPTWn2VrEOlM2dQMtx+e?= =?us-ascii?Q?DhaY+vAAj/ObL7+ihlA8a/6xg9yEdCwLxUKiVjEYLGJFNK60kw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(52116014)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RS2TN79Tq4tV49k52wFhExw5yPfZN1q/K+q2pOyuLuQFt6F46EtIQsGQ1pTX?= =?us-ascii?Q?pkKFNEJGdJdItzdfWcBL30HRhcCZoJbdpp4F4AHqB/B0qMlIDuLsa4KWi9TO?= =?us-ascii?Q?m4AdnX9UGlj43qCQDFK91tVfazEJUBb30Lkx5xT10ja2SkCkOK9efwj6n+oL?= =?us-ascii?Q?H9MTZubmP4Wbkcq5bLGWS1u/V+zQ6WLpKr+a8hWgwSmi/2mXiKurXyVjLoFX?= =?us-ascii?Q?8EapuMmWMDq9m2hdoplZSDSKe7ajBTVUBzRAkt/ZlkVbfbi4dmuvWtDZX7cw?= =?us-ascii?Q?DphJHOpV6CTnREezMb/80K50/eOgXLijObuyWvZ2q370hkgHJW6duWtr7e4B?= =?us-ascii?Q?yun5HwMz2JzIcOabHpQ0osgnC9MD9LS44exSGRXMthMXjC39NSIILOh4AMc+?= =?us-ascii?Q?0T8xcPLbmLHzSiwqaYG/SYeFp8Z5AitS/OBxVntGLclI9Hix0YPhzUnWbQAB?= =?us-ascii?Q?HNJGv5dXnra6Jqf0OCYWA5pxCaB4wwxzKM12HWAh1kyTz8/AVYVnjNTAtoOB?= =?us-ascii?Q?iq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wk73M6VbMtyyHlFjhMl5y?= =?us-ascii?Q?pkOqqBqYIqGFflR4Vwlcw6wTzYno2E/nlNq19WH2RCuFjtMbwDIJrxUA0SkM?= =?us-ascii?Q?aQYi50iIoFjRRnixUsqlSe7GeDvmQgjerTQYCrw8KYsq8HHhE/KOtNFxaQfP?= =?us-ascii?Q?offk+ghrbJqSLsxflZcV9FFMmz9xE6Xgd+YKSBDw9iidnTERJpYKF96QxV+k?= =?us-ascii?Q?Qg=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 307f5de5-11cb-4f61-3190-08dc9b5a27c0 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 12:17:49.8771 (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: 4AiW5+H7fchTGBQC5ONtG/GLZJ7RCQ2RlB+Q1YfBapcbgOl5OPuKAeltQeq3cqL19wXRZlqoUFEwWgb2fITJwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7800 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 | 6 ++---- 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 | 4 ++-- 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 | 12 +++++------ 12 files changed, 38 insertions(+), 39 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index 1814372a40..953f7d7061 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -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)", strerror(errno)); + DPAA_BUS_INFO("Tearing down %s", __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..59e0d641ce 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"); 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", 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"); else - printf("Failed to disable interrupt\n"); + DPAA_BUS_ERR("Failed to disable interrupt"); 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"); 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"); 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"); else - printf("Failed to get link status\n"); + DPAA_BUS_ERR("Failed to get link status"); 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"); 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"); else - printf("Failed to set link speed\n"); + DPAA_BUS_ERR("Failed to set link speed"); 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"); else - printf("Failed to restart autoneg\n"); + DPAA_BUS_ERR("Failed to restart autoneg"); return ret; } diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 6d2fbdcf02..b1166fcb1f 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -817,7 +817,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..9b50dca101 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)", 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 0fa70c978f..dd59fe8384 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -587,8 +587,8 @@ 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 - " sec_err =0x%x cidx Index =0%d\n", + CAAM_JR_ERR("false alarm %" PRIu64 "real %" PRIu64 + " sec_err =0x%x cidx Index =0%d", false_alarm, real_poll, sec_error_code, job_ring->cidx); rte_panic("CAAM JR descriptor NULL"); diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c index 583ba3b523..0dcf971a15 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", 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 935a4f2ada..093f9a8ff9 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"); else - printf("Failed to enable interrupt\n"); + DPAA_PMD_ERR("Failed to enable interrupt"); } 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"); } } diff --git a/drivers/net/dpaa/dpaa_flow.c b/drivers/net/dpaa/dpaa_flow.c index 690ba6bcb3..b78477a59a 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"); } if (dpaa_fm_term()) - printf("\nDPAA FM term failed\n"); + DPAA_PMD_ERR("DPAA FM term failed"); 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 97edc00420..449bbda7ca 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -2694,7 +2694,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"); 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..cb854964b4 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"); } } @@ -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", node->id); return -1; } @@ -590,9 +590,9 @@ 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, + "flow=%d err=%d", node->parent->channel_id, tc_id, ((node->parent->channel_id << 8) | tc_id), flow_id, ret); return -1; @@ -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.25.1