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 F2F4D41C5F; Fri, 10 Feb 2023 10:45:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E009240EE6; Fri, 10 Feb 2023 10:45:19 +0100 (CET) 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 4F53040687 for ; Fri, 10 Feb 2023 10:45:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676022318; 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=Vnaz1QGyLykpUDgANoh+0n9M9zPEb3IXf2n5/t4Qxes=; b=e/MDhcVrPK5xb2e72CWsq0cbhTo1TPavKH5DXY1c8eAr4K60iYitPG9DGCxqLT5w2KHU/h SHedC4C0viwGfPcz33JGfal2HEUWDIc+6z3CrS3rM+kxXYRJUNkk/6wg3mHjtO2iM60Bz0 PVH2yYWcgj/dPZ9V/Vvhw/fcxM0ZCe8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-196-5hSe39CXM1e6OZQT7AGDYA-1; Fri, 10 Feb 2023 04:45:15 -0500 X-MC-Unique: 5hSe39CXM1e6OZQT7AGDYA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8302B811E9C; Fri, 10 Feb 2023 09:45:15 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93772492C3E; Fri, 10 Feb 2023 09:45:14 +0000 (UTC) Message-ID: <0fd8dddb-863b-a439-2855-fe24d052918f@redhat.com> Date: Fri, 10 Feb 2023 10:45:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v1 9/9] baseband/acc: remove printf from PMD function To: Nicolas Chautru , dev@dpdk.org Cc: hernan.vargas@intel.com References: <20230209221929.265059-1-nicolas.chautru@intel.com> <20230209221929.265059-10-nicolas.chautru@intel.com> From: Maxime Coquelin In-Reply-To: <20230209221929.265059-10-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 2/9/23 23:19, Nicolas Chautru wrote: > Replacing usage of printf in companion function for > bbdev-test by rte_log. I think it could be backported. If you agree please add Fixes tag and Cc stable. > Signed-off-by: Nicolas Chautru > --- > drivers/baseband/acc/rte_acc100_pmd.c | 18 +++++++++--------- > drivers/baseband/acc/rte_vrb_pmd.c | 2 +- > 2 files changed, 10 insertions(+), 10 deletions(-) For the patch itself: Reviewed-by: Maxime Coquelin Thanks, Maxime > diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c > index 36f6fec5ad..40b5eaf089 100644 > --- a/drivers/baseband/acc/rte_acc100_pmd.c > +++ b/drivers/baseband/acc/rte_acc100_pmd.c > @@ -4347,7 +4347,7 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc_device *d, > { > int i, template_idx, qg_idx; > uint32_t address, status, value; > - printf("Need to clear power-on 5GUL status in internal memory\n"); > + rte_bbdev_log(WARNING, "Need to clear power-on 5GUL status in internal memory"); > /* Reset LDPC Cores */ > for (i = 0; i < ACC100_ENGINES_MAX; i++) > acc_reg_write(d, HWPfFecUl5gCntrlReg + > @@ -4421,7 +4421,7 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc_device *d, > /* Force each engine which is in unspecified state */ > for (i = 0; i < num_failed_engine; i++) { > int failed_engine = engines_to_restart[i]; > - printf("Force engine %d\n", failed_engine); > + rte_bbdev_log(WARNING, "Force engine %d", failed_engine); > for (template_idx = ACC100_SIG_UL_5G; > template_idx <= ACC100_SIG_UL_5G_LAST; > template_idx++) { > @@ -4450,7 +4450,7 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc_device *d, > acc_reg_write(d, HWPfQmgrIngressAq + 0x100, enq_req.val); > usleep(ACC_LONG_WAIT * 100); > if (desc->req.word0 != 2) > - printf("DMA Response %#"PRIx32"\n", desc->req.word0); > + rte_bbdev_log(WARNING, "DMA Response %#"PRIx32"\n", desc->req.word0); > } > > /* Reset LDPC Cores */ > @@ -4482,7 +4482,7 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc_device *d, > } else > acc_reg_write(d, address, 0); > } > - printf("Number of 5GUL engines %d\n", numEngines); > + rte_bbdev_log(INFO, "Number of 5GUL engines %d", numEngines); > > rte_free(d->sw_rings_base); > usleep(ACC_LONG_WAIT); > @@ -4671,7 +4671,7 @@ acc100_configure(const char *dev_name, struct rte_acc_conf *conf) > } else > acc_reg_write(d, address, 0); > } > - printf("Number of 5GUL engines %d\n", numEngines); > + rte_bbdev_log(INFO, "Number of 5GUL engines %d", numEngines); > /* 4GDL */ > numQqsAcc += numQgs; > numQgs = conf->q_dl_4g.num_qgroups; > @@ -4801,7 +4801,7 @@ acc100_configure(const char *dev_name, struct rte_acc_conf *conf) > version += acc_reg_read(d, > HWPfDdrPhyIdtmFwVersion + 4 * i) << (8 * i); > if (version != ACC100_PRQ_DDR_VER) { > - printf("* Note: Not on DDR PRQ version %8x != %08x\n", > + rte_bbdev_log(ERR, "* Note: Not on DDR PRQ version %8x != %08x", > version, ACC100_PRQ_DDR_VER); > } else if (firstCfg) { > /* ---- DDR configuration at boot up --- */ > @@ -4871,7 +4871,7 @@ acc100_configure(const char *dev_name, struct rte_acc_conf *conf) > if (value & 1) > break; > } > - printf("DDR Training completed in %d ms", i); > + rte_bbdev_log(INFO, "DDR Training completed in %d ms", i); > /* Enable Memory Controller */ > acc_reg_write(d, HWPfDdrUmmcCtrl, 0x401); > /* Release AXI interface reset */ > @@ -5047,7 +5047,7 @@ acc101_configure(const char *dev_name, struct rte_acc_conf *conf) > } else > acc_reg_write(d, address, 0); > } > - printf("Number of 5GUL engines %d\n", numEngines); > + rte_bbdev_log(INFO, "Number of 5GUL engines %d", numEngines); > /* 4GDL */ > numQqsAcc += numQgs; > numQgs = conf->q_dl_4g.num_qgroups; > @@ -5185,7 +5185,7 @@ rte_acc_configure(const char *dev_name, struct rte_acc_conf *conf) > return -ENODEV; > } > struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(bbdev->device); > - printf("Configure dev id %x\n", pci_dev->id.device_id); > + rte_bbdev_log(INFO, "Configure dev id %x", pci_dev->id.device_id); > if (pci_dev->id.device_id == ACC100_PF_DEVICE_ID) > return acc100_configure(dev_name, conf); > else if (pci_dev->id.device_id == ACC101_PF_DEVICE_ID) > diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c > index 18b5dab25f..c37f725415 100644 > --- a/drivers/baseband/acc/rte_vrb_pmd.c > +++ b/drivers/baseband/acc/rte_vrb_pmd.c > @@ -3633,7 +3633,7 @@ vrb1_configure(const char *dev_name, struct rte_acc_conf *conf) > } else > acc_reg_write(d, address, 0); > } > - printf("Number of 5GUL engines %d\n", numEngines); > + rte_bbdev_log(INFO, "Number of 5GUL engines %d", numEngines); > /* 4GDL */ > numQqsAcc += numQgs; > numQgs = conf->q_dl_4g.num_qgroups;