From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D225A459CC; Wed, 18 Sep 2024 16:16:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F7D04025E; Wed, 18 Sep 2024 16:16:05 +0200 (CEST) Received: from out203-205-221-191.mail.qq.com (out203-205-221-191.mail.qq.com [203.205.221.191]) by mails.dpdk.org (Postfix) with UTF8SMTP id BEB8A4003C for ; Wed, 18 Sep 2024 16:16:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1726668951; bh=rxXI8p+6V/8E/OCGydE0XxFmXBpJkV4XFJ8j4GRI+ak=; h=From:To:Cc:Subject:Date; b=Ca51rqBf2D0QGGiBK7WmLDeoSWNRFhvbIh4xVPNaswW2rfjAzBSqKYYnuSn0fcMks dhVmI33tAQ7yJBvO+CmYlzuUFozgN0rLyxK9CKMz7WcsWHDL+5ZyOkb/uW96CxxDbS axwtrECjGyEEq2UdOXZVldcMivLMVojmPsAKLe9A= Received: from liangyong-System-Product-Name.. ([113.104.215.224]) by newxmesmtplogicsvrsza15-1.qq.com (NewEsmtp) with SMTP id 3E9B86CB; Wed, 18 Sep 2024 22:15:41 +0800 X-QQ-mid: xmsmtpt1726668941tjz703sfu Message-ID: X-QQ-XMAILINFO: MB5+LsFw85No2aJ1r/qYpHprOuhDi1wcu9XiKIG43UpI+NSTl+yDxZpzzHTqQs ORbKdFA38W4XURiZiAr2FEOC3xWAWBuV9RNUe8KdfiPpt8Lc7KjiLoVLn9VBShmJfxPYg45eLmWH bQ8h0kPWHzMUm9kFfsl6WG3c44TfCGQ8S0gEZjYxyO0rCGmC7yZzg6Y+HjVukc/Q64vIR+MHoeSl JdMGvx9DoAybyHryeP96nv7ZcR1Tk3VmpdrKPxRbqMofDWIP1LZ4//gGoZDhR5gNda370QmfwZwC cALdm+BNLvssQygaNWrepIxGuIgpNHQObFPPgRuMpiKBnPGU445JQhACJSuZqlCAwFNsSkzQsekL b+6jnYtp6NujHUqMcHJnN2mfMh1czbKO1E3gD90n3HTRkt5EgXx1jnzm3vonCpYkO2mqkEbplqgz dKvjrVIG5NOaJtuIUVicoCgd3xYKKmHs/pav/gpM89luE+maYCMDR2ShwaXksxrTdGX/bDar7v7Q 3nSgb/oXn+Ohfr7Yn8cTJ8QHzhTmfAOfg4x1zi6PKtGLOg+p6sMfTEPOW1Myl77dC3t1pHWsTwIP K+HWuEA2K1hdVMlvDdIbvmW2BXElHn0P8h4bmQeLSkiumBw4Q5k0WdoNhcEQeYDbT1DF/qi4kE8i TP1qBySB48OWCLtWGia2j/RFD5KQJwyH835emWfbp4FwIpPumDtspFV8o+7Q0Tnu+YQjPj9sUeqx z4udir0Blqk5DQcXH6lEu0SJNR/WEZWISgNPOiaraKc8P4rRLBFdL9NIWp9Tf0DZsLglaGwdTx8k AVV0nSvGfQ08x1F6haLICsG98kIUibRGu1Z8Ew/75bJ5KsCMeLiFcJ7MN72AfSagLH2xTZ4TBesl g0zFmAWKaViXH5ZhnI0AeXkkBdUh9r+A7H2NXol02JxmH+yEtWR6CbE9o6hY4PTGlQKQAgCS4oIj 1r5SiX52EktGjRaCw02/5fPgBC4GZ9oRQSh+p1IiU457Hsyp74UhJj3vGzqylKWN90dmaWlN4UjT puH7f5l3vLNrHlGrq4L01Q3G5NEAU9EqTUzUM1x4ePU06x23YM/x9OBabScXA= X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Yong Liang <1269690261@qq.com> To: dev@dpdk.org Cc: roy.fan.zhang@intel.com Subject: [PATCH] crypto/scheduler: fix incorrect variable usage Date: Wed, 18 Sep 2024 22:15:21 +0800 X-OQ-MSGID: <20240918141521.5447-1-1269690261@qq.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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