* [PATCH net-next] net/mlx5: Expose uar access and odp page fault counters
@ 2025-09-25 10:45 Tariq Toukan
2025-09-26 12:49 ` Simon Horman
2025-09-27 16:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Tariq Toukan @ 2025-09-25 10:45 UTC (permalink / raw)
To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
David S. Miller
Cc: Jiri Pirko, Jonathan Corbet, Saeed Mahameed, Leon Romanovsky,
Tariq Toukan, Mark Bloch, netdev, linux-doc, linux-kernel,
linux-rdma, Gal Pressman, Maor Gottlieb, Moshe Shemesh,
Akiva Goldberger
From: Akiva Goldberger <agoldberger@nvidia.com>
Add three counters to vnic health reporter:
bar_uar_access, odp_local_triggered_page_fault, and
odp_remote_triggered_page_fault.
- bar_uar_access
number of WRITE or READ access operations to the UAR on the PCIe
BAR.
- odp_local_triggered_page_fault
number of locally-triggered page-faults due to ODP.
- odp_remote_triggered_page_fault
number of remotly-triggered page-faults due to ODP.
Example access:
$ devlink health diagnose pci/0000:08:00.0 reporter vnic
vNIC env counters:
total_error_queues: 0 send_queue_priority_update_flow: 0
comp_eq_overrun: 0 async_eq_overrun: 0 cq_overrun: 0
invalid_command: 0 quota_exceeded_command: 0
nic_receive_steering_discard: 0 icm_consumption: 1032
bar_uar_access: 1279 odp_local_triggered_page_fault: 20
odp_remote_triggered_page_fault: 34
Signed-off-by: Akiva Goldberger <agoldberger@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
Documentation/networking/devlink/mlx5.rst | 6 ++++++
.../net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c | 9 +++++++++
2 files changed, 15 insertions(+)
diff --git a/Documentation/networking/devlink/mlx5.rst b/Documentation/networking/devlink/mlx5.rst
index 41c9b716699e..0e5f9c76e514 100644
--- a/Documentation/networking/devlink/mlx5.rst
+++ b/Documentation/networking/devlink/mlx5.rst
@@ -385,6 +385,12 @@ Description of the vnic counters:
amount of Interconnect Host Memory (ICM) consumed by the vnic in
granularity of 4KB. ICM is host memory allocated by SW upon HCA request
and is used for storing data structures that control HCA operation.
+- bar_uar_access
+ number of WRITE or READ access operations to the UAR on the PCIe BAR.
+- odp_local_triggered_page_fault
+ number of locally-triggered page-faults due to ODP.
+- odp_remote_triggered_page_fault
+ number of remotly-triggered page-faults due to ODP.
User commands examples:
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c
index 73f5b62b8c7f..172344734b8c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c
@@ -107,6 +107,15 @@ void mlx5_reporter_vnic_diagnose_counters(struct mlx5_core_dev *dev,
}
if (MLX5_CAP_GEN(dev, nic_cap_reg))
mlx5_reporter_vnic_diagnose_counter_icm(dev, fmsg, vport_num, other_vport);
+ if (MLX5_CAP_GEN(dev, vnic_env_cnt_bar_uar_access))
+ devlink_fmsg_u32_pair_put(fmsg, "bar_uar_access",
+ VNIC_ENV_GET(&vnic, bar_uar_access));
+ if (MLX5_CAP_GEN(dev, vnic_env_cnt_odp_page_fault)) {
+ devlink_fmsg_u32_pair_put(fmsg, "odp_local_triggered_page_fault",
+ VNIC_ENV_GET(&vnic, odp_local_triggered_page_fault));
+ devlink_fmsg_u32_pair_put(fmsg, "odp_remote_triggered_page_fault",
+ VNIC_ENV_GET(&vnic, odp_remote_triggered_page_fault));
+ }
devlink_fmsg_obj_nest_end(fmsg);
devlink_fmsg_pair_nest_end(fmsg);
base-commit: a1f1f2422e098485b09e55a492de05cf97f9954d
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/mlx5: Expose uar access and odp page fault counters
2025-09-25 10:45 [PATCH net-next] net/mlx5: Expose uar access and odp page fault counters Tariq Toukan
@ 2025-09-26 12:49 ` Simon Horman
2025-09-27 16:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-09-26 12:49 UTC (permalink / raw)
To: Tariq Toukan
Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
David S. Miller, Jiri Pirko, Jonathan Corbet, Saeed Mahameed,
Leon Romanovsky, Mark Bloch, netdev, linux-doc, linux-kernel,
linux-rdma, Gal Pressman, Maor Gottlieb, Moshe Shemesh,
Akiva Goldberger
On Thu, Sep 25, 2025 at 01:45:30PM +0300, Tariq Toukan wrote:
> From: Akiva Goldberger <agoldberger@nvidia.com>
>
> Add three counters to vnic health reporter:
> bar_uar_access, odp_local_triggered_page_fault, and
> odp_remote_triggered_page_fault.
>
> - bar_uar_access
> number of WRITE or READ access operations to the UAR on the PCIe
> BAR.
> - odp_local_triggered_page_fault
> number of locally-triggered page-faults due to ODP.
> - odp_remote_triggered_page_fault
> number of remotly-triggered page-faults due to ODP.
>
> Example access:
> $ devlink health diagnose pci/0000:08:00.0 reporter vnic
> vNIC env counters:
> total_error_queues: 0 send_queue_priority_update_flow: 0
> comp_eq_overrun: 0 async_eq_overrun: 0 cq_overrun: 0
> invalid_command: 0 quota_exceeded_command: 0
> nic_receive_steering_discard: 0 icm_consumption: 1032
> bar_uar_access: 1279 odp_local_triggered_page_fault: 20
> odp_remote_triggered_page_fault: 34
>
> Signed-off-by: Akiva Goldberger <agoldberger@nvidia.com>
> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/mlx5: Expose uar access and odp page fault counters
2025-09-25 10:45 [PATCH net-next] net/mlx5: Expose uar access and odp page fault counters Tariq Toukan
2025-09-26 12:49 ` Simon Horman
@ 2025-09-27 16:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-27 16:10 UTC (permalink / raw)
To: Tariq Toukan
Cc: edumazet, kuba, pabeni, andrew+netdev, davem, jiri, corbet,
saeedm, leon, mbloch, netdev, linux-doc, linux-kernel, linux-rdma,
gal, maorg, moshe, agoldberger
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 25 Sep 2025 13:45:30 +0300 you wrote:
> From: Akiva Goldberger <agoldberger@nvidia.com>
>
> Add three counters to vnic health reporter:
> bar_uar_access, odp_local_triggered_page_fault, and
> odp_remote_triggered_page_fault.
>
> - bar_uar_access
> number of WRITE or READ access operations to the UAR on the PCIe
> BAR.
> - odp_local_triggered_page_fault
> number of locally-triggered page-faults due to ODP.
> - odp_remote_triggered_page_fault
> number of remotly-triggered page-faults due to ODP.
>
> [...]
Here is the summary with links:
- [net-next] net/mlx5: Expose uar access and odp page fault counters
https://git.kernel.org/netdev/net-next/c/e835faaed2f8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-27 16:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-25 10:45 [PATCH net-next] net/mlx5: Expose uar access and odp page fault counters Tariq Toukan
2025-09-26 12:49 ` Simon Horman
2025-09-27 16:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).