Subject: Re: [net 06/11] net/mlx5e: Add missing sanity checks for max TX WQE size

From: Jakub Kicinski <[email-masked]>
Date: Thu, 3 Nov 2022 21:12:02 -0700

On Wed,  2 Nov 2022 23:55:42 -0700 Saeed Mahameed wrote:
> From: Maxim Mikityanskiy <[email-masked]>
> 
> The commit cited below started using the firmware capability for the
> maximum TX WQE size. This commit adds an important check to verify that
> the driver doesn't attempt to exceed this capability, and also restores
> another check mistakenly removed in the cited commit (a WQE must not
> exceed the page size).
> 
> Fixes: c27bd1718c06 ("net/mlx5e: Read max WQEBBs on the SQ from firmware")
> Signed-off-by: Maxim Mikityanskiy <[email-masked]>
> Reviewed-by: Tariq Toukan <[email-masked]>
> Signed-off-by: Saeed Mahameed <[email-masked]>

32bit is not on board:

drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:323:72: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
  323 |                         netdev_warn(skb->dev, "ds_cnt_inl = %u > max %lu\n",
      |                                                                      ~~^
      |                                                                        |
      |                                                                        long unsigned int
      |                                                                      %u