Thread (11 messages) 11 messages, 3 authors, 2026-03-16

Re: [PATCH iproute2-next 2/4] rdma: Add resource FRMR pools show command

From: David Ahern <hidden>
Date: 2026-03-07 01:45:52
Also in: linux-rdma

On 3/2/26 8:51 AM, Chiara Meiohas wrote:
quoted hunk ↗ jump to hunk
diff --git a/rdma/res-frmr-pools.c b/rdma/res-frmr-pools.c
new file mode 100644
index 00000000..97d59705
--- /dev/null
+++ b/rdma/res-frmr-pools.c
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
+/*
+ * res-frmr-pools.c	RDMA tool
+ * Authors:    Michael Guralnik <michaelgur@nvidia.com>
+ */
+
+#include "res.h"
+#include <inttypes.h>
+
+#define FRMR_POOL_KEY_SIZE 21
+#define FRMR_POOL_KEY_HEX_SIZE (FRMR_POOL_KEY_SIZE * 2)
+union frmr_pool_key {
+	struct {
+		uint8_t ats;
+		uint32_t access_flags;
+		uint64_t vendor_key;
+		uint64_t num_dma_blocks;
+	} __attribute__((packed)) fields;
why is packed needed on this struct? why can't the fields be re-arranged
to not require it and just let the extra 3B be at the end unused?
+	uint8_t raw[FRMR_POOL_KEY_SIZE];
+};
+
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help