* [PATCH v1 1/1] app/mldev: updates to device ops test
@ 2023-08-30 15:52 Srikanth Yalavarthi
2023-10-03 15:47 ` Anup Prabhu
2023-10-05 9:15 ` Shivah Shankar Shankar Narayan Rao
0 siblings, 2 replies; 4+ messages in thread
From: Srikanth Yalavarthi @ 2023-08-30 15:52 UTC (permalink / raw)
To: Srikanth Yalavarthi, Anup Prabhu; +Cc: dev, sshankarnara, ptakkar, stable
Updated device_ops test to configure the device with
user specific arguments. Fix handling unsupported
values for queue_pairs and queue_size
Fixes: c0e871657d6a ("app/mldev: support queue pairs and size")
Cc: stable@dpdk.org
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
app/test-mldev/test_common.c | 10 ++++++++++
app/test-mldev/test_device_ops.c | 18 ++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/app/test-mldev/test_common.c b/app/test-mldev/test_common.c
index 3cf1362285b..357a85a3126 100644
--- a/app/test-mldev/test_common.c
+++ b/app/test-mldev/test_common.c
@@ -106,6 +106,16 @@ ml_test_opt_check(struct ml_options *opt)
return -EINVAL;
}
+ if (opt->queue_pairs == 0) {
+ ml_err("Invalid option, queue_pairs = %d", opt->queue_pairs);
+ return -EINVAL;
+ }
+
+ if (opt->queue_size == 0) {
+ ml_err("Invalid option, queue_size = %d", opt->queue_size);
+ return -EINVAL;
+ }
+
return 0;
}
diff --git a/app/test-mldev/test_device_ops.c b/app/test-mldev/test_device_ops.c
index 81b3ca18f36..dacc0232a2f 100644
--- a/app/test-mldev/test_device_ops.c
+++ b/app/test-mldev/test_device_ops.c
@@ -102,15 +102,17 @@ test_device_reconfigure(struct ml_test *test, struct ml_options *opt)
if (ret != 0)
return ret;
- /* setup one queue pair with nb_desc = 1 */
- qp_conf.nb_desc = 1;
- qp_conf.cb = NULL;
+ /* setup queue pairs with nb_user options */
+ for (qp_id = 0; qp_id < opt->queue_pairs; qp_id++) {
+ qp_conf.nb_desc = opt->queue_size;
+ qp_conf.cb = NULL;
- ret = rte_ml_dev_queue_pair_setup(opt->dev_id, qp_id, &qp_conf, opt->socket_id);
- if (ret != 0) {
- ml_err("Failed to setup ML device queue-pair, dev_id = %d, qp_id = %u\n",
- opt->dev_id, qp_id);
- goto error;
+ ret = rte_ml_dev_queue_pair_setup(opt->dev_id, qp_id, &qp_conf, opt->socket_id);
+ if (ret != 0) {
+ ml_err("Failed to setup ML device queue-pair, dev_id = %d, qp_id = %u\n",
+ opt->dev_id, qp_id);
+ goto error;
+ }
}
/* start device */
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* RE: [PATCH v1 1/1] app/mldev: updates to device ops test
2023-08-30 15:52 [PATCH v1 1/1] app/mldev: updates to device ops test Srikanth Yalavarthi
@ 2023-10-03 15:47 ` Anup Prabhu
2023-11-14 21:21 ` Thomas Monjalon
2023-10-05 9:15 ` Shivah Shankar Shankar Narayan Rao
1 sibling, 1 reply; 4+ messages in thread
From: Anup Prabhu @ 2023-10-03 15:47 UTC (permalink / raw)
To: Srikanth Yalavarthi, Srikanth Yalavarthi
Cc: dev@dpdk.org, Shivah Shankar Shankar Narayan Rao, Prince Takkar,
stable@dpdk.org
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
> -----Original Message-----
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Sent: Wednesday, August 30, 2023 9:23 PM
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>; Anup Prabhu
> <aprabhu@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Prince Takkar <ptakkar@marvell.com>;
> stable@dpdk.org
> Subject: [PATCH v1 1/1] app/mldev: updates to device ops test
>
> Updated device_ops test to configure the device with user specific
> arguments. Fix handling unsupported values for queue_pairs and
> queue_size
>
> Fixes: c0e871657d6a ("app/mldev: support queue pairs and size")
> Cc: stable@dpdk.org
>
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Anup Prabhu <aprabhu@marvell.com>
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 35221 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v1 1/1] app/mldev: updates to device ops test
2023-10-03 15:47 ` Anup Prabhu
@ 2023-11-14 21:21 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2023-11-14 21:21 UTC (permalink / raw)
To: Srikanth Yalavarthi
Cc: dev, Shivah Shankar Shankar Narayan Rao, Prince Takkar,
stable@dpdk.org, Anup Prabhu
03/10/2023 17:47, Anup Prabhu:
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> > Updated device_ops test to configure the device with user specific
> > arguments. Fix handling unsupported values for queue_pairs and
> > queue_size
> >
> > Fixes: c0e871657d6a ("app/mldev: support queue pairs and size")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Acked-by: Anup Prabhu <aprabhu@marvell.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v1 1/1] app/mldev: updates to device ops test
2023-08-30 15:52 [PATCH v1 1/1] app/mldev: updates to device ops test Srikanth Yalavarthi
2023-10-03 15:47 ` Anup Prabhu
@ 2023-10-05 9:15 ` Shivah Shankar Shankar Narayan Rao
1 sibling, 0 replies; 4+ messages in thread
From: Shivah Shankar Shankar Narayan Rao @ 2023-10-05 9:15 UTC (permalink / raw)
To: Srikanth Yalavarthi, Srikanth Yalavarthi, Anup Prabhu
Cc: dev@dpdk.org, Prince Takkar, stable@dpdk.org
> -----Original Message-----
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Sent: Wednesday, August 30, 2023 9:23 PM
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>; Anup Prabhu
> <aprabhu@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Prince Takkar <ptakkar@marvell.com>;
> stable@dpdk.org
> Subject: [PATCH v1 1/1] app/mldev: updates to device ops test
>
> Updated device_ops test to configure the device with user specific
> arguments. Fix handling unsupported values for queue_pairs and
> queue_size
>
> Fixes: c0e871657d6a ("app/mldev: support queue pairs and size")
> Cc: stable@dpdk.org
>
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Shivah Shankar S <sshankarnara@marvell.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-14 21:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-30 15:52 [PATCH v1 1/1] app/mldev: updates to device ops test Srikanth Yalavarthi
2023-10-03 15:47 ` Anup Prabhu
2023-11-14 21:21 ` Thomas Monjalon
2023-10-05 9:15 ` Shivah Shankar Shankar Narayan Rao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.