[dpdk-dev] vhost: fix Tx error counting of vhost PMD

Message ID 1466733860-5364-1-git-send-email-mukawa@igel.co.jp (mailing list archive)
State Accepted, archived
Delegated to: Yuanhan Liu
Headers

Commit Message

Tetsuya Mukawa June 24, 2016, 2:04 a.m. UTC
  According to 'rte_eth_stats' structure comments, 'imissed'
should represent RX error counting, but currently 'imissed' is
used to count TX error.
The patch replaces 'imissed' by 'oerrors'.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
 drivers/net/vhost/rte_eth_vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yuanhan Liu June 24, 2016, 2:17 a.m. UTC | #1
On Fri, Jun 24, 2016 at 11:04:20AM +0900, Tetsuya Mukawa wrote:
> According to 'rte_eth_stats' structure comments, 'imissed'
> should represent RX error counting, but currently 'imissed' is
> used to count TX error.
> The patch replaces 'imissed' by 'oerrors'.
> 
> Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>

Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

(And sorry for the delay: I planned to look at the report from
you at the earlier of this week; but somehow I forgot :(

	--yliu
  
Tetsuya Mukawa June 24, 2016, 3:08 a.m. UTC | #2
On 2016/06/24 11:17, Yuanhan Liu wrote:
> On Fri, Jun 24, 2016 at 11:04:20AM +0900, Tetsuya Mukawa wrote:
>> According to 'rte_eth_stats' structure comments, 'imissed'
>> should represent RX error counting, but currently 'imissed' is
>> used to count TX error.
>> The patch replaces 'imissed' by 'oerrors'.
>>
>> Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
>> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
> 
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> (And sorry for the delay: I planned to look at the report from
> you at the earlier of this week; but somehow I forgot :(
> 
> 	--yliu
> 

Hi Yuanhan,

No need to worry. Thanks for your checking!

Thanks,
Tetsuya
  
Yuanhan Liu June 30, 2016, 5:23 a.m. UTC | #3
On Fri, Jun 24, 2016 at 10:17:20AM +0800, Yuanhan Liu wrote:
> On Fri, Jun 24, 2016 at 11:04:20AM +0900, Tetsuya Mukawa wrote:
> > According to 'rte_eth_stats' structure comments, 'imissed'
> > should represent RX error counting, but currently 'imissed' is
> > used to count TX error.
> > The patch replaces 'imissed' by 'oerrors'.
> > 
> > Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
> > Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
> 
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Applied to dpdk-next-virtio.

Thanks.

	--yliu
  

Patch

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index c5bbb87..3b50946 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -594,7 +594,7 @@  eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
 	stats->ipackets = rx_total;
 	stats->opackets = tx_total;
-	stats->imissed = tx_missed_total;
+	stats->oerrors = tx_missed_total;
 	stats->ibytes = rx_total_bytes;
 	stats->obytes = tx_total_bytes;
 }