From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13981C38147 for ; Wed, 18 Jan 2023 18:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230392AbjARSgN (ORCPT ); Wed, 18 Jan 2023 13:36:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbjARSgL (ORCPT ); Wed, 18 Jan 2023 13:36:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C54BF58971 for ; Wed, 18 Jan 2023 10:36:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6F6F9B81EA0 for ; Wed, 18 Jan 2023 18:36:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03FC6C433F0; Wed, 18 Jan 2023 18:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674066968; bh=lVaefuWBHGY6BUj/L7v09vf3blSClJR61NBSRzyYaVM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tiptl7HcFkQN1Vu9w4VInN63eciLxJBUzR4COEzHZNDQqOK1Y31iO//GyBhdwqXUY YwfKnsY7jaCqFq+xj6Dyp/2uJOEvNWNn6p2zK/6GcO4ZA+NOnK44FtsIAE7I76HmlK BvgfXDvDnflR/thuXAVvmmjOedK5g63a7jQBDN1g2iQCMBfmYFeJC7E/b8LRp2hp4C LyJSvz20VE/TNurGzqB2Nl4X4X6x54plW86a2/95MY6vz8DWqcXdD2/LkhgTeoe4Gm 0VYClxIUGWWsQJeQaaTDO6HzZsFqDZe2hIDHSzSDt+yn91VkSxuDfNqh9DYvR7E/fs PDGSNSIqXyshw== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Rahul Rameshbabu , kernel test robot Subject: [net-next 01/15] net/mlx5e: Suppress Send WQEBB room warning for PAGE_SIZE >= 16KB Date: Wed, 18 Jan 2023 10:35:48 -0800 Message-Id: <20230118183602.124323-2-saeed@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118183602.124323-1-saeed@kernel.org> References: <20230118183602.124323-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rahul Rameshbabu 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 Reported-by: kernel test robot Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- 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. -- 2.39.0