From: Tejasree Kondoj <ktejasree@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>
Cc: Anoob Joseph <anoobj@marvell.com>,
Vidya Sagar Velumuri <vvelumuri@marvell.com>, <dev@dpdk.org>
Subject: [PATCH 13/13] crypto/cnxk: remove dead code
Date: Thu, 20 Oct 2022 16:44:53 +0530 [thread overview]
Message-ID: <20221020111453.1982947-7-ktejasree@marvell.com> (raw)
In-Reply-To: <20221020111453.1982947-1-ktejasree@marvell.com>
From: Anoob Joseph <anoobj@marvell.com>
Coverity issue: 381022
Fixes: d94414d1627f ("crypto/cnxk: separate out PDCP cipher datapath")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
drivers/crypto/cnxk/cnxk_se.h | 38 ++++++++++++++---------------------
1 file changed, 15 insertions(+), 23 deletions(-)
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 4675512bbc..47516592a3 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -2675,6 +2675,8 @@ fill_pdcp_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,
fc_params.dst_iov = fc_params.src_iov = (void *)src;
prepare_iov_from_pkt_inplace(m_src, &fc_params, &flags);
} else {
+ uint32_t pkt_len;
+
/* Out of place processing */
fc_params.src_iov = (void *)src;
fc_params.dst_iov = (void *)dst;
@@ -2686,33 +2688,23 @@ fill_pdcp_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,
goto err_exit;
}
- if (unlikely(m_dst != NULL)) {
- uint32_t pkt_len;
-
- /* Try to make room as much as src has */
- pkt_len = rte_pktmbuf_pkt_len(m_dst);
-
- if (unlikely(pkt_len < rte_pktmbuf_pkt_len(m_src))) {
- pkt_len = rte_pktmbuf_pkt_len(m_src) - pkt_len;
- if (!rte_pktmbuf_append(m_dst, pkt_len)) {
- plt_dp_err("Not enough space in "
- "m_dst %p, need %u"
- " more",
- m_dst, pkt_len);
- ret = -EINVAL;
- goto err_exit;
- }
- }
+ /* Try to make room as much as src has */
+ pkt_len = rte_pktmbuf_pkt_len(m_dst);
- if (prepare_iov_from_pkt(m_dst, fc_params.dst_iov, 0)) {
- plt_dp_err("Prepare dst iov failed for "
- "m_dst %p",
- m_dst);
+ if (unlikely(pkt_len < rte_pktmbuf_pkt_len(m_src))) {
+ pkt_len = rte_pktmbuf_pkt_len(m_src) - pkt_len;
+ if (unlikely(rte_pktmbuf_append(m_dst, pkt_len) == NULL)) {
+ plt_dp_err("Not enough space in m_dst %p, need %u more", m_dst,
+ pkt_len);
ret = -EINVAL;
goto err_exit;
}
- } else {
- fc_params.dst_iov = (void *)src;
+ }
+
+ if (unlikely(prepare_iov_from_pkt(m_dst, fc_params.dst_iov, 0))) {
+ plt_dp_err("Prepare dst iov failed for m_dst %p", m_dst);
+ ret = -EINVAL;
+ goto err_exit;
}
}
--
2.25.1
next prev parent reply other threads:[~2022-10-20 11:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 11:14 [PATCH 00/13] fixes and improvements to cnxk crypto PMD Tejasree Kondoj
2022-10-20 11:14 ` [PATCH 08/13] common/cnxk: add opad ipad gen for md5 Tejasree Kondoj
2022-10-20 11:14 ` [PATCH 09/13] crypto/cnxk: support PDCP AAD in CPT PMD Tejasree Kondoj
2022-10-20 11:14 ` [PATCH 10/13] crypto/cnxk: acquire lock while updating antireplay Tejasree Kondoj
2022-10-20 11:14 ` [PATCH 11/13] crypto/cnxk: switch to SG when metabuf is allocated Tejasree Kondoj
2022-10-25 7:21 ` Akhil Goyal
2022-10-20 11:14 ` [PATCH 12/13] crypto/cnxk: verify IV length during session create Tejasree Kondoj
2022-10-20 11:14 ` Tejasree Kondoj [this message]
2022-10-21 15:00 ` [PATCH 00/13] fixes and improvements to cnxk 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=20221020111453.1982947-7-ktejasree@marvell.com \
--to=ktejasree@marvell.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=vvelumuri@marvell.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
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).