[dpdk-dev] vmxnet3: fill in imissed stat with pktsRxOutOfBuf

Message ID 20180407172952.6164-1-nuxi@vault24.org (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail Compilation issues

Commit Message

Jon DeVree April 7, 2018, 5:29 p.m. UTC
  This counter comes from a "hardware" register of the vmxnet3 device and
seems to behave like the MPC (Missed Packet Count) register of the Intel
NICs. So I think this data belongs in the imissed field rather than the
rx_nombuf field.

Signed-off-by: Jon DeVree <nuxi@vault24.org>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yong Wang April 11, 2018, 5:02 a.m. UTC | #1
On 4/7/18, 10:30 AM, "Jon DeVree" <nuxi@vault24.org> wrote:

    This counter comes from a "hardware" register of the vmxnet3 device and
    seems to behave like the MPC (Missed Packet Count) register of the Intel
    NICs. So I think this data belongs in the imissed field rather than the
    rx_nombuf field.
    
    Signed-off-by: Jon DeVree <nuxi@vault24.org>

    ---
Acked-by: Yong Wang <yongwang@vmware.com>


     drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
    index 426008722..4ef2d7d3b 100644
    --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
    +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
    @@ -1015,7 +1015,7 @@ vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
     
     		stats->q_errors[i] = rxStats.pktsRxError;
     		stats->ierrors += rxStats.pktsRxError;
    -		stats->rx_nombuf += rxStats.pktsRxOutOfBuf;
    +		stats->imissed += rxStats.pktsRxOutOfBuf;
     	}
     
     	return 0;
    -- 
    2.17.0
  
Ferruh Yigit April 13, 2018, 11:19 p.m. UTC | #2
On 4/11/2018 6:02 AM, Yong Wang wrote:
> On 4/7/18, 10:30 AM, "Jon DeVree" <nuxi@vault24.org> wrote:
> 
>     This counter comes from a "hardware" register of the vmxnet3 device and
>     seems to behave like the MPC (Missed Packet Count) register of the Intel
>     NICs. So I think this data belongs in the imissed field rather than the
>     rx_nombuf field.
>     
>     Signed-off-by: Jon DeVree <nuxi@vault24.org>
>     ---
> Acked-by: Yong Wang <yongwang@vmware.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 426008722..4ef2d7d3b 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1015,7 +1015,7 @@  vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
 		stats->q_errors[i] = rxStats.pktsRxError;
 		stats->ierrors += rxStats.pktsRxError;
-		stats->rx_nombuf += rxStats.pktsRxOutOfBuf;
+		stats->imissed += rxStats.pktsRxOutOfBuf;
 	}
 
 	return 0;