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];
+};
+