[dpdk-dev] [RESEND v2 3/7] net/dpaa2: change into dynamic logging

Shreyansh Jain shreyansh.jain at nxp.com
Fri Mar 23 08:19:56 CET 2018


On Wed, Mar 21, 2018 at 12:01 PM, Hemant Agrawal
<hemant.agrawal at codeaurora.org> wrote:
> Hi Shreyansh,
>
> On 3/13/2018 11:14 AM, Shreyansh Jain wrote:
>>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
>> ---
>>   config/common_base                        |   5 -
>>   config/defconfig_arm64-dpaa2-linuxapp-gcc |   9 -
>>   doc/guides/nics/dpaa2.rst                 |  44 ++---
>>   drivers/net/dpaa2/Makefile                |   6 -
>>   drivers/net/dpaa2/base/dpaa2_hw_dpni.c    |  30 ++--
>>   drivers/net/dpaa2/dpaa2_ethdev.c          | 290
>> +++++++++++++++---------------
>>   drivers/net/dpaa2/dpaa2_pmd_logs.h        |  41 +++++
>>   drivers/net/dpaa2/dpaa2_rxtx.c            |  59 +++---
>>   8 files changed, 258 insertions(+), 226 deletions(-)
>>   create mode 100644 drivers/net/dpaa2/dpaa2_pmd_logs.h
>>
>> diff --git a/config/common_base b/config/common_base
>> index ad03cf433..64bdfbb73 100644
>> --- a/config/common_base
>> +++ b/config/common_base
>> @@ -188,11 +188,6 @@ CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y
>>   # Compile burst-oriented NXP DPAA2 PMD driver
>>   #
>>   CONFIG_RTE_LIBRTE_DPAA2_PMD=n
>> -CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n
>> -CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n
>
> See the comment in PATCH 2/7 w.r.t usages of DEBUG_DRIVER macro.
>>
>> @@ -322,9 +322,9 @@ dpaa2_attach_bp_list(struct dpaa2_dev_priv *priv,
>>         retcode = dpni_set_pools(dpni, CMD_PRI_LOW, priv->token,
>> &bpool_cfg);
>>         if (retcode != 0) {
>> -               PMD_INIT_LOG(ERR, "Error in attaching the buffer pool
>> list"
>> -                               " bpid = %d Error code = %d\n",
>> -                               bpool_cfg.pools[0].dpbp_id, retcode);
>> +               DPAA2_PMD_ERR("Error configuring buffer pool on
>> interface."
>> +                             " bpid = %d error code = %d",
>> +                             bpool_cfg.pools[0].dpbp_id, retcode);
>
> Can you try to convert this and others into a single line message?

Actually, the main debug string is a single line itself. It is the
variables which are being printed that have been shifted to new line.
That way, a developer can easy search through the code using the error
context (ignoring the values printed).
Unfortunately, at this point the indentation is too much to have a
long string with 80 character limit restriction.

I will push a v3 with all other comments fixed. If you still have
second thoughts about this, I will quickly spin-up a v4.

-
Shreyansh


More information about the dev mailing list