Skip to content

Commit

Permalink
Fix: ice/iavf port stats now work in BESS
Browse files Browse the repository at this point in the history
```
 # HELP upf_bytes_count Shows the number of bytes received by the UPF port
 # TYPE upf_bytes_count counter
 upf_bytes_count{dir="rx",iface="Access"} 2.721340866076e+12
 upf_bytes_count{dir="rx",iface="Core"} 2.711668992744e+12
 upf_bytes_count{dir="tx",iface="Access"} 1.937074248052e+12
 upf_bytes_count{dir="tx",iface="Core"} 5.31949604808e+11
 # HELP upf_dropped_count Shows the number of packets dropped on receive by the UPF port
 # TYPE upf_dropped_count counter
 upf_dropped_count{dir="rx",iface="Access"} 2.084059945e+09
 upf_dropped_count{dir="rx",iface="Core"} 7.81396192e+08
 upf_dropped_count{dir="tx",iface="Access"} 0
 upf_dropped_count{dir="tx",iface="Core"} 0
 # HELP upf_packets_count Shows the number of packets received by the UPF port
 # TYPE upf_packets_count counter
 upf_packets_count{dir="rx",iface="Access"} 5.24598359e+08
 upf_packets_count{dir="rx",iface="Core"} 1.843303614e+09
 upf_packets_count{dir="tx",iface="Access"} 1.843260648e+09
 upf_packets_count{dir="tx",iface="Core"} 5.24610368e+08
```

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
  • Loading branch information
krsna1729 committed Apr 27, 2021
1 parent 4f6a87e commit e3f53d5
Showing 1 changed file with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From d8cb6e1c0fbbc4bb4728c7e379f65b0b8b47cb96 Mon Sep 17 00:00:00 2001
From: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Date: Thu, 22 Apr 2021 02:15:36 +0000
Subject: [PATCH] Add ice/iavf to list of drivers need SW port stats

Now BESS is able to report bytes and packet counts

```
02:10:38.741198 INC Mbps Mpps dropped OUT Mbps Mpps Dropped
------------------------------------------------------------------------------------------------
accessFastPMDPort 49237.4 1.201 4671498 35814.6 4.165 0
accessSlowPMDPort 0.0 0.000 0 0.0 0.000 0
coreFastPMDPort 49633.4 4.164 1744421 9968.8 1.200 0
coreSlowPMDPort 0.0 0.000 0 0.0 0.000 0
------------------------------------------------------------------------------------------------
Total 98868.1 5.365 6415826 45782.9 5.366 0
```

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
---
core/drivers/pmd.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/core/drivers/pmd.cc b/core/drivers/pmd.cc
index 003bf7ff..db7b170e 100644
--- a/core/drivers/pmd.cc
+++ b/core/drivers/pmd.cc
@@ -599,9 +599,10 @@ void PMDPort::CollectStats(bool reset) {

port_stats_.inc.dropped = stats.imissed;

- // i40e/net_e1000_igb PMD drivers, ixgbevf and net_bonding vdevs don't support
- // per-queue stats
- if (driver_ == "net_i40e" || driver_ == "net_i40e_vf" ||
+ // ice/i40e/net_e1000_igb PMD drivers, ixgbevf and net_bonding vdevs don't
+ // support per-queue stats
+ if (driver_ == "net_ice" || driver_ == "net_iavf" ||
+ driver_ == "net_i40e" || driver_ == "net_i40e_vf" ||
driver_ == "net_ixgbe_vf" || driver_ == "net_bonding" ||
driver_ == "net_e1000_igb") {
// NOTE:
--
2.25.1

0 comments on commit e3f53d5

Please sign in to comment.