Re: [PATCH v10 rdma-next] RDMA: Change capability fields in ib_device_attr from int to u32
Leon Romanovsky <[email protected]> Sun, 12 Jul 2026 07:26:48 -0400
| Newsgroups | org.kernel.vger.target-devel,org.infradead.lists.linux-nvme,org.kernel.vger.linux-cifs,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kernel.vger.linux-rdma,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 08 Jul 2026 22:51:29 -0700, Erni Sri Satya Vennela wrote:
> The capability counter fields in struct ib_device_attr are declared
> as signed int, but these values are inherently non-negative. Drivers
> maintain their cached caps as u32 and assign them directly into these
> int fields; if a cap exceeds INT_MAX the implicit narrowing yields a
> negative value visible to the IB core.
>
> Change the signed int capability fields to u32 to match the
> underlying nature of the data. Also update consumers across the IB
> core, ULPs, NVMe-oF target, RDS, and NFS/RDMA so the new u32 values
> are not forced back through signed int or u8 via min()/min_t() or
> narrowing local variables.
>
> [...]
Applied, thanks!
[1/1] RDMA: Change capability fields in ib_device_attr from int to u32
https://git.kernel.org/rdma/rdma/c/eebd08d91ddbd6
Best regards,
--
Leon Romanovsky <[email protected]>