net/softnic: check status of getting ethdev info

rte_eth_dev_info_get() return value was changed from void to
int, so this patch modify rte_eth_dev_info_get() usage across
net/softnic according to its new return type.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Ivan Ilchenko 2019-09-12 17:42:27 +01:00 committed by Ferruh Yigit
parent 2db039a759
commit 062d35f814

View File

@ -57,6 +57,7 @@ softnic_link_create(struct pmd_internals *p,
struct rte_eth_dev_info port_info;
struct softnic_link *link;
uint16_t port_id;
int ret;
/* Check input params */
if (name == NULL ||
@ -78,7 +79,9 @@ softnic_link_create(struct pmd_internals *p,
return NULL;
}
rte_eth_dev_info_get(port_id, &port_info);
ret = rte_eth_dev_info_get(port_id, &port_info);
if (ret != 0)
return NULL;
/* Node allocation */
link = calloc(1, sizeof(struct softnic_link));