patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [19.11 PATCH] crypto/dpaa_sec: affine the thread portal affinity
Date: Fri, 4 Jun 2021 07:09:35 +0200	[thread overview]
Message-ID: <CAATJJ0K8OXxHbcHWc+hT8Ax+=MmE7aObOMi7F_Dsjh53Hp3MDA@mail.gmail.com> (raw)
In-Reply-To: <20210603121728.30576-1-hemant.agrawal@nxp.com>

On Thu, Jun 3, 2021 at 2:19 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> 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 19.11.x - thanks!

> ---
>  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 a650313cdb..6e454273ee 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -1690,6 +1690,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(!RTE_PER_LCORE(dpaa_io))) {
> +               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;
> @@ -1890,6 +1897,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(!RTE_PER_LCORE(dpaa_io))) {
> +               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
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

      reply	other threads:[~2021-06-04  5:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 12:17 Hemant Agrawal
2021-06-04  5:09 ` Christian Ehrhardt [this message]

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='CAATJJ0K8OXxHbcHWc+hT8Ax+=MmE7aObOMi7F_Dsjh53Hp3MDA@mail.gmail.com' \
    --to=christian.ehrhardt@canonical.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=stable@dpdk.org \
    /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).