Do the umad and rmpp headers leave the sm_key on an 8 byte boundary? 

-----Original Message-----
From: linux-rdma-ow...@vger.kernel.org 
[mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Ira Weiny
Sent: Thursday, April 18, 2013 1:22 PM
To: linux-rdma@vger.kernel.org
Cc: Hal Rosenstock; Hefty, Sean
Subject: [RFC PATCH] libibumad: change sm_key to be be64_t

Was there a reason to define sm_key as an array of uint8_t's vs a be64_t?

Wouldn't the following be better?

Signed-off-by: Ira Weiny <ira.we...@intel.com>
---
 include/infiniband/umad_sa.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/infiniband/umad_sa.h b/include/infiniband/umad_sa.h index 
eb7812d..32edf33 100644
--- a/include/infiniband/umad_sa.h
+++ b/include/infiniband/umad_sa.h
@@ -108,7 +108,7 @@ enum {
 struct umad_sa_packet {
        struct umad_hdr         mad_hdr;
        struct umad_rmpp_hdr    rmpp_hdr;
-       uint8_t                 sm_key[8]; /* network-byte order */
+       be64_t                  sm_key;
        be16_t                  attr_offset;
        be16_t                  reserved;
        be64_t                  comp_mask;
--
1.7.0.7

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the 
body of a message to majord...@vger.kernel.org More majordomo info at  
http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to