ethdev: fix corrupted device info in configure
authorFerruh Yigit <ferruh.yigit@intel.com>
Wed, 9 May 2018 22:16:49 +0000 (23:16 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:51 +0000 (22:31 +0100)
commitd99aba89545dfada8ab04897d32b3b31df45f4ed
tree1bc75eabe7f1accc465f9fae9d7421d0eaaeb5be
parent95e7a72f9decd1db38dfb754b485dd4ac6859def
ethdev: fix corrupted device info in configure

Calling dev_infos_get() devops directly in rte_eth_dev_configure cause
random values in uninitialized fields because devops doesn't reset the
dev_info structure.

Call rte_eth_dev_info_get() API instead which memset the struct.

Also remove duplicated dev_infos_get existence check.

Fixes: 3be82f5cc5e3 ("ethdev: support PMD-tuned Tx/Rx parameters")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
lib/librte_ethdev/rte_ethdev.c