From patchwork Fri Sep 8 05:40:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 131250 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46EED4253E; Fri, 8 Sep 2023 07:40:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A0A340285; Fri, 8 Sep 2023 07:40:09 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 2B2B640042 for ; Fri, 8 Sep 2023 07:40:07 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3885H6XR020867; Thu, 7 Sep 2023 22:40:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=Qe22KDKJ8KRTPWvutbWvOHgW3chhC4ZZQkLL92wdFms=; b=SQRrOPHaagt23UnCjXm7HUR5RP8yid2pEHlElvyVwS9m55XC1Kg7T8n369BcY4dA8YB/ StQE6ci0UBrotJS9pb/XihS1GD7pv7nc+qNHR0J1fcq7CZTL39awys4hBqxWUQr3xqvs 7a2twRNwwvICr1DidSzNRsWPVQxV3n6kq2dTLJCvI8gGspOK33HCLwrA4bPP8xvkV8Mf 5gsZ8P0NVUY6HxDAOyU0I7Qo6YBglDnpVKIW+ZBSNgqd9fGCnwpDV9y6KuSfF9j2Vp+I vz3ibwCYQKlSOZE71eMTbQuaWfzjvC0a6WWB+A/StUv3mRa6Vg5H3usxr2OXOMGdzD/Y OQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3syk9ajb21-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Sep 2023 22:40:06 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 7 Sep 2023 22:40:04 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 7 Sep 2023 22:40:04 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.163.189]) by maili.marvell.com (Postfix) with ESMTP id A7CC75B697E; Thu, 7 Sep 2023 22:40:02 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Ciara Power CC: Jerin Jacob , Subject: [PATCH 1/4] security: remove redundant cast Date: Fri, 8 Sep 2023 11:10:00 +0530 Message-ID: <20230908054003.295-1-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: yR2Tz52vYCKw2ihAdst-mQdv5QLqeAiq X-Proofpoint-GUID: yR2Tz52vYCKw2ihAdst-mQdv5QLqeAiq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-08_03,2023-09-05_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not required. Signed-off-by: Anoob Joseph --- lib/security/rte_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c index c4d64bb8e9..71910863bc 100644 --- a/lib/security/rte_security.c +++ b/lib/security/rte_security.c @@ -385,7 +385,7 @@ security_capabilities_from_dev_id(int dev_id, const void **caps) if (rte_cryptodev_is_valid_dev(dev_id) == 0) return -EINVAL; - sec_ctx = (struct rte_security_ctx *)rte_cryptodev_get_sec_ctx(dev_id); + sec_ctx = rte_cryptodev_get_sec_ctx(dev_id); RTE_PTR_OR_ERR_RET(sec_ctx, -EINVAL); capabilities = rte_security_capabilities_get(sec_ctx); From patchwork Fri Sep 8 05:40:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 131251 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA5124253E; Fri, 8 Sep 2023 07:40:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABA6B4067A; Fri, 8 Sep 2023 07:40:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id D24A7402EC for ; Fri, 8 Sep 2023 07:40:09 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3880afPu005194; Thu, 7 Sep 2023 22:40:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=k/9vxkYjNWjZP3OARcHwK0S6Dq7eqqFtYjDfnAH24sU=; b=EthVFBa05Q5KQU9tK1Go7ogH0dfSHIErp3x+aDohRiCToHKMcreRYcGhiCC8MnnAje8N M1NPlXbVsQwJd6ItcxYZELnw3oOHzpLp+t5/ScGqX6hCumo0P8ajqZVLQoYwem58Ghvc 3r/SqP9JjLGZzCQn/qs8hgvp2rTYKF//A7BplvYU3uTN8HcsW49F/2x3AyASLEIn8sZ0 exGwI5Hgu2X3y4NyH+x0TRluo1ufDKWj80Jh8XXC6K0r8hwjMeXY7XcidHMbO0Ra8QbF 2Bfwuwvm8grASEhZN+z/1ow8MuMosTQUiU5JGy7c3kqslE7adh4Vp8x2Nj0cKvSAIpXz 2g== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3sxu7cqyp0-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Sep 2023 22:40:08 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 7 Sep 2023 22:40:06 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 7 Sep 2023 22:40:06 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.163.189]) by maili.marvell.com (Postfix) with ESMTP id F3F875B692E; Thu, 7 Sep 2023 22:40:04 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Ciara Power CC: Jerin Jacob , Subject: [PATCH 2/4] test/crypto: remove redundant cast Date: Fri, 8 Sep 2023 11:10:01 +0530 Message-ID: <20230908054003.295-2-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230908054003.295-1-anoobj@marvell.com> References: <20230908054003.295-1-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 211FjVooDaOe_oYzWmh0g3pQmiH64TRO X-Proofpoint-ORIG-GUID: 211FjVooDaOe_oYzWmh0g3pQmiH64TRO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-08_03,2023-09-05_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not required. Signed-off-by: Anoob Joseph --- app/test/test_cryptodev.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index fb2af40b99..589b9860ce 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -8920,15 +8920,12 @@ security_proto_supported(enum rte_security_session_action_type action, enum rte_security_session_protocol proto) { struct crypto_testsuite_params *ts_params = &testsuite_params; - const struct rte_security_capability *capabilities; const struct rte_security_capability *capability; + struct rte_security_ctx *ctx; uint16_t i = 0; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); - + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); capabilities = rte_security_capabilities_get(ctx); @@ -8967,12 +8964,12 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc, struct crypto_unittest_params *ut_params = &unittest_params; uint8_t *plaintext; int ret = TEST_SUCCESS; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); struct rte_cryptodev_info dev_info; + struct rte_security_ctx *ctx; uint64_t feat_flags; + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); feat_flags = dev_info.feature_flags; @@ -9174,11 +9171,11 @@ test_pdcp_proto_SGL(int i, int oop, unsigned int trn_data = 0; struct rte_cryptodev_info dev_info; uint64_t feat_flags; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); + struct rte_security_ctx *ctx; struct rte_mbuf *temp_mbuf; + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); feat_flags = dev_info.feature_flags; @@ -10898,6 +10895,7 @@ test_docsis_proto_uplink(const void *data) const struct docsis_test_data *d_td = data; struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; + struct rte_security_ctx *ctx; uint8_t *plaintext = NULL; uint8_t *ciphertext = NULL; uint8_t *iv_ptr; @@ -10905,9 +10903,7 @@ test_docsis_proto_uplink(const void *data) uint32_t crc_data_len; int ret = TEST_SUCCESS; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); /* Verify the capabilities */ struct rte_security_capability_idx sec_cap_idx; @@ -11083,15 +11079,14 @@ test_docsis_proto_downlink(const void *data) const struct docsis_test_data *d_td = data; struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; + struct rte_security_ctx *ctx; uint8_t *plaintext = NULL; uint8_t *ciphertext = NULL; uint8_t *iv_ptr; int32_t cipher_len, crc_len; int ret = TEST_SUCCESS; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); /* Verify the capabilities */ struct rte_security_capability_idx sec_cap_idx; From patchwork Fri Sep 8 05:40:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 131252 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 491D94253E; Fri, 8 Sep 2023 07:40:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4441402F2; Fri, 8 Sep 2023 07:40:12 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D280A4068A for ; Fri, 8 Sep 2023 07:40:11 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3885H6XS020867; Thu, 7 Sep 2023 22:40:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=jGIlfmVLKEXeLe0bullhOsVIfWgyWCc1BQjyT51d7jg=; b=ApHedwflIZTyG3AdGh92T9HERGEEvTi2PHcUxfoB2IYZM0KQJEB1bvz8fBAz7PghNiPp YSfWwtap7Qzns/5RCHsZuff8f+bTqf4SgLmWx0Bn1OzOxozaepZuXBB6gZc3xtL9yGaT WmsiC5/TewFSJdVN6Ey5lMSarIWaFdWMxrdu1HXCovwmQZfrYcfyACrYI198pxoQkoki bsCmOcNTelcv/UC76aY7T6MCGkqVgRgy6cdDpy36zbjCxVYHrDBfnzoQLhGlQ6mzQEso ifapGFD5D+GErSFGw/lQ+DlsACyW4OS1ev3k9Yc3ldfSl1FiXX/UG2MzaTHyiGkbHeHd uA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3syk9ajb26-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Sep 2023 22:40:11 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 7 Sep 2023 22:40:09 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 7 Sep 2023 22:40:09 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.163.189]) by maili.marvell.com (Postfix) with ESMTP id 482785B693D; Thu, 7 Sep 2023 22:40:07 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Ciara Power CC: Jerin Jacob , Subject: [PATCH 3/4] app/crypto-perf: remove redundant cast Date: Fri, 8 Sep 2023 11:10:02 +0530 Message-ID: <20230908054003.295-3-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230908054003.295-1-anoobj@marvell.com> References: <20230908054003.295-1-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: sEwdEI-lGSE9-cXIhLTQqucxq6nYER7w X-Proofpoint-GUID: sEwdEI-lGSE9-cXIhLTQqucxq6nYER7w X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-08_03,2023-09-05_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not required. Signed-off-by: Anoob Joseph --- app/test-crypto-perf/cperf_ops.c | 12 ++++++------ app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 4 +--- app/test-crypto-perf/cperf_test_throughput.c | 4 +--- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c index 93b9bfb240..5bb2ce954a 100644 --- a/app/test-crypto-perf/cperf_ops.c +++ b/app/test-crypto-perf/cperf_ops.c @@ -647,6 +647,7 @@ create_ipsec_session(struct rte_mempool *sess_mp, struct rte_crypto_sym_xform auth_xform = {0}; struct rte_crypto_sym_xform *crypto_xform; struct rte_crypto_sym_xform xform = {0}; + struct rte_security_ctx *ctx; if (options->aead_algo != 0) { /* Setup AEAD Parameters */ @@ -749,8 +750,7 @@ create_ipsec_session(struct rte_mempool *sess_mp, else sess_conf.ipsec.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx(dev_id); + ctx = rte_cryptodev_get_sec_ctx(dev_id); /* Create security session */ return (void *)rte_security_session_create(ctx, &sess_conf, sess_mp); @@ -766,6 +766,7 @@ cperf_create_session(struct rte_mempool *sess_mp, struct rte_crypto_sym_xform cipher_xform; struct rte_crypto_sym_xform auth_xform; struct rte_crypto_sym_xform aead_xform; + struct rte_security_ctx *ctx; void *sess = NULL; void *asym_sess = NULL; struct rte_crypto_asym_xform xform = {0}; @@ -853,8 +854,7 @@ cperf_create_session(struct rte_mempool *sess_mp, .crypto_xform = &cipher_xform }; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx(dev_id); + ctx = rte_cryptodev_get_sec_ctx(dev_id); /* Create security session */ return (void *)rte_security_session_create(ctx, &sess_conf, sess_mp); @@ -901,8 +901,8 @@ cperf_create_session(struct rte_mempool *sess_mp, } }, .crypto_xform = &cipher_xform }; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx(dev_id); + + ctx = rte_cryptodev_get_sec_ctx(dev_id); /* Create security session */ return (void *)rte_security_session_create(ctx, &sess_conf, sess_mp); diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c index 0307e82996..d6d4130195 100644 --- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c +++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c @@ -67,9 +67,7 @@ cperf_pmd_cyclecount_test_free(struct cperf_pmd_cyclecount_ctx *ctx) #ifdef RTE_LIB_SECURITY if (ctx->options->op_type == CPERF_PDCP || ctx->options->op_type == CPERF_DOCSIS) { - struct rte_security_ctx *sec_ctx = - (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx(ctx->dev_id); + struct rte_security_ctx *sec_ctx = rte_cryptodev_get_sec_ctx(ctx->dev_id); rte_security_session_destroy(sec_ctx, (void *)ctx->sess); } else diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c index e892a70699..21738e8425 100644 --- a/app/test-crypto-perf/cperf_test_throughput.c +++ b/app/test-crypto-perf/cperf_test_throughput.c @@ -44,9 +44,7 @@ cperf_throughput_test_free(struct cperf_throughput_ctx *ctx) else if (ctx->options->op_type == CPERF_PDCP || ctx->options->op_type == CPERF_DOCSIS || ctx->options->op_type == CPERF_IPSEC) { - struct rte_security_ctx *sec_ctx = - (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx(ctx->dev_id); + struct rte_security_ctx *sec_ctx = rte_cryptodev_get_sec_ctx(ctx->dev_id); rte_security_session_destroy( sec_ctx, (void *)ctx->sess); From patchwork Fri Sep 8 05:40:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 131253 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7EB864253E; Fri, 8 Sep 2023 07:40:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 358C74069F; Fri, 8 Sep 2023 07:40:15 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 294654069F for ; Fri, 8 Sep 2023 07:40:14 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3885WdVg020214; Thu, 7 Sep 2023 22:40:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=6+MJLO5M8bXM097gWEyVS86nxQ9AmATxizmKM+8wEjI=; b=aHneMDuv9ExwOjjwvdWSLwrF18IKiwnS6/hZiyPY2OXxTiEAIvItEqGxV7jTz3EmBn5Z ieeDdth9ondQPJQfEev9OuCOccK+WefG+pG6s/hl87PXyiTpgibLqgBn1VMXSxNeRtqO ELF6xKiVUM+866Oz7VWH8FIWuNcdrPALEaBaJC8bFdvHxa2Xhe1i/4pVxB0qOPTRc/Cc pfES0Pwi3rVXfo8BbW4q4+8ea4B+zW64wDhZWhev8g3gmuk7rKAl6Q/Vv74qxc1nFBgl T5FIQvENiURmQE9k5uh36l3x9hYgj/pX9ADOXRv/S7r0O1LZ3+6nCo9Ok26V87rQvJq+ bA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3syk9ajb2h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Sep 2023 22:40:13 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 7 Sep 2023 22:40:11 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 7 Sep 2023 22:40:11 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.163.189]) by maili.marvell.com (Postfix) with ESMTP id B75B65B693E; Thu, 7 Sep 2023 22:40:09 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Ciara Power CC: Jerin Jacob , Subject: [PATCH 4/4] examples/ipsec-secgw: remove redundant cast Date: Fri, 8 Sep 2023 11:10:03 +0530 Message-ID: <20230908054003.295-4-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230908054003.295-1-anoobj@marvell.com> References: <20230908054003.295-1-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: MBXQNZmXMTlPlV6bKFDENPcBqZWLnJuv X-Proofpoint-GUID: MBXQNZmXMTlPlV6bKFDENPcBqZWLnJuv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-08_03,2023-09-05_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not required. Signed-off-by: Anoob Joseph --- examples/ipsec-secgw/ipsec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index a5706bed24..984fb7a2ec 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -327,9 +327,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[], }; if (ips->type == RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL) { - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - cdev_id); + struct rte_security_ctx *ctx = rte_cryptodev_get_sec_ctx(cdev_id); /* Set IPsec parameters in conf */ set_ipsec_conf(sa, &(sess_conf.ipsec));