patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] crypto/dpaa_sec: fix to affine the thread portal affinity
@ 2021-05-03  8:39 Hemant Agrawal
  2021-05-05 15:17 ` [dpdk-stable] [EXT] " Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Hemant Agrawal @ 2021-05-03  8:39 UTC (permalink / raw)
  To: dev, gakhil; +Cc: Hemant Agrawal, stable

DPAA requires the I/O shall be done in a HW portal context only.
The portal affinity is currently only being done in session create
and config APIs with the assumption that same thread will be used
for IO. This is causing issue.
This patch add support during I/O to check the HW portal affinity
and affine portal- if not affined already.

Fixes: 9a984458f755 ("crypto/dpaa_sec: rewrite Rx/Tx path")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 43363ba6ba..19d4684e24 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1717,6 +1717,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
 	uint32_t index, flags[DPAA_SEC_BURST] = {0};
 	struct qman_fq *inq[DPAA_SEC_BURST];
 
+	if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
+		if (rte_dpaa_portal_init((void *)0)) {
+			DPAA_SEC_ERR("Failure in affining portal");
+			return 0;
+		}
+	}
+
 	while (nb_ops) {
 		frames_to_send = (nb_ops > DPAA_SEC_BURST) ?
 				DPAA_SEC_BURST : nb_ops;
@@ -1917,6 +1924,13 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
 	uint16_t num_rx;
 	struct dpaa_sec_qp *dpaa_qp = (struct dpaa_sec_qp *)qp;
 
+	if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
+		if (rte_dpaa_portal_init((void *)0)) {
+			DPAA_SEC_ERR("Failure in affining portal");
+			return 0;
+		}
+	}
+
 	num_rx = dpaa_sec_deq(dpaa_qp, ops, nb_ops);
 
 	dpaa_qp->rx_pkts += num_rx;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [EXT] [PATCH] crypto/dpaa_sec: fix to affine the thread portal affinity
  2021-05-03  8:39 [dpdk-stable] [PATCH] crypto/dpaa_sec: fix to affine the thread portal affinity Hemant Agrawal
@ 2021-05-05 15:17 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2021-05-05 15:17 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable

> DPAA requires the I/O shall be done in a HW portal context only.
> The portal affinity is currently only being done in session create
> and config APIs with the assumption that same thread will be used
> for IO. This is causing issue.
> This patch add support during I/O to check the HW portal affinity
> and affine portal- if not affined already.
> 
> Fixes: 9a984458f755 ("crypto/dpaa_sec: rewrite Rx/Tx path")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
Applied to dpdk-next-crypto

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-05 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03  8:39 [dpdk-stable] [PATCH] crypto/dpaa_sec: fix to affine the thread portal affinity Hemant Agrawal
2021-05-05 15:17 ` [dpdk-stable] [EXT] " Akhil Goyal

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

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

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


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