On Tue, 3 Nov 2020 11:47:35 -0800 Saeed Mahameed wrote: > From: Vladyslav Tarasiuk <vladysl...@nvidia.com> > > Stop room is a space that may be taken by WQEs in the SQ during a packet > transmit. It is used to check if next packet has enough room in the SQ. > Stop room guarantees this packet can be served and if not, the queue is > stopped, so no more packets are passed to the driver until it's ready. > > Currently, stop_room size is calculated and validated upon tx queues > allocation. This makes it impossible to know if user provided valid > input for certain parameters when interface is down. > > Instead, store stop_room in mlx5e_sq_param and create > mlx5e_validate_params(), to validate its fields upon user input even > when the interface is down. > > Signed-off-by: Vladyslav Tarasiuk <vladysl...@nvidia.com> > Reviewed-by: Tariq Toukan <tar...@nvidia.com> > Signed-off-by: Saeed Mahameed <sae...@nvidia.com>
32 bit build wants you to use %zd or such: drivers/net/ethernet/mellanox/mlx5/core/en/params.c: In function ‘mlx5e_validate_params’: drivers/net/ethernet/mellanox/mlx5/core/en/params.c:182:72: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 182 | netdev_err(priv->netdev, "Stop room %hu is bigger than the SQ size %lu\n", | ~~^ | | | long unsigned int | %u 183 | stop_room, sq_size); | ~~~~~~~ | | | size_t {aka unsigned int}