Re: [PATCH v2 iproute2-next 1/4] rdma: Update headers

David Ahern
2026-04-27T18:27:18Z

On 4/27/26 12:25 PM, Stephen Hemminger wrote:
> On Mon, 30 Mar 2026 20:31:15 +0300
> Chiara Meiohas <cmeiohas@nvidia.com> wrote:
>
>> From: Michael Guralnik <michaelgur@nvidia.com>
>>
>> Update rdma_netlink.h file up to kernel commit dbd0472fd7a5
>> ("RDMA/nldev: Expose kernel-internal FRMR pools in netlink")
>>
>> Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
>> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
>> Reviewed-by: Chiara Meiohas <cmeiohas@nvidia.com>
>
> The upstream macro names changed, the iproute2 build is broken after
> current headers sync.
>
> In file included from res.c:7:
> res.h: In function ‘_res_frmr_pools’:
> res.h:203:26: error: ‘RDMA_NLDEV_CMD_RES_FRMR_POOLS_GET’ undeclared (first use in this function); did you mean ‘RDMA_NLDEV_CMD_FRMR_POOLS_GET’?
> 203 | RES_FUNC(res_frmr_pools, RDMA_NLDEV_CMD_RES_FRMR_POOLS_GET,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> res.h:56:44: note: in definition of macro ‘RES_FUNC’
> 56 | _command = res_get_command(command, rd); \
> | ^~~~~~~
> res.h:203:26: note: each undeclared identifier is reported only once for each function it appears in
> 203 | RES_FUNC(res_frmr_pools, RDMA_NLDEV_CMD_RES_FRMR_POOLS_GET,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> res.h:56:44: note: in definition of macro ‘RES_FUNC’
> 56 | _command = res_get_command(command, rd); \
> | ^~~~~~~

Looks like the merged API does not have the _RES part of the uapi:

kernel vs iproute2:

@@ -590,19 +590,19 @@
/*
* FRMR Pools attributes
*/
- RDMA_NLDEV_ATTR_FRMR_POOLS, /* nested table */
- RDMA_NLDEV_ATTR_FRMR_POOL_ENTRY, /* nested table */
- RDMA_NLDEV_ATTR_FRMR_POOL_KEY, /* nested table */
- RDMA_NLDEV_ATTR_FRMR_POOL_KEY_ATS, /* u8 */
- RDMA_NLDEV_ATTR_FRMR_POOL_KEY_ACCESS_FLAGS, /* u32 */
- RDMA_NLDEV_ATTR_FRMR_POOL_KEY_VENDOR_KEY, /* u64 */
- RDMA_NLDEV_ATTR_FRMR_POOL_KEY_NUM_DMA_BLOCKS, /* u64 */
- RDMA_NLDEV_ATTR_FRMR_POOL_QUEUE_HANDLES, /* u32 */
- RDMA_NLDEV_ATTR_FRMR_POOL_MAX_IN_USE, /* u64 */
- RDMA_NLDEV_ATTR_FRMR_POOL_IN_USE, /* u64 */
- RDMA_NLDEV_ATTR_FRMR_POOLS_AGING_PERIOD, /* u32 */
- RDMA_NLDEV_ATTR_FRMR_POOL_PINNED_HANDLES, /* u32 */
- RDMA_NLDEV_ATTR_FRMR_POOL_KEY_KERNEL_VENDOR_KEY, /* u64 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOLS, /* nested table */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_ENTRY, /* nested table */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_KEY, /* nested table */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_KEY_ATS, /* u8 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_KEY_ACCESS_FLAGS, /* u32 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_KEY_VENDOR_KEY, /* u64 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_KEY_NUM_DMA_BLOCKS, /* u64 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_QUEUE_HANDLES, /* u32 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_MAX_IN_USE, /* u64 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_IN_USE, /* u64 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_AGING_PERIOD, /* u32 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_PINNED, /* u32 */
+ RDMA_NLDEV_ATTR_RES_FRMR_POOL_KEY_KERNEL_VENDOR_KEY, /* u64 */

/*