From fc42d0de16debb2c8ba83e1345a55a18ff87e2d9 Mon Sep 17 00:00:00 2001 From: Aya Levin Date: Thu, 30 Apr 2020 13:36:26 +0300 Subject: net/mlx5e: Add helper to get RQ WQE's head Add helper which retrieves the RQ WQE's head. Use this helper in RX reporter diagnose callback. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/wq.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net/ethernet/mellanox/mlx5/core/wq.h') diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.h b/drivers/net/ethernet/mellanox/mlx5/core/wq.h index 4cadc336593f..27dece35df7e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/wq.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/wq.h @@ -290,4 +290,8 @@ static inline void mlx5_wq_ll_update_db_record(struct mlx5_wq_ll *wq) *wq->db = cpu_to_be32(wq->wqe_ctr); } +static inline u16 mlx5_wq_ll_get_head(struct mlx5_wq_ll *wq) +{ + return wq->head; +} #endif /* __MLX5_WQ_H__ */ -- cgit v1.2.3