* [PATCH] ethdev: restore eth_da init at startup of rte_eth_devargs_parse()
@ 2024-03-11 11:44 Thierry Herbelot
2024-03-11 11:51 ` [V2] " Thierry Herbelot
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Herbelot @ 2024-03-11 11:44 UTC (permalink / raw)
To: dev; +Cc: Thierry Herbelot, Thomas Monjalon, Harman Kalra, Ferruh Yigit
Commit 9a9eb104ed ("ethdev: parse multiple representor devargs") removes
the following variable initialization in rte_eth_devargs_parse():
memset(eth_da, 0, sizeof(*eth_da));
Restore the memset, as this causes regression in ixgbe PCI probe.
Fixes: 9a9eb104ed ("ethdev: parse multiple representor devargs")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
lib/ethdev/ethdev_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 1660dd3f2a46..7513b990157f 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -617,6 +617,8 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_devargs,
unsigned int i;
int result = 0;
+ memset(eth_da, 0, sizeof(*eth_da));
+
result = eth_dev_devargs_tokenise(&args, dargs);
if (result < 0)
goto parse_cleanup;
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [V2] ethdev: restore eth_da init at startup of rte_eth_devargs_parse()
2024-03-11 11:44 [PATCH] ethdev: restore eth_da init at startup of rte_eth_devargs_parse() Thierry Herbelot
@ 2024-03-11 11:51 ` Thierry Herbelot
2024-03-11 11:57 ` [V3] ethdev: restore eth_devargs " Thierry Herbelot
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Herbelot @ 2024-03-11 11:51 UTC (permalink / raw)
To: dev; +Cc: Thierry Herbelot, Thomas Monjalon, Harman Kalra, Ferruh Yigit
Commit 9a9eb104edf6 ("ethdev: parse multiple representor devargs") removes
the following variable initialization in rte_eth_devargs_parse():
memset(eth_da, 0, sizeof(*eth_da));
Restore the memset, as this causes regression in ixgbe PCI probe.
Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
V2: fix git hash length
lib/ethdev/ethdev_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 1660dd3f2a46..7513b990157f 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -617,6 +617,8 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_devargs,
unsigned int i;
int result = 0;
+ memset(eth_da, 0, sizeof(*eth_da));
+
result = eth_dev_devargs_tokenise(&args, dargs);
if (result < 0)
goto parse_cleanup;
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [V3] ethdev: restore eth_devargs init at startup of rte_eth_devargs_parse()
2024-03-11 11:51 ` [V2] " Thierry Herbelot
@ 2024-03-11 11:57 ` Thierry Herbelot
2024-03-11 12:55 ` [V4] ethdev: restore eth_da " Thierry Herbelot
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Herbelot @ 2024-03-11 11:57 UTC (permalink / raw)
To: dev; +Cc: Thierry Herbelot, Thomas Monjalon, Harman Kalra, Ferruh Yigit
Commit 9a9eb104edf6 ("ethdev: parse multiple representor devargs") removes
the following variable initialization in rte_eth_devargs_parse():
memset(eth_da, 0, sizeof(*eth_da));
Restore the memset, as this causes regression in ixgbe PCI probe.
Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
V3: fix variable name
V2: fix git hash length
lib/ethdev/ethdev_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 1660dd3f2a46..18f1144dcdeb 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -617,6 +617,8 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_devargs,
unsigned int i;
int result = 0;
+ memset(eth_devargs, 0, sizeof(*eth_devargs));
+
result = eth_dev_devargs_tokenise(&args, dargs);
if (result < 0)
goto parse_cleanup;
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [V4] ethdev: restore eth_da init at startup of rte_eth_devargs_parse()
2024-03-11 11:57 ` [V3] ethdev: restore eth_devargs " Thierry Herbelot
@ 2024-03-11 12:55 ` Thierry Herbelot
2024-03-11 14:56 ` Ferruh Yigit
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Herbelot @ 2024-03-11 12:55 UTC (permalink / raw)
To: dev
Cc: Thierry Herbelot, Thomas Monjalon, Harman Kalra, Ferruh Yigit,
Olivier Matz
Commit 9a9eb104edf6 ("ethdev: parse multiple representor devargs") removes
the following variable initialization in rte_eth_devargs_parse():
memset(eth_da, 0, sizeof(*eth_da));
Restore the memset, as this causes regression in ixgbe PCI probe.
As the listed commit introduces a new argument: nb_da, the memset
takes it into account.
Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
V4: use nb_da to define the size of the memset
V3: fix variable name
V2: fix git hash length
lib/ethdev/ethdev_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 1660dd3f2a46..f48c0eb8bc5a 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -617,6 +617,8 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_devargs,
unsigned int i;
int result = 0;
+ memset(eth_devargs, 0, nb_da * sizeof(*eth_devargs));
+
result = eth_dev_devargs_tokenise(&args, dargs);
if (result < 0)
goto parse_cleanup;
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [V4] ethdev: restore eth_da init at startup of rte_eth_devargs_parse()
2024-03-11 12:55 ` [V4] ethdev: restore eth_da " Thierry Herbelot
@ 2024-03-11 14:56 ` Ferruh Yigit
0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2024-03-11 14:56 UTC (permalink / raw)
To: Thierry Herbelot, dev; +Cc: Thomas Monjalon, Harman Kalra, Olivier Matz
On 3/11/2024 12:55 PM, Thierry Herbelot wrote:
> Commit 9a9eb104edf6 ("ethdev: parse multiple representor devargs") removes
> the following variable initialization in rte_eth_devargs_parse():
>
> memset(eth_da, 0, sizeof(*eth_da));
>
> Restore the memset, as this causes regression in ixgbe PCI probe.
>
> As the listed commit introduces a new argument: nb_da, the memset
> takes it into account.
>
> Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>
Thanks for the fix,
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
Applied to dpdk-next-net/main, thanks.
Patch title and commit log updated as following while merging:
```
ethdev: fix uninitialised representor devargs
rte_eth_devargs_parse() stops initialising eth_devargs variable to zero,
which causes regression in ixgbe PCI probe.
Restore the memset for fix.
As the listed commit introduces a new argument: nb_da, the memset
takes it into account.
Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
```
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-11 14:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11 11:44 [PATCH] ethdev: restore eth_da init at startup of rte_eth_devargs_parse() Thierry Herbelot
2024-03-11 11:51 ` [V2] " Thierry Herbelot
2024-03-11 11:57 ` [V3] ethdev: restore eth_devargs " Thierry Herbelot
2024-03-11 12:55 ` [V4] ethdev: restore eth_da " Thierry Herbelot
2024-03-11 14:56 ` Ferruh Yigit
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).