net/mlx5e: Add a counter for congested UMRs
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / wq.h
index 0b47126815b636246009123d6b6dbf14133db28c..2bd4c3184eba21d866ea8df66699a41145e3ec10 100644 (file)
@@ -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);