summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microsoft/mana/hw_channel.c
diff options
context:
space:
mode:
authorDipayaan Roy <dipayanroy@linux.microsoft.com>2025-06-09 13:01:03 +0300
committerJakub Kicinski <kuba@kernel.org>2025-06-11 00:23:19 +0300
commitc09ef59e17c6921c577d54bc8da4331b955d01a7 (patch)
treecfa61a6fd4a0497b71a26d6f53ea91dae6fbc4b4 /drivers/net/ethernet/microsoft/mana/hw_channel.c
parenta63bea11d45523c7ed9f7b927532c810ad52db36 (diff)
downloadlinux-c09ef59e17c6921c577d54bc8da4331b955d01a7.tar.xz
net: mana: Expose additional hardware counters for drop and TC via ethtool.
Add support for reporting additional hardware counters for drop and TC using the ethtool -S interface. These counters include: - Aggregate Rx/Tx drop counters - Per-TC Rx/Tx packet counters - Per-TC Rx/Tx byte counters - Per-TC Rx/Tx pause frame counters The counters are exposed using ethtool_ops->get_ethtool_stats and ethtool_ops->get_strings. This feature/counters are not available to all versions of hardware. Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com> Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Link: https://patch.msgid.link/20250609100103.GA7102@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/microsoft/mana/hw_channel.c')
-rw-r--r--drivers/net/ethernet/microsoft/mana/hw_channel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c
index a8c4d8db75a5..3d3677c0d014 100644
--- a/drivers/net/ethernet/microsoft/mana/hw_channel.c
+++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c
@@ -2,6 +2,7 @@
/* Copyright (c) 2021, Microsoft Corporation. */
#include <net/mana/gdma.h>
+#include <net/mana/mana.h>
#include <net/mana/hw_channel.h>
#include <linux/vmalloc.h>
@@ -890,8 +891,9 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
}
if (ctx->status_code && ctx->status_code != GDMA_STATUS_MORE_ENTRIES) {
- dev_err(hwc->dev, "HWC: Failed hw_channel req: 0x%x\n",
- ctx->status_code);
+ if (req_msg->req.msg_type != MANA_QUERY_PHY_STAT)
+ dev_err(hwc->dev, "HWC: Failed hw_channel req: 0x%x\n",
+ ctx->status_code);
err = -EPROTO;
goto out;
}