DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: Yong Liang <1269690261@qq.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Kai Ji <kai.ji@intel.com>, Brian Dooley <brian.dooley@intel.com>,
	"Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>
Cc: "roy.fan.zhang@intel.com" <roy.fan.zhang@intel.com>
Subject: RE: [EXTERNAL] [PATCH] crypto/scheduler: fix crashes in scheduler_multicore due to incorrect variable usage
Date: Wed, 18 Sep 2024 05:50:42 +0000	[thread overview]
Message-ID: <CO6PR18MB448437F104A5D6B7A101CA9BD8622@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <tencent_98734034A30594BC001A8912CB3C7ED6CF05@qq.com>

Hi Yong Liang,

You should mark the previous versions as superseded in patchwork.

This create unnecessary confusion.

The patch title is still too long.
crypto/scheduler: fix incorrect variable usage


> The variable `pending_deq_ops` was incorrectly used
> instead of `pending_enq_ops`.
> This causes the program to crash
> when the worker PMD accesses the session
> 
> Bugzilla ID: 1537
> Fixes: 6812b9bf470e ("crypto/scheduler: use unified session")
> Cc: roy.fan.zhang@intel.com
> 
> Signed-off-by: Yong Liang <1269690261@qq.com>
> ---
>  drivers/crypto/scheduler/scheduler_multicore.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/scheduler/scheduler_multicore.c
> b/drivers/crypto/scheduler/scheduler_multicore.c
> index a21b522f9f..70f8a25b70 100644
> --- a/drivers/crypto/scheduler/scheduler_multicore.c
> +++ b/drivers/crypto/scheduler/scheduler_multicore.c
> @@ -191,11 +191,11 @@ mc_scheduler_worker(struct rte_cryptodev *dev)
>  					worker->qp_id,
>  					&enq_ops[pending_enq_ops_idx],
>  					pending_enq_ops);
> -			if (processed_ops < pending_deq_ops)
> +			if (processed_ops < pending_enq_ops)
>  				scheduler_retrieve_sessions(
>  					&enq_ops[pending_enq_ops_idx +
>  						processed_ops],
> -					pending_deq_ops - processed_ops);
> +					pending_enq_ops - processed_ops);
>  			pending_enq_ops -= processed_ops;
>  			pending_enq_ops_idx += processed_ops;
>  			inflight_ops += processed_ops;
> --
> 2.43.0


      reply	other threads:[~2024-09-18  5:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 16:06 Yong Liang
2024-09-18  5:50 ` Akhil Goyal [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=CO6PR18MB448437F104A5D6B7A101CA9BD8622@CO6PR18MB4484.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=1269690261@qq.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=brian.dooley@intel.com \
    --cc=dev@dpdk.org \
    --cc=kai.ji@intel.com \
    --cc=roy.fan.zhang@intel.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).