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 A380B4555B; Wed, 3 Jul 2024 12:41:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F81F40E7C; Wed, 3 Jul 2024 12:41:25 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9CC3840E41 for ; Wed, 3 Jul 2024 12:41:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720003283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6sYtaES9QroJE6DkYZOG+3FKRK7Nw6YwAd1wCgSq5/Q=; b=JaE+ZhoqTCw/IzcmtsxCnvm1GGPugAQoxAkw4Sehtwy3i5e+2H0Dt1ORe896jKjNfZ1Odq px1JbE0GOS4TfPJ6bRmO0O1i3ktZNjkKuxY3eeXVEPQZ0tYYrgVWKfPQNnNxVVn3RAR+7Q 2uvuATV3Ns1VuqmvXLwMHTew8AhTXqU= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-NO9ucXrBPn25jdur7weM1g-1; Wed, 03 Jul 2024 06:41:21 -0400 X-MC-Unique: NO9ucXrBPn25jdur7weM1g-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52cdaae5b3dso5140118e87.1 for ; Wed, 03 Jul 2024 03:41:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720003280; x=1720608080; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6sYtaES9QroJE6DkYZOG+3FKRK7Nw6YwAd1wCgSq5/Q=; b=g7DV/QSfyPUOnbkynO6w0I09c9JPlTlRHBupWzseBQrvhIJJidO00r7yzaqCByzS32 Uj+0rP5zjM4VW6iL005107Vyc7qZZxdpjPrhXZghm9BvrjlWHwVXeBq6gd3kdmvsbd4t QdFKVx/6VaDl8Z8N4EmXgL0oM5jM26M53ujDYQ+OcJkGxb8zky/aByApafsBYBTMTA+Q vlasv8oH5MLXk+KmPtsl3Mg3eoV7lawIk14C5eQLcVFn9H5L3uUH5yFA7EQSqTcENR8h 592hNuK/eR0Jrd86nkdu+K4VF/5ReTfxTk/6e5fglo9UpRMYSNftzsX5+AmVhY99EZgM DDjw== X-Gm-Message-State: AOJu0YzhPEJxDm9ALMu8ix/p8EoyxJtPqFA4mWifGMN19XjHYveCWC+a 0+18KgEtYVN+O2zQbBJ8v3rL4Gpk7Lcs0YX+STgb3N0YPL71e1GtM+MIVQL73a8bDgVedXJs3ph McpYI6eJaip9g2ve4bf712csxgAEvi6Jx8RdQci/ayLBGdqkqESwIKd6RVgyoDOOJbt7Th1Nzpw FNxqneQ585bEiV0mBMuOZX4I4= X-Received: by 2002:a05:6512:104b:b0:52c:c174:4bc3 with SMTP id 2adb3069b0e04-52e82687f77mr7456533e87.35.1720003280534; Wed, 03 Jul 2024 03:41:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETZ8zY28MzgDzVmfHafBPpp5JThwo3zSV2viBLknvfqcRhN1gE1j2XlArvDUX7XP/y26fz23tAWfuv2r1P+4U= X-Received: by 2002:a05:6512:104b:b0:52c:c174:4bc3 with SMTP id 2adb3069b0e04-52e82687f77mr7456520e87.35.1720003280139; Wed, 03 Jul 2024 03:41:20 -0700 (PDT) MIME-Version: 1.0 References: <20240702104013.3813272-1-hemant.agrawal@nxp.com> <20240702130856.3927348-1-hemant.agrawal@nxp.com> In-Reply-To: <20240702130856.3927348-1-hemant.agrawal@nxp.com> From: David Marchand Date: Wed, 3 Jul 2024 12:41:08 +0200 Message-ID: Subject: Re: [PATCH v3 1/3] drivers: replace printf with log macros To: Hemant Agrawal Cc: dev@dpdk.org, thomas@monjalon.net, stephen@networkplumber.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello Hemant, On Tue, Jul 2, 2024 at 3:09=E2=80=AFPM Hemant Agrawal wrote: [snip] > diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/ca= am_jr.c > index 0fa70c978f..fb9ac9cb30 100644 > --- a/drivers/crypto/caam_jr/caam_jr.c > +++ b/drivers/crypto/caam_jr/caam_jr.c > @@ -461,7 +461,7 @@ caam_jr_prep_cdb(struct caam_jr_session *ses) > } > > #if CAAM_JR_DBG > - SEC_DUMP_DESC(cdb->sh_desc); > + SEC_DUMP_DESC(cdb->sh_desc, stdout); > #endif This hunk should go to next patch. > > cdb->sh_hdr.hi.field.idlen =3D shared_desc_len; [snip] > diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethde= v.c > index 935a4f2ada..bcd19f31fb 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 =3D=3D EINVAL) > - printf("Failed to enable interrup= t: Not Supported\n"); > + DPAA_PMD_ERR("Failed to enable in= terrupt: Not Supported\n"); > else > - printf("Failed to enable interrup= t\n"); > + DPAA_PMD_ERR("Failed to enable in= terrupt\n"); DPAA_PMD_ERR appends a \n, so \n should be removed here. There are double \n in this driver prior to this patch, can you fix them to= o? It is probably worth checking other NXP drivers on this topic. > } > dev->data->dev_conf.intr_conf.lsc =3D 0; > dev->data->dev_flags &=3D ~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, d= uplex); > } else { > /* Manual autoneg - custom advertisement speed. *= / > - printf("Custom Advertisement speeds not supported= \n"); > + DPAA_PMD_ERR("Custom Advertisement speeds not sup= ported\n"); Idem. > } > } > [snip] > 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_f= d *fd, > for (ii =3D 0; ii < fd->length20; ii++) { > DISPLAY_PRINT("%02x ", ptr[ii]); > if (((ii + 1) % 16) =3D=3D 0) > - printf("\n"); > + DISPLAY_PRINT("\n"); > } > DISPLAY_PRINT("\n"); > } Indeed it is better to call this macro, but this macro is calling printf. I am ok with the change as this is under a debug build cflag, but I would prefer this debug code goes through rte_log in the future. --=20 David Marchand