net/iavf: fix return value of stats get function
diff mbox series

Message ID 202004140956577212766@zte.com.cn
State Accepted, archived
Delegated to: xiaolong ye
Headers show
Series
  • net/iavf: fix return value of stats get function
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

cheng.peng5@zte.com.cn April 14, 2020, 1:56 a.m. UTC
The iavf_dev_stats_get function should return ret instead of -eio.

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

Comments

Xiaolong Ye April 22, 2020, 7:27 a.m. UTC | #1
Hi, 

Thanks for the fix.

On 04/14, cheng.peng5@zte.com.cn wrote:
>The iavf_dev_stats_get function should return ret instead of -eio.
>

Fixes: f4a41a6953af ("net/avf: support stats")
Cc: stable@dpdk.org

>Signed-off-by: Peng Cheng <cheng.peng5@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

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel with fixes tag and cc table, Thanks.

Patch
diff mbox series

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