aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/wq.h
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-03-04 14:25:00 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2018-06-28 14:44:18 -0700
commitdc983f0e2b6e2b514cdb1c687fdf7b5a007f8ea4 (patch)
tree2d8420e74f146c8ecaff023986591a73ca408b59 /drivers/net/ethernet/mellanox/mlx5/core/wq.h
parentnet/mlx5e: Add NAPI statistics (diff)
downloadlinux-dev-dc983f0e2b6e2b514cdb1c687fdf7b5a007f8ea4.tar.xz
linux-dev-dc983f0e2b6e2b514cdb1c687fdf7b5a007f8ea4.zip
net/mlx5e: Add a counter for congested UMRs
Add per-ring and global ethtool counters for congested UMR requests. These events indicate congestion in UMR handlers in HW. Such event is concluded when there's an outstanding UMR post, yet the SW consumed at least two additional MPWQEs in the meanwhile. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/wq.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/wq.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.h b/drivers/net/ethernet/mellanox/mlx5/core/wq.h
index 0b47126815b6..2bd4c3184eba 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/wq.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/wq.h
@@ -229,6 +229,11 @@ static inline int mlx5_wq_ll_is_empty(struct mlx5_wq_ll *wq)
return !wq->cur_sz;
}
+static inline int mlx5_wq_ll_missing(struct mlx5_wq_ll *wq)
+{
+ return wq->fbc.sz_m1 - wq->cur_sz;
+}
+
static inline void *mlx5_wq_ll_get_wqe(struct mlx5_wq_ll *wq, u16 ix)
{
return mlx5_frag_buf_get_wqe(&wq->fbc, ix);