[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ffa2a9b-ddd1-afa1-273d-6c303fcedcfb@intel.com>
Date: Wed, 18 Jan 2023 13:31:02 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Saeed Mahameed <saeed@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>
CC: Saeed Mahameed <saeedm@...dia.com>, <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...dia.com>,
Rahul Rameshbabu <rrameshbabu@...dia.com>,
"kernel test robot" <lkp@...el.com>
Subject: Re: [net-next 01/15] net/mlx5e: Suppress Send WQEBB room warning for
PAGE_SIZE >= 16KB
On 1/18/2023 10:35 AM, Saeed Mahameed wrote:
> From: Rahul Rameshbabu <rrameshbabu@...dia.com>
>
> Send WQEBB size is 64 bytes and the max number of WQEBBs for an SQ is 255.
> For 16KB pages and greater, there is always sufficient spaces for all
> WQEBBs of an SQ. Cast mlx5e_get_max_sq_wqebbs(mdev) to u16. Prevents
> -Wtautological-constant-out-of-range-compare warnings from occurring when
> PAGE_SIZE >= 16KB.
>
> Signed-off-by: Rahul Rameshbabu <rrameshbabu@...dia.com>
> Reported-by: kernel test robot <lkp@...el.com>
> Reviewed-by: Tariq Toukan <tariqt@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
> index 853f312cd757..5578f92f7e0f 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
> @@ -445,7 +445,7 @@ mlx5e_set_eseg_swp(struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg,
>
> static inline u16 mlx5e_stop_room_for_wqe(struct mlx5_core_dev *mdev, u16 wqe_size)
> {
> - WARN_ON_ONCE(PAGE_SIZE / MLX5_SEND_WQE_BB < mlx5e_get_max_sq_wqebbs(mdev));
> + WARN_ON_ONCE(PAGE_SIZE / MLX5_SEND_WQE_BB < (u16)mlx5e_get_max_sq_wqebbs(mdev));
>
> /* A WQE must not cross the page boundary, hence two conditions:
> * 1. Its size must not exceed the page size.
Powered by blists - more mailing lists