* [dpdk-dev] [PATCH] eal: fix device iterator issue to find device for class type
@ 2021-10-29 10:53 Vijay Srivastava
2021-11-02 6:13 ` Xueming(Steven) Li
0 siblings, 1 reply; 3+ messages in thread
From: Vijay Srivastava @ 2021-10-29 10:53 UTC (permalink / raw)
To: dev; +Cc: xuemingl, andrew.rybchenko, praveenj, Vijay Srivastava
devarg parser rte_devargs_layers_parse() does not configures
devargs->bus_str for class type. rte_dev_iterator_init is not
setting devargs->bus_str to NULL before passing it to devarg parser.
It results junk value for bus_str and due to this device
iterator is unable to find device for class type.
Bugzilla ID: 862
Fixes: 9a1a9e4a2ddd (devargs: support path value with global device syntax)
Signed-off-by: Vijay Srivastava <vsrivast@xilinx.com>
---
lib/eal/common/eal_common_dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 148a238..4efdd8e 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -577,6 +577,8 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name)
struct rte_class *cls = NULL;
struct rte_bus *bus = NULL;
+ memset(&devargs, 0, sizeof(devargs));
+
/* Having both bus_str and cls_str NULL is illegal,
* marking this iterator as invalid unless
* everything goes well.
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] eal: fix device iterator issue to find device for class type
2021-10-29 10:53 [dpdk-dev] [PATCH] eal: fix device iterator issue to find device for class type Vijay Srivastava
@ 2021-11-02 6:13 ` Xueming(Steven) Li
2021-11-04 10:33 ` David Marchand
0 siblings, 1 reply; 3+ messages in thread
From: Xueming(Steven) Li @ 2021-11-02 6:13 UTC (permalink / raw)
To: vijay.srivastava, dev; +Cc: andrew.rybchenko, praveenj, vsrivast
On Fri, 2021-10-29 at 16:23 +0530, Vijay Srivastava wrote:
devarg parser rte_devargs_layers_parse() does not configures
devargs->bus_str for class type. rte_dev_iterator_init is not
setting devargs->bus_str to NULL before passing it to devarg parser.
It results junk value for bus_str and due to this device
iterator is unable to find device for class type.
Bugzilla ID: 862
Fixes: 9a1a9e4a2ddd (devargs: support path value with global device syntax)
Signed-off-by: Vijay Srivastava <vsrivast@xilinx.com<mailto:vsrivast@xilinx.com>>
---
lib/eal/common/eal_common_dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 148a238..4efdd8e 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -577,6 +577,8 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name)
struct rte_class *cls = NULL;
struct rte_bus *bus = NULL;
+ memset(&devargs, 0, sizeof(devargs));
+
/* Having both bus_str and cls_str NULL is illegal,
* marking this iterator as invalid unless
* everything goes well.
Thanks for the fix, I sent a fix earlier for same issue:
https://patches.dpdk.org/project/dpdk/patch/20211027082221.693957-1-xuemingl@nvidia.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] eal: fix device iterator issue to find device for class type
2021-11-02 6:13 ` Xueming(Steven) Li
@ 2021-11-04 10:33 ` David Marchand
0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2021-11-04 10:33 UTC (permalink / raw)
To: Xueming(Steven) Li, vijay.srivastava
Cc: dev, andrew.rybchenko, praveenj, vsrivast
On Tue, Nov 2, 2021 at 7:13 AM Xueming(Steven) Li <xuemingl@nvidia.com> wrote:
> On Fri, 2021-10-29 at 16:23 +0530, Vijay Srivastava wrote:
>
> devarg parser rte_devargs_layers_parse() does not configures
> devargs->bus_str for class type. rte_dev_iterator_init is not
> setting devargs->bus_str to NULL before passing it to devarg parser.
> It results junk value for bus_str and due to this device
> iterator is unable to find device for class type.
>
> Bugzilla ID: 862
> Fixes: 9a1a9e4a2ddd (devargs: support path value with global device syntax)
>
> Signed-off-by: Vijay Srivastava <vsrivast@xilinx.com<mailto:vsrivast@xilinx.com>>
> ---
> lib/eal/common/eal_common_dev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
> index 148a238..4efdd8e 100644
> --- a/lib/eal/common/eal_common_dev.c
> +++ b/lib/eal/common/eal_common_dev.c
> @@ -577,6 +577,8 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name)
> struct rte_class *cls = NULL;
> struct rte_bus *bus = NULL;
>
> + memset(&devargs, 0, sizeof(devargs));
> +
> /* Having both bus_str and cls_str NULL is illegal,
> * marking this iterator as invalid unless
> * everything goes well.
>
> Thanks for the fix, I sent a fix earlier for same issue:
> https://patches.dpdk.org/project/dpdk/patch/20211027082221.693957-1-xuemingl@nvidia.com/
I'll go with Xueming fix, referencing the opened bz.
Thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-04 10:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 10:53 [dpdk-dev] [PATCH] eal: fix device iterator issue to find device for class type Vijay Srivastava
2021-11-02 6:13 ` Xueming(Steven) Li
2021-11-04 10:33 ` David Marchand
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).