[V4] ethdev: restore eth_da init at startup of rte_eth_devargs_parse()
Thierry Herbelot
thierry.herbelot at 6wind.com
Mon Mar 11 13:55:18 CET 2024
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 at 6wind.com>
Signed-off-by: Olivier Matz <olivier.matz at 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
More information about the dev
mailing list