* [PATCH] crypto/virtio: fix dataqueues iteration
@ 2025-01-07 17:36 Gowrishankar Muthukrishnan
2025-01-08 5:42 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Gowrishankar Muthukrishnan @ 2025-01-07 17:36 UTC (permalink / raw)
To: dev, Akhil Goyal, Maxime Coquelin, Chenbo Xia, Fan Zhang, Jay Zhou
Cc: jerinj, anoobj, Gowrishankar Muthukrishnan, stable
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")
Cc: stable@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
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 98415af123..b4a6fae9e0 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -848,9 +848,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.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] crypto/virtio: fix dataqueues iteration
2025-01-07 17:36 [PATCH] crypto/virtio: fix dataqueues iteration Gowrishankar Muthukrishnan
@ 2025-01-08 5:42 ` Akhil Goyal
2025-01-08 12:31 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Akhil Goyal @ 2025-01-08 5:42 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan, dev, Maxime Coquelin, Chenbo Xia,
Fan Zhang, Jay Zhou
Cc: Jerin Jacob, Anoob Joseph, Gowrishankar Muthukrishnan, stable
> Subject: [PATCH] crypto/virtio: fix dataqueues iteration
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] crypto/virtio: fix dataqueues iteration
2025-01-08 5:42 ` Akhil Goyal
@ 2025-01-08 12:31 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2025-01-08 12:31 UTC (permalink / raw)
To: Akhil Goyal, Gowrishankar Muthukrishnan, dev, Maxime Coquelin,
Chenbo Xia, Fan Zhang, Jay Zhou
Cc: Jerin Jacob, Anoob Joseph, Gowrishankar Muthukrishnan, stable
> > Subject: [PATCH] crypto/virtio: fix dataqueues iteration
> >
> > 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")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-08 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-07 17:36 [PATCH] crypto/virtio: fix dataqueues iteration Gowrishankar Muthukrishnan
2025-01-08 5:42 ` Akhil Goyal
2025-01-08 12:31 ` Akhil Goyal
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).