On Thu, Jun 29, 2023 at 09:07:37AM +0300, Dan Carpenter wrote: > This code is trying to ensure that only the flags specified in the list > are allowed. The problem is that ucmd->rx_hash_fields_mask is a u64 and > the flags are an enum which is treated as a u32 in this context. That > means the test doesn't check whether the highest 32 bits are zero. > > Fixes: 4d02ebd9bbbd ("IB/mlx4: Fix RSS hash fields restrictions") > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > --- > The MLX4_IB_RX_HASH_INNER value is declared as > "MLX4_IB_RX_HASH_INNER = 1ULL << 31," which suggests that it > should be type ULL but that doesn't work. It will still be basically a > u32. (Enum types are weird). Can you please elaborate more why enum left to be int? It is surprise to me. Thanks