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 86E5E41CA4; Wed, 15 Feb 2023 11:29:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88CE443008; Wed, 15 Feb 2023 11:29:28 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2058.outbound.protection.outlook.com [40.107.21.58]) by mails.dpdk.org (Postfix) with ESMTP id 80EE7410DD for ; Wed, 15 Feb 2023 11:29:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G+Dg9HUQmreQZYybzwAuH2NblBcfhrOIJthA+r4PuIQo3X/x9R2LDjxm+Wi7cz2rhIRValj72bPaG6tVgSTKZIIh1E25NjWaccZb2rGRYR0tmXK+Y8//dD9sgCtb/O4P/lsFYm65bS3mMQBVCAAVhYyU3/zgOopvM1+3k0kT4tsOkWDW8wvA8/zN/vS2Jj9pHV3G8ad+UeROLjORVJX7iMxGL7kYg6r+kv4yrLnq8ndvgpCctL0U7luCbO4gtqEc8WeoVKx1MOQIkKeRDJsxV91srzeXCucAgWQKhiO4iZNasyLGK/YmTaN5LmVL/WfndLkuWFh2PnLVI7Y6LZ825g== 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=THtsg5ZJi6GLbIOe1fMeyCzRoZOJQqG0fsO6I0o+owk=; b=f8PaFBkUIrIIJ0UbWmdpCK9DO6WfP6zK71vEKf/FbfjiEOALFngTQqZagN940j/E1WzxT3DkSMAOuADaRjboL/K4mFE/dcIFfl28KTo8gOCJuDWEjynO5YIgs78XOdjLY/KISsl1sNMFTHHgIMDao7jiCCHZlvmiWQuOtVQvLIGWseNtf7i/6mpipVpiqR0xS84ZL6q/43PnrJiiuVr2dxKyNtHGaDaq+uKJWZcKSNDXhfUoDq2W6HHqnM9T0cgELVoNnZo1NufxRLiIzV6IN/UcVB9z5APoxHWVxbKbEfezdLszsaB9CCwoZa771q7g+1oWYWy6eErq7yZIErmAWw== 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=THtsg5ZJi6GLbIOe1fMeyCzRoZOJQqG0fsO6I0o+owk=; b=EJt+4vn5dtnC+iP9XczWHT6hhNEPz/HmnkgdCnGcOwhrCjkdX/LEBujb+2RbnxL3tm1zWFjxf3M9X34GnZ8k/Ar7+VfJfQzD8V2wsL6Js+B44jMfEf/ZniYGV0TY9+9e11oJPO58Ldy24dPzoxsxZo+Dy9TvJ9ca6zXD800/w6I= 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:24 +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:24 +0000 From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net Subject: [PATCH 2/2] drivers: replace printf with fprintf for debug functions Date: Wed, 15 Feb 2023 15:59:05 +0530 Message-Id: <20230215102905.22767-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230215102905.22767-1-hemant.agrawal@nxp.com> References: <20230215102905.22767-1-hemant.agrawal@nxp.com> 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: b13b3915-5590-405e-a7f7-08db0f3f81eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G9dR/bmyqJ2RvsTaJRRVxoRZ0x547v43aMQ8fw12Xys8ns+MV+5qa6rgqXtnUzhVhiKK6GnbdN5WMwBQjmJwNDi+fpN7kGFCD6euGJ7j2EdJSrED7kk9zZwYBZHxLRayLjpmto5DM7m2DqEgOonKlZOLoaDfXt3gD4G+NsdIfMxBTtXfgmbHrVG5r7Wfxc8xrbOelP6isj72oNlNejYa5B0HNe9Ds1optwdQASwoKrkAlh2DjrRZn0KypjeNyl7fRp8EAwjTHmX+LhDVfJVmsBMEHmtqE0Co09/+8mbrzaRZCsSaqRBb6oG3b2Ooo8Jgz/jzhfG1orKQO+qVrogyn9qoKY3MLUxzag2SDMAc7/WZT94JZgX+IrCxmq7G7376hmWZQt0HM2QlUgRkaTifHC/t2G/5zWX6OQJi4CRSJ228+JbXSGwMij4nJO/JsWkDAxgu9F8NAnEAwkdTUHVFSDI2eMZ2Q5Fypsmrdz8DfqQgjQhTfsyncy7TbvbfidGoehHgSH48qlEmEYWuELCgqdM8ojYl9LlePaSulwAi93AuyrSWmCTPcwZTpoic8reJSVPfvhv3cC+8OeEZbzfZVLlUL8jGZy9XwtB4D54eQv/16M0arfvRAAOmJYLxDkJodGxEMXMLgj5VbrXUIbSVgOZFTRMDcLSGiwHZmUqptvMRHdZ+SvW38GvyJnFJnezCmLMxP2Bykgem6t7UJjqa9w== 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?XVIa/dJaISqTbyI+iuaqFTAg3jBv6TGNiOww7JDRpiE309RJoET28jOWeZMQ?= =?us-ascii?Q?8Dic0WdkZKrNq87YjuJ3BY9WEXOr2Ze9P940n5VCh5abyH7FMjydcbOFgjpH?= =?us-ascii?Q?JSwyFiXZXxvpgrZMSY07enbx/LskkupZzqMXnH46sb4ttisthu84fTjZEMxi?= =?us-ascii?Q?IRONCHqEgSJ26p3G3RPQCUVEMYJHS9SmawVXUqQ7XeABku2o9fSIUFivQt6o?= =?us-ascii?Q?kayGKSR87m7hryusZoYooomMoKRGORWIwz8m2k7bH90Nt4sNB9rzNVLFdvzG?= =?us-ascii?Q?64z3KQU7f4L3w2M/iXVOV7p0At8WREcwBaU8NFFOoMi16PjThZKsW0n5rm3n?= =?us-ascii?Q?cIQ2lkd1zaScGXDBuykH96R6sIqZj6fKZsR/dbcRm3Jv9TdYb6z4qK2ezO5W?= =?us-ascii?Q?wC5f/PGUguMM2RFznifvXQ3ZDVLnHLG9e6RG47qpBTVgL2G6iKAmH465B6MG?= =?us-ascii?Q?cl0IBc2/77/41v8w6E+QlkavhdNCQpF0yi/0RLCIgwy/IH3ZMzjijzXz0d4h?= =?us-ascii?Q?SW2S0Df2M/xh8D7DhKuMfV+RWf459bx4AUH65QqOLq1yYk7AJYy8l4ALsXTn?= =?us-ascii?Q?vT5OltDizy2eV/RBMFm1ND48MadNXZ+Rf1UiKh0Cwn9H8igF/uxJkDuj6wD2?= =?us-ascii?Q?aMowoZoTNotMeBJ3u6dvpxPOhNm4rmk6zoB8s52jRyBdmXDw0MJludZ/PT38?= =?us-ascii?Q?YqlrJJvhqWsA6i1gsIkMXxK2PEccKU6bAJaUmhp0r+ISeEQ/oCbbzlN/jqk9?= =?us-ascii?Q?jbLq9WCwdqrVMEo/AsZto3/8WX+b8MPC3WuDkCTSUVwrn2Et4ypK/iznSetx?= =?us-ascii?Q?IVbj3N06xZd4eQnMEGCIFRzLLN1USh9u6Fdx9noteWGwe1R324PiY5VThTPV?= =?us-ascii?Q?fYt7fGZcBnjZKX8xlMyWoU6kAihCbI+8b7xGiGW0CQV9SDrvxsdyL43+tUAl?= =?us-ascii?Q?IhBxXY2TrjiOFtxyeU3waJFF0R5ZZhc8eczAp0WzeqISvoX6L3G6pdPSDixU?= =?us-ascii?Q?2Y+8fz7vWHdGs0f0x67k/iG8y+UdswhVU8KXLv8Puv90zbNMEU2EZgd+9K4w?= =?us-ascii?Q?ItEgQjcVY40ulQaXPYiJ408GDeZ7p0oQDbpl84kNL+dUURMFrQnHDb7fa8u4?= =?us-ascii?Q?HeAFdFX5Y9Jhh4QlmzMvgDd5zA6WXe3ShOTQppr10lLysji+BWEaRzwd6yc+?= =?us-ascii?Q?ngSTwEivNpLo6BZvwVARYXXIYqzPyyuuyfOocwqC9KPC+szz0pUICKA8rrIe?= =?us-ascii?Q?EOPKpfLgtWXlblHhmXR0S+GFXQ4SiWR/MQGrHOvamh9gKLgvhifjnA274rk5?= =?us-ascii?Q?+UMZJn/y77vt7GhkOGla2LSQ++7BLjHGdXbEFTydrbJtbLCNPgdwVHMDPBMB?= =?us-ascii?Q?EDbBttwXIEI/rHqUlJxSv7nMWaan/9ASJU1QUit82xXmAWC1DMzubpGU9NqO?= =?us-ascii?Q?uKm4Qv600Ux5NMyceLhjMp3S3gEEV5zZcVRT/fp6AUaAFV7EON0DbrNV9GXh?= =?us-ascii?Q?PFqtqkttk5SpXDM5AcRQnCxPukt8GpCK4BIQ9flmHOVaEXMUlxnuDoWE+rfe?= =?us-ascii?Q?JHX6ue3NIOiLwSv5lHo/2tSLP0/oddPepuRE9sMUhDAS2CA1m97c9pHl041e?= =?us-ascii?Q?Ww=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b13b3915-5590-405e-a7f7-08db0f3f81eb 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:24.6679 (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: vRqCibzbfFZF4Wkg5OrxTuVzGlwHgCSBVTSfpXDILqbushrjC6L4RE1wE6ATwWy2FfYHgi7VaWySzA/dz/enQw== 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 simple printf with fprintf for debug dump related functions for various NXP dpaaX related drivers. Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/netcfg_layer.c | 20 ++++---- drivers/crypto/caam_jr/caam_jr.c | 4 +- drivers/crypto/caam_jr/caam_jr_desc.h | 2 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 20 ++++---- drivers/crypto/dpaa_sec/dpaa_sec.c | 52 ++++++++++----------- drivers/net/dpaa2/dpaa2_flow.c | 40 ++++++++-------- 6 files changed, 69 insertions(+), 69 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/netcfg_layer.c b/drivers/bus/dpaa/base/fman/netcfg_layer.c index 6a405c984d..69cee08fb9 100644 --- a/drivers/bus/dpaa/base/fman/netcfg_layer.c +++ b/drivers/bus/dpaa/base/fman/netcfg_layer.c @@ -33,33 +33,33 @@ dump_netcfg(struct netcfg_info *cfg_ptr) { int i; - printf(".......... DPAA Configuration ..........\n\n"); + fprintf(stdout, ".......... DPAA Configuration ..........\n\n"); /* Network interfaces */ - printf("Network interfaces: %d\n", cfg_ptr->num_ethports); + fprintf(stdout, "Network interfaces: %d\n", cfg_ptr->num_ethports); for (i = 0; i < cfg_ptr->num_ethports; i++) { struct fman_if_bpool *bpool; struct fm_eth_port_cfg *p_cfg = &cfg_ptr->port_cfg[i]; struct fman_if *__if = p_cfg->fman_if; - printf("\n+ Fman %d, MAC %d (%s);\n", + fprintf(stdout, "\n+ Fman %d, MAC %d (%s);\n", __if->fman_idx, __if->mac_idx, (__if->mac_type == fman_mac_1g) ? "1G" : (__if->mac_type == fman_mac_2_5g) ? "2.5G" : "10G"); - printf("\tmac_addr: " RTE_ETHER_ADDR_PRT_FMT "\n", + fprintf(stdout, "\tmac_addr: " RTE_ETHER_ADDR_PRT_FMT "\n", RTE_ETHER_ADDR_BYTES(&__if->mac_addr)); - printf("\ttx_channel_id: 0x%02x\n", + fprintf(stdout, "\ttx_channel_id: 0x%02x\n", __if->tx_channel_id); - printf("\tfqid_rx_def: 0x%x\n", p_cfg->rx_def); - printf("\tfqid_rx_err: 0x%x\n", __if->fqid_rx_err); + fprintf(stdout, "\tfqid_rx_def: 0x%x\n", p_cfg->rx_def); + fprintf(stdout, "\tfqid_rx_err: 0x%x\n", __if->fqid_rx_err); - printf("\tfqid_tx_err: 0x%x\n", __if->fqid_tx_err); - printf("\tfqid_tx_confirm: 0x%x\n", __if->fqid_tx_confirm); + fprintf(stdout, "\tfqid_tx_err: 0x%x\n", __if->fqid_tx_err); + fprintf(stdout, "\tfqid_tx_confirm: 0x%x\n", __if->fqid_tx_confirm); fman_if_for_each_bpool(bpool, __if) - printf("\tbuffer pool: (bpid=%d, count=%"PRId64 + fprintf(stdout, "\tbuffer pool: (bpid=%d, count=%"PRId64 " size=%"PRId64", addr=0x%"PRIx64")\n", bpool->bpid, bpool->count, bpool->size, bpool->addr); diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index 9373cee57d..d19738b7bf 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -1410,9 +1410,9 @@ caam_jr_enqueue_op(struct rte_crypto_op *op, struct caam_jr_qp *qp) rte_pktmbuf_mtod(op->sym->m_src, void *), rte_pktmbuf_data_len(op->sym->m_src)); - printf("\n JD before conversion\n"); + fprintf(stdout, "\n JD before conversion\n"); for (i = 0; i < 12; i++) - printf("\n 0x%08x", ctx->jobdes.desc[i]); + fprintf(stdout, "\n 0x%08x", ctx->jobdes.desc[i]); #endif CAAM_JR_DP_DEBUG("Jr[%p] pi[%d] ci[%d].Before sending desc", diff --git a/drivers/crypto/caam_jr/caam_jr_desc.h b/drivers/crypto/caam_jr/caam_jr_desc.h index 135d51c392..1b6a8f9efa 100644 --- a/drivers/crypto/caam_jr/caam_jr_desc.h +++ b/drivers/crypto/caam_jr/caam_jr_desc.h @@ -116,7 +116,7 @@ for (__i = 0; \ __i < SEC_GET_DESC_LEN(descriptor); \ __i++) { \ - printf("0x%08x: 0x%08x\n", \ + fprintf(stdout, "0x%08x: 0x%08x\n", \ (uint32_t)(((uint32_t *)(descriptor)) + __i), \ *(((uint32_t *)(descriptor)) + __i)); \ } \ diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index c25e40030b..c707666f35 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1685,7 +1685,7 @@ dpaa2_sec_dump(struct rte_crypto_op *op) goto mbuf_dump; priv = (struct ctxt_priv *)sess->ctxt; - printf("\n****************************************\n" + fprintf(stdout, "\n****************************************\n" "session params:\n\tContext type:\t%d\n\tDirection:\t%s\n" "\tCipher alg:\t%d\n\tAuth alg:\t%d\n\tAead alg:\t%d\n" "\tCipher key len:\t%zd\n", sess->ctxt_type, @@ -1696,7 +1696,7 @@ dpaa2_sec_dump(struct rte_crypto_op *op) sess->cipher_key.length); rte_hexdump(stdout, "auth key", sess->auth_key.data, sess->auth_key.length); - printf("\tAuth key len:\t%zd\n\tIV len:\t\t%d\n\tIV offset:\t%d\n" + fprintf(stdout, "\tAuth key len:\t%zd\n\tIV len:\t\t%d\n\tIV offset:\t%d\n" "\tdigest length:\t%d\n\tstatus:\t\t%d\n\taead auth only" " len:\t%d\n\taead cipher text:\t%d\n", sess->auth_key.length, sess->iv.length, sess->iv.offset, @@ -1704,7 +1704,7 @@ dpaa2_sec_dump(struct rte_crypto_op *op) sess->ext_params.aead_ctxt.auth_only_len, sess->ext_params.aead_ctxt.auth_cipher_text); #ifdef RTE_LIBRTE_SECURITY - printf("PDCP session params:\n" + fprintf(stdout, "PDCP session params:\n" "\tDomain:\t\t%d\n\tBearer:\t\t%d\n\tpkt_dir:\t%d\n\thfn_ovd:" "\t%d\n\tsn_size:\t%d\n\thfn_ovd_offset:\t%d\n\thfn:\t\t%d\n" "\thfn_threshold:\t0x%x\n", sess->pdcp.domain, @@ -1714,29 +1714,29 @@ dpaa2_sec_dump(struct rte_crypto_op *op) #endif bufsize = (uint8_t)priv->flc_desc[0].flc.word1_sdl; - printf("Descriptor Dump:\n"); + fprintf(stdout, "Descriptor Dump:\n"); for (i = 0; i < bufsize; i++) - printf("\tDESC[%d]:0x%x\n", i, priv->flc_desc[0].desc[i]); + fprintf(stdout, "\tDESC[%d]:0x%x\n", i, priv->flc_desc[0].desc[i]); - printf("\n"); + fprintf(stdout, "\n"); mbuf_dump: sym_op = op->sym; if (sym_op->m_src) { - printf("Source mbuf:\n"); + fprintf(stdout, "Source mbuf:\n"); rte_pktmbuf_dump(stdout, sym_op->m_src, sym_op->m_src->data_len); } if (sym_op->m_dst) { - printf("Destination mbuf:\n"); + fprintf(stdout, "Destination mbuf:\n"); rte_pktmbuf_dump(stdout, sym_op->m_dst, sym_op->m_dst->data_len); } - printf("Session address = %p\ncipher offset: %d, length: %d\n" + fprintf(stdout, "Session address = %p\ncipher offset: %d, length: %d\n" "auth offset: %d, length: %d\n aead offset: %d, length: %d\n" , sym_op->session, sym_op->cipher.data.offset, sym_op->cipher.data.length, sym_op->auth.data.offset, sym_op->auth.data.length, sym_op->aead.data.offset, sym_op->aead.data.length); - printf("\n"); + fprintf(stdout, "\n"); } diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index db52683847..0a47c5c8ad 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -676,16 +676,16 @@ dpaa_sec_dump(struct dpaa_sec_op_ctx *ctx, struct dpaa_sec_qp *qp) sess = SECURITY_GET_SESS_PRIV(op->sym->session); #endif if (sess == NULL) { - printf("session is NULL\n"); + fprintf(stdout, "session is NULL\n"); goto mbuf_dump; } cdb = &sess->cdb; rte_memcpy(&c_cdb, cdb, sizeof(struct sec_cdb)); #ifdef RTE_LIBRTE_SECURITY - printf("\nsession protocol type = %d\n", sess->proto_alg); + fprintf(stdout, "\nsession protocol type = %d\n", sess->proto_alg); #endif - printf("\n****************************************\n" + fprintf(stdout, "\n****************************************\n" "session params:\n\tContext type:\t%d\n\tDirection:\t%s\n" "\tCipher alg:\t%d\n\tAuth alg:\t%d\n\tAead alg:\t%d\n" "\tCipher key len:\t%"PRIu64"\n\tCipher alg:\t%d\n" @@ -698,7 +698,7 @@ dpaa_sec_dump(struct dpaa_sec_op_ctx *ctx, struct dpaa_sec_qp *qp) sess->cipher_key.length); rte_hexdump(stdout, "auth key", sess->auth_key.data, sess->auth_key.length); - printf("\tAuth key len:\t%"PRIu64"\n\tAuth alg:\t%d\n" + fprintf(stdout, "\tAuth key len:\t%"PRIu64"\n\tAuth alg:\t%d\n" "\tAuth algmode:\t%d\n\tIV len:\t\t%d\n\tIV offset:\t%d\n" "\tdigest length:\t%d\n\tauth only len:\t\t%d\n" "\taead cipher text:\t%d\n", @@ -708,7 +708,7 @@ dpaa_sec_dump(struct dpaa_sec_op_ctx *ctx, struct dpaa_sec_qp *qp) sess->digest_length, sess->auth_only_len, sess->auth_cipher_text); #ifdef RTE_LIBRTE_SECURITY - printf("PDCP session params:\n" + fprintf(stdout, "PDCP session params:\n" "\tDomain:\t\t%d\n\tBearer:\t\t%d\n\tpkt_dir:\t%d\n\thfn_ovd:" "\t%d\n\tsn_size:\t%d\n\tsdap_enabled:\t%d\n\thfn_ovd_offset:" "\t%d\n\thfn:\t\t%d\n" @@ -722,63 +722,63 @@ dpaa_sec_dump(struct dpaa_sec_op_ctx *ctx, struct dpaa_sec_qp *qp) c_cdb.sh_hdr.lo.word = rte_be_to_cpu_32(c_cdb.sh_hdr.lo.word); bufsize = c_cdb.sh_hdr.hi.field.idlen; - printf("cdb = %p\n\n", cdb); - printf("Descriptor size = %d\n", bufsize); + fprintf(stdout, "cdb = %p\n\n", cdb); + fprintf(stdout, "Descriptor size = %d\n", bufsize); int m; for (m = 0; m < bufsize; m++) - printf("0x%x\n", rte_be_to_cpu_32(c_cdb.sh_desc[m])); + fprintf(stdout, "0x%x\n", rte_be_to_cpu_32(c_cdb.sh_desc[m])); - printf("\n"); + fprintf(stdout, "\n"); mbuf_dump: sym_op = op->sym; if (sym_op->m_src) { - printf("Source mbuf:\n"); + fprintf(stdout, "Source mbuf:\n"); rte_pktmbuf_dump(stdout, sym_op->m_src, sym_op->m_src->data_len); } if (sym_op->m_dst) { - printf("Destination mbuf:\n"); + fprintf(stdout, "Destination mbuf:\n"); rte_pktmbuf_dump(stdout, sym_op->m_dst, sym_op->m_dst->data_len); } - printf("Session address = %p\ncipher offset: %d, length: %d\n" + fprintf(stdout, "Session address = %p\ncipher offset: %d, length: %d\n" "auth offset: %d, length: %d\n aead offset: %d, length: %d\n", sym_op->session, sym_op->cipher.data.offset, sym_op->cipher.data.length, sym_op->auth.data.offset, sym_op->auth.data.length, sym_op->aead.data.offset, sym_op->aead.data.length); - printf("\n"); + fprintf(stdout, "\n"); - printf("******************************************************\n"); - printf("ctx info:\n"); - printf("job->sg[0] output info:\n"); + fprintf(stdout, "******************************************************\n"); + fprintf(stdout, "ctx info:\n"); + fprintf(stdout, "job->sg[0] output info:\n"); memcpy(&sg[0], &job->sg[0], sizeof(sg[0])); - printf("\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textension = %d" + fprintf(stdout, "\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textension = %d" "\n\tbpid = %d\n\toffset = %d\n", (uint64_t)sg[0].addr, sg[0].length, sg[0].final, sg[0].extension, sg[0].bpid, sg[0].offset); - printf("\njob->sg[1] input info:\n"); + fprintf(stdout, "\njob->sg[1] input info:\n"); memcpy(&sg[1], &job->sg[1], sizeof(sg[1])); hw_sg_to_cpu(&sg[1]); - printf("\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textension = %d" + fprintf(stdout, "\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textension = %d" "\n\tbpid = %d\n\toffset = %d\n", (uint64_t)sg[1].addr, sg[1].length, sg[1].final, sg[1].extension, sg[1].bpid, sg[1].offset); - printf("\nctx pool addr = %p\n", ctx->ctx_pool); + fprintf(stdout, "\nctx pool addr = %p\n", ctx->ctx_pool); if (ctx->ctx_pool) - printf("ctx pool available counts = %d\n", + fprintf(stdout, "ctx pool available counts = %d\n", rte_mempool_avail_count(ctx->ctx_pool)); - printf("\nop pool addr = %p\n", op->mempool); + fprintf(stdout, "\nop pool addr = %p\n", op->mempool); if (op->mempool) - printf("op pool available counts = %d\n", + fprintf(stdout, "op pool available counts = %d\n", rte_mempool_avail_count(op->mempool)); - printf("********************************************************\n"); - printf("Queue data:\n"); - printf("\tFQID = 0x%x\n\tstate = %d\n\tnb_desc = %d\n" + fprintf(stdout, "********************************************************\n"); + fprintf(stdout, "Queue data:\n"); + fprintf(stdout, "\tFQID = 0x%x\n\tstate = %d\n\tnb_desc = %d\n" "\tctx_pool = %p\n\trx_pkts = %d\n\ttx_pkts" "= %d\n\trx_errs = %d\n\ttx_errs = %d\n\n", qp->outq.fqid, qp->outq.state, qp->outq.nb_desc, diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c index df06c3862e..4d9fad1596 100644 --- a/drivers/net/dpaa2/dpaa2_flow.c +++ b/drivers/net/dpaa2/dpaa2_flow.c @@ -244,7 +244,7 @@ static inline void dpaa2_flow_qos_table_extracts_log( if (!dpaa2_flow_control_log) return; - printf("Setup QoS table: number of extracts: %d\r\n", + fprintf(stdout, "Setup QoS table: number of extracts: %d\r\n", priv->extract.qos_key_extract.dpkg.num_extracts); for (idx = 0; idx < priv->extract.qos_key_extract.dpkg.num_extracts; idx++) { @@ -253,11 +253,11 @@ static inline void dpaa2_flow_qos_table_extracts_log( priv->extract.qos_key_extract.dpkg.extracts[idx] .extract.from_hdr.field, string); - printf("%s", string); + fprintf(stdout, "%s", string); if ((idx + 1) < priv->extract.qos_key_extract.dpkg.num_extracts) - printf(" / "); + fprintf(stdout, " / "); } - printf("\r\n"); + fprintf(stdout, "\r\n"); } static inline void dpaa2_flow_fs_table_extracts_log( @@ -269,7 +269,7 @@ static inline void dpaa2_flow_fs_table_extracts_log( if (!dpaa2_flow_control_log) return; - printf("Setup FS table: number of extracts of TC[%d]: %d\r\n", + fprintf(stdout, "Setup FS table: number of extracts of TC[%d]: %d\r\n", tc_id, priv->extract.tc_key_extract[tc_id] .dpkg.num_extracts); for (idx = 0; idx < priv->extract.tc_key_extract[tc_id] @@ -279,12 +279,12 @@ static inline void dpaa2_flow_fs_table_extracts_log( priv->extract.tc_key_extract[tc_id].dpkg.extracts[idx] .extract.from_hdr.field, string); - printf("%s", string); + fprintf(stdout, "%s", string); if ((idx + 1) < priv->extract.tc_key_extract[tc_id] .dpkg.num_extracts) - printf(" / "); + fprintf(stdout, " / "); } - printf("\r\n"); + fprintf(stdout, "\r\n"); } static inline void dpaa2_flow_qos_entry_log( @@ -296,21 +296,21 @@ static inline void dpaa2_flow_qos_entry_log( if (!dpaa2_flow_control_log) return; - printf("\r\n%s QoS entry[%d] for TC[%d], extracts size is %d\r\n", + fprintf(stdout, "\r\n%s QoS entry[%d] for TC[%d], extracts size is %d\r\n", log_info, qos_index, flow->tc_id, flow->qos_real_key_size); key = (uint8_t *)(size_t)flow->qos_rule.key_iova; mask = (uint8_t *)(size_t)flow->qos_rule.mask_iova; - printf("key:\r\n"); + fprintf(stdout, "key:\r\n"); for (idx = 0; idx < flow->qos_real_key_size; idx++) - printf("%02x ", key[idx]); + fprintf(stdout, "%02x ", key[idx]); - printf("\r\nmask:\r\n"); + fprintf(stdout, "\r\nmask:\r\n"); for (idx = 0; idx < flow->qos_real_key_size; idx++) - printf("%02x ", mask[idx]); + fprintf(stdout, "%02x ", mask[idx]); - printf("\r\n%s QoS ipsrc: %d, ipdst: %d\r\n", log_info, + fprintf(stdout, "\r\n%s QoS ipsrc: %d, ipdst: %d\r\n", log_info, flow->ipaddr_rule.qos_ipsrc_offset, flow->ipaddr_rule.qos_ipdst_offset); } @@ -324,21 +324,21 @@ static inline void dpaa2_flow_fs_entry_log( if (!dpaa2_flow_control_log) return; - printf("\r\n%s FS/TC entry[%d] of TC[%d], extracts size is %d\r\n", + fprintf(stdout, "\r\n%s FS/TC entry[%d] of TC[%d], extracts size is %d\r\n", log_info, flow->tc_index, flow->tc_id, flow->fs_real_key_size); key = (uint8_t *)(size_t)flow->fs_rule.key_iova; mask = (uint8_t *)(size_t)flow->fs_rule.mask_iova; - printf("key:\r\n"); + fprintf(stdout, "key:\r\n"); for (idx = 0; idx < flow->fs_real_key_size; idx++) - printf("%02x ", key[idx]); + fprintf(stdout, "%02x ", key[idx]); - printf("\r\nmask:\r\n"); + fprintf(stdout, "\r\nmask:\r\n"); for (idx = 0; idx < flow->fs_real_key_size; idx++) - printf("%02x ", mask[idx]); + fprintf(stdout, "%02x ", mask[idx]); - printf("\r\n%s FS ipsrc: %d, ipdst: %d\r\n", log_info, + fprintf(stdout, "\r\n%s FS ipsrc: %d, ipdst: %d\r\n", log_info, flow->ipaddr_rule.fs_ipsrc_offset, flow->ipaddr_rule.fs_ipdst_offset); } -- 2.17.1