DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Nicolas Chautru <nicolas.chautru@intel.com>, hernan.vargas@intel.com
Cc: dev@dpdk.org, gakhil@marvell.com, maxime.coquelin@redhat.com,
	 trix@redhat.com, bruce.richardson@intel.com,
	hemant.agrawal@nxp.com,  stephen@networkplumber.org
Subject: Re: [PATCH v12 02/16] baseband/acc100: refactor to segregate common code
Date: Thu, 16 Nov 2023 18:25:23 +0100	[thread overview]
Message-ID: <CAJFAV8wgk=Bh12eJN10waw_KD7sBVGt7W6MPV=DaAkaGtcL1fQ@mail.gmail.com> (raw)
In-Reply-To: <20221012175930.7560-3-nicolas.chautru@intel.com>

Hello,

Looking back in the mailing list archive...

On Wed, Oct 12, 2022 at 8:00 PM Nicolas Chautru
<nicolas.chautru@intel.com> wrote:
> +/* Helper macro for logging */
> +#define rte_acc_log(level, fmt, ...) \
> +       rte_log(RTE_LOG_ ## level, RTE_LOG_NOTICE, fmt "\n", \
> +               ##__VA_ARGS__)

I noticed that this macro logs messages with a 6 value as logtype,
registered under lib.hash (RTE_LOGTYPE_HASH).
lib/log/rte_log.h:#define RTE_LOG_NOTICE   6U  /**< Normal but
significant condition. */
lib/log/rte_log.h:#define RTE_LOGTYPE_HASH       6 /**< Log related to
hash table. */

Please fix this.

Here is some suggestion:

Looking at other RTE_LOG_REGISTER in this driver, both acc and vrb
drivers are registered under a same logtype (which is probably not
entirely broken, but quite confusing):
$ git grep RTE_LOG_REGISTER_DEFAULT drivers/baseband/acc/
drivers/baseband/acc/rte_acc100_pmd.c:RTE_LOG_REGISTER_DEFAULT(acc100_logtype,
NOTICE); # mapped to pmd.bb.acc
drivers/baseband/acc/rte_vrb_pmd.c:RTE_LOG_REGISTER_DEFAULT(vrb_logtype,
NOTICE); # mapped to pmd.bb.acc

It seems 3 logtypes are used in this code.
So this driver can use sub types, like:
RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, NOTICE); # mapped to
pmd.bb.acc.acc100
RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, NOTICE); # mapped to pmd.bb.acc.vrb
RTE_LOG_REGISTER_SUFFIX(acc_common_logtype, common, NOTICE); # mapped
to pmd.bb.acc.common


-- 
David Marchand


  reply	other threads:[~2023-11-16 17:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 17:59 [PATCH v12 00/16] bbdev ACC200 PMD Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 01/16] baseband/acc100: remove unused registers Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 02/16] baseband/acc100: refactor to segregate common code Nicolas Chautru
2023-11-16 17:25   ` David Marchand [this message]
2022-10-12 17:59 ` [PATCH v12 03/16] baseband/acc: rename directory from acc100 to acc Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 04/16] baseband/acc: introduce PMD for ACC200 Nicolas Chautru
2022-10-13  9:11   ` [EXT] " Akhil Goyal
2022-10-30 16:02   ` Thomas Monjalon
2022-10-31 15:43     ` Chautru, Nicolas
2022-10-31 15:53       ` Thomas Monjalon
2022-10-31 21:41         ` Chautru, Nicolas
2022-11-07 23:52           ` Chautru, Nicolas
2022-11-08  8:56             ` Thomas Monjalon
2022-11-08 23:47               ` Chautru, Nicolas
2023-10-24  7:22         ` Chautru, Nicolas
2022-10-12 17:59 ` [PATCH v12 05/16] baseband/acc: add HW register definitions " Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 06/16] baseband/acc: add info get function " Nicolas Chautru
2022-10-12 20:13   ` [EXT] " Akhil Goyal
2022-10-12 21:33     ` Chautru, Nicolas
2022-10-12 20:19   ` Akhil Goyal
2022-10-12 17:59 ` [PATCH v12 07/16] baseband/acc: add queue configuration " Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 08/16] baseband/acc: add LDPC processing functions Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 09/16] baseband/acc: add LTE " Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 10/16] baseband/acc: add support for FFT operations Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 11/16] baseband/acc: support interrupt Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 12/16] baseband/acc: add device status and vf2pf comms Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 13/16] baseband/acc: add PF configure companion function Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 14/16] baseband/acc: simplify meson dependency Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 15/16] baseband/acc: add helper function for descriptor index Nicolas Chautru
2022-10-12 17:59 ` [PATCH v12 16/16] test-bbdev: unit test capability extension Nicolas Chautru
2022-10-13  8:56   ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8wgk=Bh12eJN10waw_KD7sBVGt7W6MPV=DaAkaGtcL1fQ@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hernan.vargas@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=nicolas.chautru@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).