patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] crypto/armv8: fix typos and compilation
@ 2020-07-27  8:58 Ruifeng Wang
  2020-07-27  9:38 ` [dpdk-stable] [dpdk-dev] " David Marchand
       [not found] ` <20200728092406.9259-1-ruifeng.wang@arm.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Ruifeng Wang @ 2020-07-27  8:58 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: akhil.goyal, dev, honnappa.nagarahalli, nd, stable

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

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)
 
-#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)
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] crypto/armv8: fix typos and compilation
  2020-07-27  8:58 [dpdk-stable] [PATCH] crypto/armv8: fix typos and compilation Ruifeng Wang
@ 2020-07-27  9:38 ` " David Marchand
  2020-07-27 10:03   ` Ruifeng Wang
       [not found] ` <20200728092406.9259-1-ruifeng.wang@arm.com>
  1 sibling, 1 reply; 7+ messages in thread
From: David Marchand @ 2020-07-27  9:38 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Akhil Goyal, dev, Honnappa Nagarahalli, nd, dpdk stable

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] crypto/armv8: fix typos and compilation
  2020-07-27  9:38 ` [dpdk-stable] [dpdk-dev] " David Marchand
@ 2020-07-27 10:03   ` Ruifeng Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Ruifeng Wang @ 2020-07-27 10:03 UTC (permalink / raw)
  To: David Marchand
  Cc: Akhil.goyal, dev, Honnappa Nagarahalli, nd, dpdk stable, nd


> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Monday, July 27, 2020 5:39 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: 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-dev] [PATCH] crypto/armv8: fix typos and compilation
> 
> 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.
> 
Agreed. Will add a dedicated logtype for this driver.

> - 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?
> 
Agreed. The logs are not in data path. They can be always enabled.
Will change in next version. 

> 
> > -#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.
> 
Yes. Will switch to RTE_VERIFY in next version.

> 
> --
> David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH v2 1/3] crypto/armv8: remove log debug option
       [not found] ` <20200728092406.9259-1-ruifeng.wang@arm.com>
@ 2020-07-28  9:24   ` 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
  1 sibling, 1 reply; 7+ messages in thread
From: Ruifeng Wang @ 2020-07-28  9:24 UTC (permalink / raw)
  To: Thomas Monjalon, Ruifeng Wang
  Cc: akhil.goyal, david.marchand, dev, honnappa.nagarahalli, nd, stable

Typo in debug log switch macro caused debug log cannot be enabled.
Since no log used in data path, remove the debug option entirely
and have logs always enabled.

Resolved 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>
---
 config/common_base                       |  1 -
 drivers/crypto/armv8/armv8_pmd_private.h | 11 ++---------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/config/common_base b/config/common_base
index f76585f16..c70b8f68b 100644
--- a/config/common_base
+++ b/config/common_base
@@ -605,7 +605,6 @@ CONFIG_RTE_CRYPTO_MAX_DEVS=64
 # Compile PMD for ARMv8 Crypto device
 #
 CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n
-CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
 
 #
 # Compile NXP CAAM JR crypto Driver
diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index e08d0df78..19940809b 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -15,7 +15,6 @@
 			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
 			__func__, __LINE__, ## args)
 
-#ifdef RTE_LIBRTE_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), \
@@ -29,17 +28,11 @@
 #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)
 
-#else
-#define ARMV8_CRYPTO_LOG_INFO(fmt, args...)
-#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)
-#define ARMV8_CRYPTO_ASSERT(con)
-#endif
-
 #define NBBY		8		/* Number of bits in a byte */
 #define BYTE_LENGTH(x)	((x) / NBBY)	/* Number of bytes in x (round down) */
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH v2 2/3] crypto/armv8: use dedicated log type
       [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  9:24   ` Ruifeng Wang
  2020-07-28 19:48     ` Akhil Goyal
  1 sibling, 1 reply; 7+ messages in thread
From: Ruifeng Wang @ 2020-07-28  9:24 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: akhil.goyal, david.marchand, dev, honnappa.nagarahalli, nd, stable

armv8 crypto PMD used CRYPTODEV general log type.
Create a dedicated log type for the PMD to not pollute CRYPTODEV log type.

Typo in crypto dev name macro caused unexpected device name in log.
Fixed the typo to log with correct device name.

Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Cc: stable@dpdk.org

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/crypto/armv8/armv8_pmd_private.h | 23 ++++++++++++++---------
 drivers/crypto/armv8/rte_armv8_pmd.c     |  2 ++
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index 19940809b..709b3d536 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -10,19 +10,24 @@
 #define CRYPTODEV_NAME_ARMV8_PMD	crypto_armv8
 /**< ARMv8 Crypto PMD device name */
 
-#define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
-	RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+extern int crypto_armv8_log_type;
+
+#define ARMV8_CRYPTO_LOG_ERR(fmt, args...)			\
+	rte_log(RTE_LOG_ERR, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
-#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
-	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+#define ARMV8_CRYPTO_LOG_INFO(fmt, args...)			\
+	rte_log(RTE_LOG_INFO, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			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), \
+#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)			\
+	rte_log(RTE_LOG_DEBUG, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
 #define ARMV8_CRYPTO_ASSERT(con)				\
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 8b212772f..a2b08d818 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -861,6 +861,8 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
+RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH v2 1/3] crypto/armv8: remove log debug option
  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
  0 siblings, 0 replies; 7+ messages in thread
From: Akhil Goyal @ 2020-07-28 19:48 UTC (permalink / raw)
  To: Ruifeng Wang, Thomas Monjalon
  Cc: david.marchand, dev, honnappa.nagarahalli, nd, stable

> Typo in debug log switch macro caused debug log cannot be enabled.
> Since no log used in data path, remove the debug option entirely
> and have logs always enabled.
> 
> Resolved 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>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH v2 2/3] crypto/armv8: use dedicated log type
  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
  0 siblings, 0 replies; 7+ messages in thread
From: Akhil Goyal @ 2020-07-28 19:48 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: david.marchand, dev, honnappa.nagarahalli, nd, stable

> armv8 crypto PMD used CRYPTODEV general log type.
> Create a dedicated log type for the PMD to not pollute CRYPTODEV log type.
> 
> Typo in crypto dev name macro caused unexpected device name in log.
> Fixed the typo to log with correct device name.
> 
> Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8
> processors")
> Cc: stable@dpdk.org
> 
> Suggested-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27  8:58 [dpdk-stable] [PATCH] crypto/armv8: fix typos and compilation Ruifeng Wang
2020-07-27  9:38 ` [dpdk-stable] [dpdk-dev] " David Marchand
2020-07-27 10:03   ` 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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox