DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ruifeng Wang <ruifeng.wang@arm.com>
To: Ruifeng Wang <ruifeng.wang@arm.com>
Cc: akhil.goyal@nxp.com, david.marchand@redhat.com, dev@dpdk.org,
	honnappa.nagarahalli@arm.com, nd@arm.com
Subject: [dpdk-dev] [PATCH v2 3/3] crypto/armv8: remove redundant assert definition
Date: Tue, 28 Jul 2020 17:24:06 +0800
Message-ID: <20200728092406.9259-4-ruifeng.wang@arm.com> (raw)
In-Reply-To: <20200728092406.9259-1-ruifeng.wang@arm.com>

No need to define assert function in PMD since RTE provides the same.
Remove private definition and use RTE_VERIFY instead.

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

diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index 709b3d536..66b03fb92 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -30,14 +30,6 @@ extern int crypto_armv8_log_type;
 			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
-#define ARMV8_CRYPTO_ASSERT(con)				\
-do {								\
-	if (!(con)) {						\
-		rte_panic("condition failed, line %u",		\
-			__LINE__);				\
-	}							\
-} while (0)
-
 #define NBBY		8		/* Number of bits in a byte */
 #define BYTE_LENGTH(x)	((x) / NBBY)	/* Number of bytes in x (round down) */
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index a2b08d818..c95729db5 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -630,7 +630,7 @@ process_armv8_chained_op(struct armv8_crypto_qp *qp, struct rte_crypto_op *op,
 	arg.cipher.key = sess->cipher.key.data;
 	/* Acquire combined mode function */
 	crypto_func = sess->crypto_func;
-	ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
+	RTE_VERIFY(crypto_func != NULL);
 	error = crypto_func(csrc, cdst, clen, asrc, adst, alen, &arg);
 	if (error != 0) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
-- 
2.17.1


  parent reply	other threads:[~2020-07-28  9:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  8:58 [dpdk-dev] [PATCH] crypto/armv8: fix typos and compilation Ruifeng Wang
2020-07-27  9:38 ` David Marchand
2020-07-27 10:03   ` Ruifeng Wang
2020-07-28  9:24 ` [dpdk-dev] [PATCH v2 0/3] armv8 crypto PMD Ruifeng Wang
2020-07-28  9:24   ` [dpdk-dev] [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-dev] [PATCH v2 2/3] crypto/armv8: use dedicated log type Ruifeng Wang
2020-07-28 19:48     ` Akhil Goyal
2020-07-28  9:24   ` Ruifeng Wang [this message]
2020-07-28 19:49     ` [dpdk-dev] [PATCH v2 3/3] crypto/armv8: remove redundant assert definition Akhil Goyal
2020-07-28 20:04   ` [dpdk-dev] [PATCH v2 0/3] armv8 crypto PMD 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=20200728092406.9259-4-ruifeng.wang@arm.com \
    --to=ruifeng.wang@arm.com \
    --cc=akhil.goyal@nxp.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=nd@arm.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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