From: Aakash Sasidharan <asasidharan@marvell.com>
To: Ankur Dwivedi <adwivedi@marvell.com>,
Anoob Joseph <anoobj@marvell.com>,
Tejasree Kondoj <ktejasree@marvell.com>
Cc: <gakhil@marvell.com>, <jerinj@marvell.com>,
<vvelumuri@marvell.com>, <asasidharan@marvell.com>,
<dev@dpdk.org>
Subject: [PATCH v2 09/12] crypto/cnxk: update sess pointer for next iteration
Date: Mon, 24 Jun 2024 11:53:58 +0530 [thread overview]
Message-ID: <20240624062401.4143606-10-asasidharan@marvell.com> (raw)
In-Reply-To: <20240624062401.4143606-1-asasidharan@marvell.com>
From: Anoob Joseph <anoobj@marvell.com>
Update sess pointer while working on next set of packets.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index a3a13c032e..0d5a9ab5ef 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -1460,6 +1460,8 @@ cn10k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
vf = cdev->data->dev_private;
+ const int nb_pkts_per_loop = 2 * CN10K_PKTS_PER_LOOP;
+
lmt_base = vf->rx_inj_lmtline.lmt_base;
io_addr = vf->rx_inj_lmtline.io_addr;
fc_addr = vf->rx_inj_lmtline.fc_addr;
@@ -1479,7 +1481,7 @@ cn10k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
if (unlikely(fc.s.qsize > fc_thresh))
goto exit;
- for (; i < RTE_MIN(2 * CN10K_PKTS_PER_LOOP, nb_pkts); i++) {
+ for (; i < RTE_MIN(nb_pkts_per_loop, nb_pkts); i++) {
m = pkts[i];
sec_sess = (struct cn10k_sec_session *)sess[i];
@@ -1540,10 +1542,11 @@ cn10k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
cn10k_cpt_lmtst_dual_submit(&io_addr, lmt_id, &i);
- if (nb_pkts - i > 0 && i == 2 * CN10K_PKTS_PER_LOOP) {
- nb_pkts -= i;
- pkts += i;
- count += i;
+ if (nb_pkts - i > 0 && i == nb_pkts_per_loop) {
+ nb_pkts -= nb_pkts_per_loop;
+ pkts += nb_pkts_per_loop;
+ count += nb_pkts_per_loop;
+ sess += nb_pkts_per_loop;
goto again;
}
--
2.25.1
next prev parent reply other threads:[~2024-06-24 6:32 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 14:58 [PATCH 00/12] fixes and improvements to CNXK crypto PMD Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 01/12] common/cnxk: add comments to denote skipped entries Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 02/12] crypto/cnxk: update version map file with PMD APIs Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 03/12] common/cnxk: make inline dev PF func get as idev API Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 04/12] crypto/cnxk: add flow control in Rx inject path Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 05/12] crypto/cnxk: use SSO PF func of inline device in inst Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 06/12] crypto/cnxk: use NEON for Rx inject inst preparation Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 07/12] crypto/cnxk: remove init of CPT result field in packet Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 08/12] crypto/cnxk: add dual submission in Rx inject Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 09/12] crypto/cnxk: update sess pointer for next iteration Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 10/12] crypto/cnxk: fix aes-gcm zero len input cases Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 11/12] crypto/cnxk: make pack IV variable as const Aakash Sasidharan
2024-06-20 14:58 ` [PATCH 12/12] crypto/cnxk: enable dual submission to CPT Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 00/12] fixes and improvements to CNXK crypto PMD Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 01/12] common/cnxk: add comments to denote skipped entries Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 02/12] crypto/cnxk: update version map file with PMD APIs Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 03/12] common/cnxk: make inline dev PF func get as idev API Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 04/12] crypto/cnxk: add flow control in Rx inject path Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 05/12] crypto/cnxk: use SSO PF func of inline device in inst Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 06/12] crypto/cnxk: use NEON for Rx inject inst preparation Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 07/12] crypto/cnxk: remove init of CPT result field in packet Aakash Sasidharan
2024-06-24 6:23 ` [PATCH v2 08/12] crypto/cnxk: add dual submission in Rx inject Aakash Sasidharan
2024-06-26 6:41 ` Akhil Goyal
2024-06-24 6:23 ` Aakash Sasidharan [this message]
2024-06-24 6:23 ` [PATCH v2 10/12] crypto/cnxk: fix aes-gcm zero len input cases Aakash Sasidharan
2024-06-24 6:24 ` [PATCH v2 11/12] crypto/cnxk: make pack IV variable as const Aakash Sasidharan
2024-06-24 6:24 ` [PATCH v2 12/12] crypto/cnxk: enable dual submission to CPT Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 00/12] Fixes and improvements to CNXK crypto PMD Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 01/12] common/cnxk: add comments to denote skipped entries Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 02/12] crypto/cnxk: update version map file with PMD APIs Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 03/12] common/cnxk: make inline dev PF func get as idev API Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 04/12] crypto/cnxk: add flow control in Rx inject path Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 05/12] crypto/cnxk: use SSO PF func of inline device in inst Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 06/12] crypto/cnxk: use NEON for Rx inject inst preparation Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 07/12] crypto/cnxk: remove init of CPT result field in packet Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 08/12] crypto/cnxk: add dual submission in Rx inject Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 09/12] crypto/cnxk: update sess pointer for next iteration Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 10/12] crypto/cnxk: fix aes-gcm zero len input cases Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 11/12] crypto/cnxk: make pack IV variable as const Aakash Sasidharan
2024-06-26 10:55 ` [PATCH v3 12/12] crypto/cnxk: enable dual submission to CPT Aakash Sasidharan
2024-06-27 5:11 ` [PATCH v3 00/12] 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=20240624062401.4143606-10-asasidharan@marvell.com \
--to=asasidharan@marvell.com \
--cc=adwivedi@marvell.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=jerinj@marvell.com \
--cc=ktejasree@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).