patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Ruifeng Wang <ruifeng.wang@arm.com>
Cc: Akhil Goyal <akhil.goyal@nxp.com>, dev <dev@dpdk.org>,
	 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	nd <nd@arm.com>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] crypto/armv8: fix typos and compilation
Date: Mon, 27 Jul 2020 11:38:46 +0200	[thread overview]
Message-ID: <CAJFAV8y864sGDWWn_LsU7DQ=CFi2_1LaRBQ+BBst2hjcBcgFiw@mail.gmail.com> (raw)
In-Reply-To: <20200727085810.168970-1-ruifeng.wang@arm.com>

Hello Ruifeng,

On Mon, Jul 27, 2020 at 10:58 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
>
> Typo in debug log switch macro caused debug log cannot be enabled.
> Fixed the typo to match option defined in config file.
>
> Typo in crypto dev name macro caused unexpected device name in log.
> Fixed the typo to log with correct device name.
>
> Solved compilation error when debug log is enabled:
> rte_armv8_pmd.c: In function ‘process_armv8_chained_op’:
> rte_armv8_pmd.c:633:22: error: expected ‘)’ before ‘crypto_func’
>   ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
>                       ^
>
> Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
> Cc: stable@dpdk.org
>

Reported-by: David Marchand <david.marchand@redhat.com>

> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
> https://mails.dpdk.org/archives/dev/2020-July/175241.html
>
>  drivers/crypto/armv8/armv8_pmd_private.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
> index e08d0df78..b183c739b 100644
> --- a/drivers/crypto/armv8/armv8_pmd_private.h
> +++ b/drivers/crypto/armv8/armv8_pmd_private.h
> @@ -12,25 +12,25 @@
>
>  #define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
>         RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
> -                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
> +                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
>                         __func__, __LINE__, ## args)
>


- Those macros can use a dedicated logtype for this driver rather than
pollute the CRYPTODEV general logtype.

- Looking at their uses:
drivers/crypto/armv8/armv8_pmd_private.h:#define
ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define
ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define
ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define
ARMV8_CRYPTO_LOG_INFO(fmt, args...)
drivers/crypto/armv8/armv8_pmd_private.h:#define
ARMV8_CRYPTO_LOG_DBG(fmt, args...)
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:                   ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:
ARMV8_CRYPTO_LOG_ERR("Invalid/unsupported operation");
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:
ARMV8_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
drivers/crypto/armv8/rte_armv8_pmd.c:   ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_INFO(
drivers/crypto/armv8/rte_armv8_pmd_ops.c:               ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_ERR("invalid session struct");
drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_ERR("failed configure session parameters");

There is nothing for debug, and the rest of these messages are in setup steps.
I would rather have them always enabled and remove the debug option entirely.

WDYT?


> -#ifdef RTE_LIBRTE_ARMV8_CRYPTO_DEBUG
> +#ifdef RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG
>  #define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
>         RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
> -                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
> +                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
>                         __func__, __LINE__, ## args)
>
>  #define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
>         RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
> -                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
> +                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
>                         __func__, __LINE__, ## args)
>
>  #define ARMV8_CRYPTO_ASSERT(con)                               \
>  do {                                                           \
>         if (!(con)) {                                           \
> -               rte_panic("%s(): "                              \
> -                   con "condition failed, line %u", __func__); \
> +               rte_panic("condition failed, line %u",          \
> +                       __LINE__);                              \
>         }                                                       \
>  } while (0)


RTE_VERIFY does the same.


-- 
David Marchand


  reply	other threads:[~2020-07-27  9:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  8:58 [dpdk-stable] " Ruifeng Wang
2020-07-27  9:38 ` David Marchand [this message]
2020-07-27 10:03   ` [dpdk-stable] [dpdk-dev] " Ruifeng Wang
     [not found] ` <20200728092406.9259-1-ruifeng.wang@arm.com>
2020-07-28  9:24   ` [dpdk-stable] [PATCH v2 1/3] crypto/armv8: remove log debug option Ruifeng Wang
2020-07-28 19:48     ` Akhil Goyal
2020-07-28  9:24   ` [dpdk-stable] [PATCH v2 2/3] crypto/armv8: use dedicated log type Ruifeng Wang
2020-07-28 19:48     ` Akhil Goyal

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='CAJFAV8y864sGDWWn_LsU7DQ=CFi2_1LaRBQ+BBst2hjcBcgFiw@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \
    /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).