Don't offset the UAR map twice in mlx5en(4).

The new UAR API already offsets the UAR map pointer the mlx5en(4) is using.
While at it remove some no longer needed variables for keeping track
of the current BF offset.

This fixes a regression issue after the new UAR allocation APIs
were introduced.

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
This commit is contained in:
Hans Petter Selasky 2021-01-08 18:32:16 +01:00
parent 6733401935
commit 431980466f
3 changed files with 1 additions and 13 deletions

View File

@ -807,7 +807,6 @@ struct mlx5e_sq {
/* dirtied @xmit */
u16 pc __aligned(MLX5E_CACHELINE_SIZE);
u16 bf_offset;
u16 cev_counter; /* completion event counter */
u16 cev_factor; /* completion event factor */
u16 cev_next_state; /* next completion event state */
@ -830,7 +829,6 @@ struct mlx5e_sq {
void __iomem *uar_map;
struct ifnet *ifp;
u32 sqn;
u32 bf_buf_size;
u32 mkey_be;
u16 max_inline;
u8 min_inline_mode;
@ -1130,8 +1128,6 @@ void mlx5e_del_all_vlan_rules(struct mlx5e_priv *priv);
static inline void
mlx5e_tx_notify_hw(struct mlx5e_sq *sq, u32 *wqe)
{
u16 ofst = MLX5_BF_OFFSET + sq->bf_offset;
/* ensure wqe is visible to device before updating doorbell record */
wmb();
@ -1143,10 +1139,8 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, u32 *wqe)
*/
wmb();
mlx5_write64(wqe, sq->uar_map + ofst,
mlx5_write64(wqe, sq->uar_map,
MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock));
sq->bf_offset ^= sq->bf_buf_size;
}
static inline void

View File

@ -1668,7 +1668,6 @@ mlx5e_create_sq(struct mlx5e_channel *c,
goto err_free_dma_tag;
sq->wq.db = &sq->wq.db[MLX5_SND_DBR];
sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2;
err = mlx5e_alloc_sq_db(sq);
if (err)

View File

@ -124,11 +124,6 @@ mlx5e_rl_create_sq(struct mlx5e_priv *priv, struct mlx5e_sq *sq,
goto err_free_dma_tag;
sq->wq.db = &sq->wq.db[MLX5_SND_DBR];
/*
* The sq->bf_buf_size variable is intentionally left zero so
* that the doorbell writes will occur at the same memory
* location.
*/
err = mlx5e_alloc_sq_db(sq);
if (err)