[Open-FCoE] [PATCH 13/18] devtools fip: pack all FIP protocol structure definitions.

Joe Eykholt jeykholt at cisco.com
Sat Oct 25 01:39:28 UTC 2008


devtools fip: pack all FIP protocol structure definitions.



Signed-off-by: Joe Eykholt <jeykholt at cisco.com>
---
 usr/common/include/fc_fip.h |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)


diff --git a/usr/common/include/fc_fip.h b/usr/common/include/fc_fip.h
index a8ee2de..1c6ac32 100644
--- a/usr/common/include/fc_fip.h
+++ b/usr/common/include/fc_fip.h
@@ -63,7 +63,7 @@ struct fip_header {
 	net8_t	fip_subcode;		/* lower 4 bits are sub-code */
 	net16_t	fip_dl_len;		/* length of descriptors in words */
 	net16_t fip_flags;		/* header flags */
-};
+} __attribute__((packed));
 
 #define	FIP_VER_SHIFT	4
 #define FIP_VER_ENCAPS(v) ((v) << FIP_VER_SHIFT)
@@ -120,7 +120,7 @@ enum fip_flag {
 struct fip_desc {
 	net8_t	fip_dtype;		/* type - see below */
 	net8_t	fip_dlen;		/* length - in 32-bit words */
-};
+} __attribute__((packed));
 
 enum fip_desc_type {
 	FIP_DT_PRI =	1,		/* priority for forwarder selection */
@@ -146,7 +146,7 @@ struct fip_pri_desc {
 	struct fip_desc fd_desc;
 	net8_t		fd_resvd;
 	net8_t		fd_pri;		/* FCF priority:  higher is better */
-};
+} __attribute__((packed));
 
 /*
  * FIP_DT_MAC - MAC address descriptor.
@@ -154,7 +154,7 @@ struct fip_pri_desc {
 struct fip_mac_desc {
 	struct fip_desc fd_desc;
 	net48_t		fd_mac;
-};
+} __attribute__((packed));
 
 /*
  * FIP_DT_MAP - descriptor.
@@ -163,7 +163,7 @@ struct fip_map_desc {
 	struct fip_desc fd_desc;
 	net8_t		fd_resvd[3];
 	net24_t		fd_map;
-};
+} __attribute__((packed));
 
 /*
  * FIP_DT_NAME descriptor.
@@ -172,7 +172,7 @@ struct fip_wwn_desc {
 	struct fip_desc fd_desc;
 	net8_t		fd_resvd[2];
 	net64_t		fd_wwn;
-};
+} __attribute__((packed));
 
 /*
  * FIP_DT_FAB descriptor.
@@ -191,7 +191,7 @@ struct fip_fab_desc {
 struct fip_size_desc {
 	struct fip_desc fd_desc;
 	net16_t		fd_size;
-};
+} __attribute__((packed));
 
 /*
  * Descriptor that encapsulates ELS or ILS frame.
@@ -201,7 +201,7 @@ struct fip_size_desc {
 struct fip_encaps {
 	struct fip_desc fd_desc;
 	net8_t		fd_resvd[2];
-};
+} __attribute__((packed));
 
 /*
  * FIP_DT_VN_ID - VN_Node Identifier descriptor.
@@ -212,7 +212,7 @@ struct fip_vn_desc {
 	net8_t		fd_resvd;
 	net24_t		fd_fc_id;
 	net64_t		fd_wwpn;
-};
+} __attribute__((packed));
 
 /*
  * FIP_DT_FKA - Advertisement keep-alive period.
@@ -221,7 +221,7 @@ struct fip_fka_desc {
 	struct fip_desc fd_desc;
 	net8_t		fd_resvd[2];
 	net32_t		fd_fka_period;	/* advertisement period in seconds */
-};
+} __attribute__((packed));
 
 /*
  * FIP_DT_VENDOR - Vendor-specific message indicator.
@@ -229,6 +229,6 @@ struct fip_fka_desc {
 struct fip_vendor_desc {
 	struct fip_desc fd_desc;
 	net64_t		fd_vendor;
-};
+} __attribute__((packed));
 
 #endif /* _FC_FIP_H_ */





More information about the devel mailing list