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 598BA4624E for ; Mon, 17 Feb 2025 18:05:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 501DA400EF; Mon, 17 Feb 2025 18:05:54 +0100 (CET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id E2BBE400D6 for ; Mon, 17 Feb 2025 18:05:52 +0100 (CET) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38f31f7731fso1471392f8f.0 for ; Mon, 17 Feb 2025 09:05:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739811952; x=1740416752; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aj/AB/Xz6vfIzPzQZ0dQyzok+hqa7DVBEU489WpPQqk=; b=Fdhi3hprR4HYxEgpoKNFiSE3RMDQBpjrfCsLE/LnoDA64MeEJdcl08EvlCwOb9tH69 /l23UAPchEL0FcJeSTcDb9/MFYiZ+xmdhXMkBRM0FVxHJup71/L3S2xY6zQXsioZLbgy WBulJidArsBNsM+62mO6msQ+H8BT1VbQOJDSjBQTdRtOIqJJiEnfEEcFBM5fcfqS51HX RX6fxAFh9jBtMpnaJR9oG7zVzG55so9qF9ftpdQlrWr3NJ5j/SjNj6H9HCDRy9h1pAje CNbxdisykdBsKz6d40M0FKHFKQ03itC/h5fhCGqEQYjfEtVHEDcEii40/zE6deKXywGi Iysw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739811952; x=1740416752; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aj/AB/Xz6vfIzPzQZ0dQyzok+hqa7DVBEU489WpPQqk=; b=Sq5Btim92dIdR8MZeSV5W7yXc/LkgQ81KNp9ExqMKcwFWfIo0vPmByFuCcLwxoygZl nB5s293O0DdKr7CJZt7Pxj4iv2Kgezqbh3Ej4SfAxrF3CqUyTRlVpMTusrBkmucFuIf7 cl5cEm2U3qPYE2cHgG30F6yinyFyCu4lLZ1L1MF7M+uMEn0qM2zdpdcsCt/7cYouEAu7 By7daadnAazRE8nE1t5qzRd/uFrgHLNQLfb7+VESksTwL21awEUc6YMX2U4cgskXeAik T3VJIFpEQFNddQYO7EFK1q9L99mJYJKeEkQp/U0IrIAM37aNPcFEsTKT2AZnAD4WpwVL Th1Q== X-Forwarded-Encrypted: i=1; AJvYcCVAdjj+TDws9uGddeYcsBeCRrdCFnX/xhu+blFWPoM0A/uleednlIvupwdVo4sr+0jzOrZsUMs=@dpdk.org X-Gm-Message-State: AOJu0YyCPTZmGhhVXlesJeYDJsL2vQOVhzgSvEN9Y8uHcvaYelnDJzNH NURR8hvCZToinitSymt7grXF6ipQ2Eb7oCJPyKWFGErwsoEa0jAtkviTcYdAqdr3UA== X-Gm-Gg: ASbGnctygm2HAEz+mMhApc7/jdDvi1QOnMHYVVrqkHX8dsF8/qCNUEr4iyjHgWiYxrv +tsVjo9jDkmxgc4HKorASTNDa1TzUYUxmKK2KDebS8ku7ffhcTpbeMhJ7CypJYgBsab7uptKxoo 2RU9XPkzJaryD0yrfBvqaM/YM094zVPp09xBhRtpqfVm9spLgM5sw7WKB5aPFz4Ro+GyDpsm+GD WcJmO+C/MxOi8Klb2xDA6CeubfO1Fgwf0A9AJD40a/oLiXSM91wqyAuQfTIZhBTVXIFKWtrBWmx We7Jpc8aB/7gm/0m0XK8YA== X-Google-Smtp-Source: AGHT+IG3SxWOw+apLROYea+9mwrDlt2z5OwYxMAVkh3duqwVrqrNwwBd6An1Lecr3dYMmR0hv5c9zQ== X-Received: by 2002:a05:6000:dc6:b0:38f:3015:b9f4 with SMTP id ffacd0b85a97d-38f33f337eamr7456014f8f.27.1739811952381; Mon, 17 Feb 2025 09:05:52 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-38f258b412esm12545022f8f.1.2025.02.17.09.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:05:51 -0800 (PST) From: luca.boccassi@gmail.com To: Gowrishankar Muthukrishnan Cc: Akhil Goyal , dpdk stable Subject: patch 'crypto/virtio: fix data queues iteration' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:03:52 +0000 Message-ID: <20250217170456.1068278-19-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/0fda42768976db5e1e2324925bb79754e874cac2 Thanks. Luca Boccassi --- >From 0fda42768976db5e1e2324925bb79754e874cac2 Mon Sep 17 00:00:00 2001 From: Gowrishankar Muthukrishnan Date: Tue, 7 Jan 2025 23:06:02 +0530 Subject: [PATCH] crypto/virtio: fix data queues iteration [ upstream commit e27ff6e63a8d6202149d5b458ad3d78711806dfc ] Fix dataqueues iteration using nb_queue_pairs info available in device data instead of max dataqueues as dataqueue count might have been changed in device configuration. Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- drivers/crypto/virtio/virtio_cryptodev.c | 3 +-- drivers/crypto/virtio/virtio_rxtx.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index b696cedb49..51e560e045 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -849,9 +849,8 @@ static void virtio_crypto_dev_free_mbufs(struct rte_cryptodev *dev) { uint32_t i; - struct virtio_crypto_hw *hw = dev->data->dev_private; - for (i = 0; i < hw->max_dataqueues; i++) { + for (i = 0; i < dev->data->nb_queue_pairs; i++) { VIRTIO_CRYPTO_INIT_LOG_DBG("Before freeing dataq[%d] used " "and unused buf", i); VIRTQUEUE_DUMP((struct virtqueue *) diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c index 48b5f4ebbb..d02486661f 100644 --- a/drivers/crypto/virtio/virtio_rxtx.c +++ b/drivers/crypto/virtio/virtio_rxtx.c @@ -419,12 +419,11 @@ virtio_crypto_dataq_start(struct rte_cryptodev *dev) * - Setup vring structure for data queues */ uint16_t i; - struct virtio_crypto_hw *hw = dev->data->dev_private; PMD_INIT_FUNC_TRACE(); /* Start data vring. */ - for (i = 0; i < hw->max_dataqueues; i++) { + for (i = 0; i < dev->data->nb_queue_pairs; i++) { virtio_crypto_vring_start(dev->data->queue_pairs[i]); VIRTQUEUE_DUMP((struct virtqueue *)dev->data->queue_pairs[i]); } -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:17.556847303 +0000 +++ 0019-crypto-virtio-fix-data-queues-iteration.patch 2025-02-17 16:13:16.802441593 +0000 @@ -1 +1 @@ -From e27ff6e63a8d6202149d5b458ad3d78711806dfc Mon Sep 17 00:00:00 2001 +From 0fda42768976db5e1e2324925bb79754e874cac2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e27ff6e63a8d6202149d5b458ad3d78711806dfc ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 98415af123..b4a6fae9e0 100644 +index b696cedb49..51e560e045 100644 @@ -24 +25 @@ -@@ -848,9 +848,8 @@ static void +@@ -849,9 +849,8 @@ static void