Handle errors from rte_eth_dev_info_get in the same manner as other places in this file.
Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/net/memif/rte_eth_memif.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index e220ffaf92..227025dd20 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -520,7 +520,10 @@ eth_memif_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) return 0; if (unlikely(ring == NULL)) { /* Secondary process will attempt to request regions. */ - rte_eth_link_get(mq->in_port, &link); + ret = rte_eth_link_get(mq->in_port, &link); + if (ret < 0) + MIF_LOG(ERR, "Failed to get port %u link info: %s", + mq->in_port, rte_strerror(-ret)); return 0; } @@ -864,8 +867,13 @@ eth_memif_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely((pmd->flags & ETH_MEMIF_FLAG_CONNECTED) == 0)) return 0; if (unlikely(ring == NULL)) { + int ret; + /* Secondary process will attempt to request regions. */ - rte_eth_link_get(mq->in_port, &link); + ret = rte_eth_link_get(mq->in_port, &link); + if (ret < 0) + MIF_LOG(ERR, "Failed to get port %u link info: %s", + mq->in_port, rte_strerror(-ret)); return 0; } -- 2.45.2