From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E00DCA052B; Tue, 28 Jul 2020 11:25:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65B191C0D7; Tue, 28 Jul 2020 11:25:16 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 5DF4F1BFF3 for ; Tue, 28 Jul 2020 11:25:15 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C8453D6E; Tue, 28 Jul 2020 02:25:14 -0700 (PDT) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.210.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B33A63F66E; Tue, 28 Jul 2020 02:25:12 -0700 (PDT) From: Ruifeng Wang To: Ruifeng Wang Cc: akhil.goyal@nxp.com, david.marchand@redhat.com, dev@dpdk.org, honnappa.nagarahalli@arm.com, nd@arm.com Date: Tue, 28 Jul 2020 17:24:06 +0800 Message-Id: <20200728092406.9259-4-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200728092406.9259-1-ruifeng.wang@arm.com> References: <20200727085810.168970-1-ruifeng.wang@arm.com> <20200728092406.9259-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH v2 3/3] crypto/armv8: remove redundant assert definition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Ruifeng Wang --- 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