Skip to contentSkip to conversation

ice: Add slow path offload stats on port representor in switchdev

PATCH New Marcin Szycik 2 participants 2 messages Jan 27, 2022 – Feb 7, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: Add slow path offload stats on port representor in switchdev

Implement callbacks to check for stats and fetch port representor stats. Stats are taken from RX/TX ring corresponding to port representor and show the number of bytes/packets that were not offloaded.

To see slow path stats run:
ifstat -x cpu_hits -a

---
 drivers/net/ethernet/intel/ice/ice.h      |  3 ++
 drivers/net/ethernet/intel/ice/ice_main.c |  6 +--
 drivers/net/ethernet/intel/ice/ice_repr.c | 55 +++++++++++++++++++++++
 3 files changed, 61 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +3 -0
index bf792523830c..f158620442fb 100644
@@ -843,6 +843,9 @@ u16 ice_get_avail_rxq_count(struct ice_pf *pf);
 int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx);
 void ice_update_vsi_stats(struct ice_vsi *vsi);
 void ice_update_pf_stats(struct ice_pf *pf);
+void
+ice_fetch_u64_stats_per_ring(struct u64_stats_sync *syncp,
+			     struct ice_q_stats stats, u64 *pkts, u64 *bytes);
 int ice_up(struct ice_vsi *vsi);
 int ice_down(struct ice_vsi *vsi);
 int ice_vsi_cfg(struct ice_vsi *vsi);
drivers/net/ethernet/intel/ice/ice_main.c +3 -3
index 303c5943dcda..3bfd1be99a26 100644
@@ -6103,9 +6103,9 @@ int ice_up(struct ice_vsi *vsi)
  * This function fetches stats from the ring considering the atomic operations
  * that needs to be performed to read u64 values in 32 bit machine.
  */
-static void
-ice_fetch_u64_stats_per_ring(struct u64_stats_sync *syncp, struct ice_q_stats stats,
-			     u64 *pkts, u64 *bytes)
+void
+ice_fetch_u64_stats_per_ring(struct u64_stats_sync *syncp,
+			     struct ice_q_stats stats, u64 *pkts, u64 *bytes)
 {
 	unsigned int start;
 
drivers/net/ethernet/intel/ice/ice_repr.c +55 -0

67 lines not on this page · raw message

Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/1 ice: Add slow path offload stats on port representor in switchdev

Quoted 4 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Marcin Szycik
Sent: Thursday, January 27, 2022 8:34 PM

To: [email protected]

Quoted 10 lines

Subject: [Intel-wired-lan] [PATCH net-next] ice: Add slow path offload stats on port representor in switchdev

Implement callbacks to check for stats and fetch port representor stats. Stats are taken from RX/TX ring corresponding to port representor and show the number of bytes/packets that were not offloaded.

To see slow path stats run:
ifstat -x cpu_hits -a

Quoted 7 lines

---

drivers/net/ethernet/intel/ice/ice.h      |  3 ++
drivers/net/ethernet/intel/ice/ice_main.c |  6 +--
drivers/net/ethernet/intel/ice/ice_repr.c | 55 +++++++++++++++++++++++
3 files changed, 61 insertions(+), 3 deletions(-)