History

RDMA/nldev: Add command to get FRMR pools

Add support for a new command in netlink to dump to user the state of the FRMR pools on the devices. Expose each pool with its key and the usage statistics for it.

Michael Guralnik committed 8 months ago

Commit 50c03591 parent ba51cf92 files · +182 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/rdma/rdma_netlink.h+17−0
@@ -308,6 +308,8 @@ enum rdma_nldev_command { · 307 unmodified lines
308308
309309 RDMA_NLDEV_CMD_MONITOR,
310310
311+ RDMA_NLDEV_CMD_FRMR_POOLS_GET, /* can dump */
312+
311313 RDMA_NLDEV_NUM_OPS
312314 };
313315
@@ -582,6 +584,21 @@ enum rdma_nldev_attr { · 268 unmodified lines
582584 RDMA_NLDEV_SYS_ATTR_MONITOR_MODE, /* u8 */
583585
584586 RDMA_NLDEV_ATTR_STAT_OPCOUNTER_ENABLED, /* u8 */
587+
588+ /*
589+ * FRMR Pools attributes
590+ */
591+ RDMA_NLDEV_ATTR_FRMR_POOLS, /* nested table */
592+ RDMA_NLDEV_ATTR_FRMR_POOL_ENTRY, /* nested table */
593+ RDMA_NLDEV_ATTR_FRMR_POOL_KEY, /* nested table */
594+ RDMA_NLDEV_ATTR_FRMR_POOL_KEY_ATS, /* u8 */
595+ RDMA_NLDEV_ATTR_FRMR_POOL_KEY_ACCESS_FLAGS, /* u32 */
596+ RDMA_NLDEV_ATTR_FRMR_POOL_KEY_VENDOR_KEY, /* u64 */
597+ RDMA_NLDEV_ATTR_FRMR_POOL_KEY_NUM_DMA_BLOCKS, /* u64 */
598+ RDMA_NLDEV_ATTR_FRMR_POOL_QUEUE_HANDLES, /* u32 */
599+ RDMA_NLDEV_ATTR_FRMR_POOL_MAX_IN_USE, /* u64 */
600+ RDMA_NLDEV_ATTR_FRMR_POOL_IN_USE, /* u64 */
601+
585602 /*
586603 * Always the end
587604 */