Thread (2 messages) 2 messages, 2 authors, 2023-08-07

Re: [PATCH net-next] net: mana: Add gdma stats to ethtool output for mana

From: Pavan Chebbi <pavan.chebbi@broadcom.com>
Date: 2023-08-07 14:50:30
Also in: linux-hyperv, linux-rdma, lkml

On Mon, Aug 7, 2023 at 4:29 PM Shradha Gupta
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
Extended performance counter stats in 'ethtool -S <interface>'
for MANA VF to include GDMA tx LSO packets and bytes count.

Tested-on: Ubuntu22
Testcases:
1. LISA testcase:
PERF-NETWORK-TCP-THROUGHPUT-MULTICONNECTION-NTTTCP-Synthetic
2. LISA testcase:
PERF-NETWORK-TCP-THROUGHPUT-MULTICONNECTION-NTTTCP-SRIOV
3. Validated the GDMA stat packets and byte counters
Signed-off-by: Shradha Gupta <redacted>
---
 drivers/net/ethernet/microsoft/mana/mana_en.c | 40 +++++++++
 .../ethernet/microsoft/mana/mana_ethtool.c    | 15 ++++
 include/net/mana/mana.h                       | 88 +++++++++++++++++++
 3 files changed, 143 insertions(+)
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index ac2acc9aca9d..eb5e4164b9bf 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -2234,6 +2234,46 @@ int mana_config_rss(struct mana_port_context *apc, enum TRI_STATE rx,
        return 0;
 }

+void mana_query_gf_stats(struct mana_port_context *apc)
+{
+       struct mana_query_gf_stat_req   req = {};
nit: remove the space before 'req' and rearrange in reverse x-mas order
+       struct mana_query_gf_stat_resp resp = {};
+       struct net_device *ndev = apc->ndev;
+#define STATISTICS_FLAGS_HC_TX_BCAST_PACKETS           0x0000000001000000
+#define STATISTICS_FLAGS_HC_TX_BCAST_BYTES             0x0000000002000000
+/* Tx error */
+#define STATISTICS_FLAGS_TX_ERRORS_GDMA_ERROR          0x0000000004000000
+
+
Checkpatch is warning about this.
Otherwise it looks good.
 #define MANA_MAX_NUM_QUEUES 64

 #define MANA_SHORT_VPORT_OFFSET_MAX ((1U << 8) - 1)
--
2.34.1

Attachments

  • smime.p7s [application/pkcs7-signature] 4209 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help