[V3] ethdev: restore eth_devargs init at startup of rte_eth_devargs_parse()

Message ID 20240311115722.2708497-1-thierry.herbelot@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [V3] ethdev: restore eth_devargs init at startup of rte_eth_devargs_parse() |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Thierry Herbelot March 11, 2024, 11:57 a.m. UTC
  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(+)
  

Patch

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;