summaryrefslogtreecommitdiff
path: root/drivers/net/softnic
diff options
context:
space:
mode:
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>2019-09-12 17:42:27 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 14:45:35 +0200
commit062d35f81433b669a128f643bbee265b5496ff5c (patch)
treed8afbe5ffedb6247744d2bd8680755cbfc739854 /drivers/net/softnic
parent2db039a759d835ea69297dceade0b03b87998ebc (diff)
downloaddpdk-062d35f81433b669a128f643bbee265b5496ff5c.zip
dpdk-062d35f81433b669a128f643bbee265b5496ff5c.tar.gz
dpdk-062d35f81433b669a128f643bbee265b5496ff5c.tar.xz
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>
Diffstat (limited to 'drivers/net/softnic')
-rw-r--r--drivers/net/softnic/rte_eth_softnic_link.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/softnic/rte_eth_softnic_link.c b/drivers/net/softnic/rte_eth_softnic_link.c
index d669913..21a6406 100644
--- a/drivers/net/softnic/rte_eth_softnic_link.c
+++ b/drivers/net/softnic/rte_eth_softnic_link.c
@@ -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));