aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-09-12 22:46:58 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 11:36:02 -0800
commit8a4288ff5fa504f3875df87576eef97d97b72496 (patch)
treecb343a08b94e9a7fa39b53a420cb86482d707c3a
parent8d06cfb0163e8ebaa5fed20fff07b75bf615bb86 (diff)
downloadlibibverbs-8a4288ff5fa504f3875df87576eef97d97b72496.tar.gz
Fix alignment of work request structures
Swap next and wr_id members of struct ibv_send_wr and ibv_recv_wr to allow wr_id to be naturally aligned on 32-bit architectures without padding. Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--ChangeLog6
-rw-r--r--include/infiniband/verbs.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 35f5e3e..7bdeba7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-12 Roland Dreier <rdreier@cisco.com>
+
+ * include/infiniband/verbs.h: Swap wr_id and next members of
+ struct ibv_send_wr and struct ibv_recv_wr. This allows wr_id to
+ be naturally aligned without padding on 32-bit platforms.
+
2006-08-23 Roland Dreier <rdreier@cisco.com>
* include/infiniband/driver.h: Add a definition of the macro
diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index 26a7291..42bc2c8 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -478,8 +478,8 @@ struct ibv_sge {
};
struct ibv_send_wr {
- struct ibv_send_wr *next;
uint64_t wr_id;
+ struct ibv_send_wr *next;
struct ibv_sge *sg_list;
int num_sge;
enum ibv_wr_opcode opcode;
@@ -505,8 +505,8 @@ struct ibv_send_wr {
};
struct ibv_recv_wr {
- struct ibv_recv_wr *next;
uint64_t wr_id;
+ struct ibv_recv_wr *next;
struct ibv_sge *sg_list;
int num_sge;
};