[dpdk-dev] [PATCH] net/iavf: fix return value of stats get function

cheng.peng5 at zte.com.cn cheng.peng5 at zte.com.cn
Tue Apr 14 03:56:57 CEST 2020


The iavf_dev_stats_get function should return ret instead of -eio.

Signed-off-by: Peng Cheng <cheng.peng5 at zte.com.cn>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 34913f9..93ab121 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1074,7 +1074,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	} else {
 		PMD_DRV_LOG(ERR, "Get statistics failed");
 	}
-	return -EIO;
+	return ret;
 }

 static int
-- 
1.8.3.1


More information about the dev mailing list