Blame SOURCES/0008-ib_types-Drop-packed-attribute-where-unnecessary.patch

c2d36b
From 70722b4886f644170326b8be8d571bf058d955dc Mon Sep 17 00:00:00 2001
c2d36b
From: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
c2d36b
Date: Wed, 24 Apr 2019 07:47:09 +0200
c2d36b
Subject: [PATCH 8/8] ib_types: Drop packed attribute where unnecessary
c2d36b
c2d36b
For many of the IBA structures, the packed attribute has no effect.
c2d36b
c2d36b
List of impacted struct and checks were done this way:
c2d36b
c2d36b
Before applying this patch
c2d36b
- Generate a single file with all the IBA structs
c2d36b
(echo -e "#include <iba/ib_types.h>\n#include <stdio.h>\n\n\n"; for struct in $(git grep '^} PACK_SUFFIX' -- include/iba/ib_types.h | awk '{ print $NF }' | sed -e 's/;//'); do echo -e "$struct a_$struct;"; done) > ib_sizes.c
c2d36b
- Compile for both 32 and 64b
c2d36b
gcc -o ib_sizes.64.o -g3 -c ib_sizes.c -I./include/
c2d36b
gcc -o ib_sizes.32.o -g3 -m32 -c ib_sizes.c -I./include/
c2d36b
- Generate structure data using pahole
c2d36b
pahole ib_sizes.64.o > sizes.64.org
c2d36b
pahole ib_sizes.32.o > sizes.32.org
c2d36b
c2d36b
After applying this patch:
c2d36b
- Compile for both 32 and 64b
c2d36b
gcc -o ib_sizes.64.o -g3 -c ib_sizes.c -I./include/
c2d36b
gcc -o ib_sizes.32.o -g3 -m32 -c ib_sizes.c -I./include/
c2d36b
- Generate structure data using pahole
c2d36b
pahole ib_sizes.64.o > sizes.64.new
c2d36b
pahole ib_sizes.32.o > sizes.32.new
c2d36b
c2d36b
Diff pahole results:
c2d36b
diff sizes.64.org sizes.64.new
c2d36b
diff sizes.32.org sizes.32.new
c2d36b
c2d36b
As the patch remove effect-less attribute, no diff shows up
c2d36b
c2d36b
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
c2d36b
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
c2d36b
---
c2d36b
 include/iba/ib_types.h | 214 +++++++++++------------------------------
c2d36b
 1 file changed, 55 insertions(+), 159 deletions(-)
c2d36b
c2d36b
diff --git a/include/iba/ib_types.h b/include/iba/ib_types.h
c2d36b
index fb1c3f9c..025f9714 100644
c2d36b
--- a/include/iba/ib_types.h
c2d36b
+++ b/include/iba/ib_types.h
c2d36b
@@ -2256,25 +2256,23 @@ static inline boolean_t OSM_API ib_pkey_is_invalid(IN const ib_net16_t pkey)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef union _ib_gid {
c2d36b
 	uint8_t raw[16];
c2d36b
 	struct _ib_gid_unicast {
c2d36b
 		ib_gid_prefix_t prefix;
c2d36b
 		ib_net64_t interface_id;
c2d36b
-	} PACK_SUFFIX unicast;
c2d36b
+	} unicast;
c2d36b
 	struct _ib_gid_multicast {
c2d36b
 		uint8_t header[2];
c2d36b
 		uint8_t raw_group_id[14];
c2d36b
-	} PACK_SUFFIX multicast;
c2d36b
+	} multicast;
c2d36b
 	struct _ib_gid_ip_multicast {
c2d36b
 		uint8_t header[2];
c2d36b
 		ib_net16_t signature;
c2d36b
 		ib_net16_t p_key;
c2d36b
 		uint8_t group_id[10];
c2d36b
-	} PACK_SUFFIX ip_multicast;
c2d36b
-} PACK_SUFFIX ib_gid_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+	} ip_multicast;
c2d36b
+} ib_gid_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	raw
c2d36b
@@ -2500,7 +2498,6 @@ ib_gid_get_guid(IN const ib_gid_t * const p_gid)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_path_rec {
c2d36b
 	ib_net64_t service_id;
c2d36b
 	ib_gid_t dgid;
c2d36b
@@ -2517,8 +2514,7 @@ typedef struct _ib_path_rec {
c2d36b
 	uint8_t pkt_life;
c2d36b
 	uint8_t preference;
c2d36b
 	uint8_t resv2[6];
c2d36b
-} PACK_SUFFIX ib_path_rec_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_path_rec_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	service_id
c2d36b
@@ -3488,7 +3484,6 @@ ib_path_rec_hop_limit(IN const ib_path_rec_t * const p_rec)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_class_port_info {
c2d36b
 	uint8_t base_ver;
c2d36b
 	uint8_t class_ver;
c2d36b
@@ -3506,8 +3501,7 @@ typedef struct _ib_class_port_info {
c2d36b
 	ib_net16_t trap_pkey;
c2d36b
 	ib_net32_t trap_hop_qp;
c2d36b
 	ib_net32_t trap_qkey;
c2d36b
-} PACK_SUFFIX ib_class_port_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_class_port_info_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	base_ver
c2d36b
@@ -3807,7 +3801,6 @@ ib_sminfo_get_state(IN const ib_sm_info_t * const p_smi)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_mad {
c2d36b
 	uint8_t base_ver;
c2d36b
 	uint8_t mgmt_class;
c2d36b
@@ -3819,8 +3812,7 @@ typedef struct _ib_mad {
c2d36b
 	ib_net16_t attr_id;
c2d36b
 	ib_net16_t resv;
c2d36b
 	ib_net32_t attr_mod;
c2d36b
-} PACK_SUFFIX ib_mad_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_mad_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	base_ver
c2d36b
@@ -4128,7 +4120,6 @@ ib_rmpp_get_resp_time(IN const ib_rmpp_mad_t * const p_rmpp_mad)
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
 #define IB_SMP_DATA_SIZE 64
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_smp {
c2d36b
 	uint8_t base_ver;
c2d36b
 	uint8_t mgmt_class;
c2d36b
@@ -4148,8 +4139,7 @@ typedef struct _ib_smp {
c2d36b
 	uint8_t data[IB_SMP_DATA_SIZE];
c2d36b
 	uint8_t initial_path[IB_SUBNET_PATH_HOPS_MAX];
c2d36b
 	uint8_t return_path[IB_SUBNET_PATH_HOPS_MAX];
c2d36b
-} PACK_SUFFIX ib_smp_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_smp_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	base_ver
c2d36b
@@ -4587,14 +4577,12 @@ ib_node_info_get_vendor_id(IN const ib_node_info_t * const p_ni)
c2d36b
 
c2d36b
 #define IB_NODE_DESCRIPTION_SIZE 64
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_node_desc {
c2d36b
 	// Node String is an array of UTF-8 characters
c2d36b
 	// that describe the node in text format
c2d36b
 	// Note that this string is NOT NULL TERMINATED!
c2d36b
 	uint8_t description[IB_NODE_DESCRIPTION_SIZE];
c2d36b
-} PACK_SUFFIX ib_node_desc_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_node_desc_t;
c2d36b
 
c2d36b
 #include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_node_record_t {
c2d36b
@@ -4615,7 +4603,6 @@ typedef struct _ib_node_record_t {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_port_info {
c2d36b
 	ib_net64_t m_key;
c2d36b
 	ib_net64_t subnet_prefix;
c2d36b
@@ -4652,8 +4639,7 @@ typedef struct _ib_port_info {
c2d36b
 	ib_net16_t capability_mask2;
c2d36b
 	uint8_t link_speed_ext;	/* LinkSpeedExtActive and LinkSpeedExtSupported */
c2d36b
 	uint8_t link_speed_ext_enabled; /* reserv(3b), LinkSpeedExtEnabled(5b) */
c2d36b
-} PACK_SUFFIX ib_port_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_port_info_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 #define IB_PORT_STATE_MASK			0x0F
c2d36b
@@ -4726,7 +4712,6 @@ typedef struct _ib_port_info {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_port_info_ext {
c2d36b
 	ib_net32_t cap_mask;
c2d36b
 	ib_net16_t fec_mode_active;
c2d36b
@@ -4737,8 +4722,7 @@ typedef struct _ib_port_info_ext {
c2d36b
 	ib_net16_t hdr_fec_mode_sup;
c2d36b
 	ib_net16_t hdr_fec_mode_enable;
c2d36b
 	uint8_t reserved[46];
c2d36b
-} PACK_SUFFIX ib_port_info_ext_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_port_info_ext_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 #define IB_PORT_EXT_NO_FEC_MODE_ACTIVE		    0
c2d36b
@@ -6563,7 +6547,6 @@ static inline uint8_t OSM_API ib_get_highest_link_width(IN const uint8_t widths)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_mlnx_ext_port_info {
c2d36b
 	uint8_t resvd1[3];
c2d36b
 	uint8_t state_change_enable;
c2d36b
@@ -6574,13 +6557,11 @@ typedef struct _ib_mlnx_ext_port_info {
c2d36b
 	uint8_t resvd4[3];
c2d36b
 	uint8_t link_speed_active;
c2d36b
 	uint8_t resvd5[48];
c2d36b
-} PACK_SUFFIX ib_mlnx_ext_port_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_mlnx_ext_port_info_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 typedef uint8_t ib_svc_name_t[64];
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_service_record {
c2d36b
 	ib_net64_t service_id;
c2d36b
 	ib_gid_t service_gid;
c2d36b
@@ -6593,8 +6574,7 @@ typedef struct _ib_service_record {
c2d36b
 	ib_net16_t service_data16[8];
c2d36b
 	ib_net32_t service_data32[4];
c2d36b
 	ib_net64_t service_data64[2];
c2d36b
-} PACK_SUFFIX ib_service_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_service_record_t;
c2d36b
 
c2d36b
 #include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_portinfo_record {
c2d36b
@@ -6606,24 +6586,20 @@ typedef struct _ib_portinfo_record {
c2d36b
 } PACK_SUFFIX ib_portinfo_record_t;
c2d36b
 #include <complib/cl_packoff.h>
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_portinfoext_record {
c2d36b
 	ib_net16_t lid;
c2d36b
 	uint8_t port_num;
c2d36b
 	uint8_t options;
c2d36b
 	ib_port_info_ext_t port_info_ext;
c2d36b
-} PACK_SUFFIX ib_portinfoext_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_portinfoext_record_t;
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_link_record {
c2d36b
 	ib_net16_t from_lid;
c2d36b
 	uint8_t from_port_num;
c2d36b
 	uint8_t to_port_num;
c2d36b
 	ib_net16_t to_lid;
c2d36b
 	uint8_t pad[2];
c2d36b
-} PACK_SUFFIX ib_link_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_link_record_t;
c2d36b
 
c2d36b
 #include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_sminfo_record {
c2d36b
@@ -6643,14 +6619,12 @@ typedef struct _ib_sminfo_record {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_lft_record {
c2d36b
 	ib_net16_t lid;
c2d36b
 	ib_net16_t block_num;
c2d36b
 	uint32_t resv0;
c2d36b
 	uint8_t lft[64];
c2d36b
-} PACK_SUFFIX ib_lft_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_lft_record_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_mft_record_t
c2d36b
@@ -6662,14 +6636,12 @@ typedef struct _ib_lft_record {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_mft_record {
c2d36b
 	ib_net16_t lid;
c2d36b
 	ib_net16_t position_block_num;
c2d36b
 	uint32_t resv0;
c2d36b
 	ib_net16_t mft[IB_MCAST_BLOCK_SIZE];
c2d36b
-} PACK_SUFFIX ib_mft_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_mft_record_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_switch_info_t
c2d36b
@@ -6681,7 +6653,6 @@ typedef struct _ib_mft_record {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_switch_info {
c2d36b
 	ib_net16_t lin_cap;
c2d36b
 	ib_net16_t rand_cap;
c2d36b
@@ -6696,17 +6667,14 @@ typedef struct _ib_switch_info {
c2d36b
 	uint8_t flags;
c2d36b
 	uint8_t resvd;
c2d36b
 	ib_net16_t mcast_top;
c2d36b
-} PACK_SUFFIX ib_switch_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_switch_info_t;
c2d36b
 /************/
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_switch_info_record {
c2d36b
 	ib_net16_t lid;
c2d36b
 	uint16_t resv0;
c2d36b
 	ib_switch_info_t switch_info;
c2d36b
-} PACK_SUFFIX ib_switch_info_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_switch_info_record_t;
c2d36b
 
c2d36b
 #define IB_SWITCH_PSC 0x04
c2d36b
 
c2d36b
@@ -6895,26 +6863,21 @@ ib_switch_info_is_enhanced_port0(IN const ib_switch_info_t * const p_si)
c2d36b
 */
c2d36b
 #define	GUID_TABLE_MAX_ENTRIES		8
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_guid_info {
c2d36b
 	ib_net64_t guid[GUID_TABLE_MAX_ENTRIES];
c2d36b
-} PACK_SUFFIX ib_guid_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_guid_info_t;
c2d36b
 /************/
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_guidinfo_record {
c2d36b
 	ib_net16_t lid;
c2d36b
 	uint8_t block_num;
c2d36b
 	uint8_t resv;
c2d36b
 	uint32_t reserved;
c2d36b
 	ib_guid_info_t guid_info;
c2d36b
-} PACK_SUFFIX ib_guidinfo_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_guidinfo_record_t;
c2d36b
 
c2d36b
 #define IB_MULTIPATH_MAX_GIDS 11	/* Support max that can fit into first MAD (for now) */
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_multipath_rec_t {
c2d36b
 	ib_net32_t hop_flow_raw;
c2d36b
 	uint8_t tclass;
c2d36b
@@ -6930,8 +6893,7 @@ typedef struct _ib_multipath_rec_t {
c2d36b
 	uint8_t dgid_count;
c2d36b
 	uint8_t service_id_56lsb[7];
c2d36b
 	ib_gid_t gids[IB_MULTIPATH_MAX_GIDS];
c2d36b
-} PACK_SUFFIX ib_multipath_rec_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_multipath_rec_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *       hop_flow_raw
c2d36b
@@ -7391,11 +7353,9 @@ ib_multipath_rec_service_id(IN const ib_multipath_rec_t * const p_rec)
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_pkey_table {
c2d36b
 	ib_net16_t pkey_entry[IB_NUM_PKEY_ELEMENTS_IN_BLOCK];
c2d36b
-} PACK_SUFFIX ib_pkey_table_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_pkey_table_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_pkey_table_record_t
c2d36b
@@ -7407,7 +7367,6 @@ typedef struct _ib_pkey_table {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_pkey_table_record {
c2d36b
 	ib_net16_t lid;		// for CA: lid of port, for switch lid of port 0
c2d36b
 	ib_net16_t block_num;
c2d36b
@@ -7415,8 +7374,7 @@ typedef struct _ib_pkey_table_record {
c2d36b
 	uint8_t reserved1;
c2d36b
 	uint16_t reserved2;
c2d36b
 	ib_pkey_table_t pkey_tbl;
c2d36b
-} PACK_SUFFIX ib_pkey_table_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_pkey_table_record_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 #define IB_DROP_VL 15
c2d36b
@@ -7430,11 +7388,9 @@ typedef struct _ib_pkey_table_record {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_slvl_table {
c2d36b
 	uint8_t raw_vl_by_sl[IB_MAX_NUM_VLS / 2];
c2d36b
-} PACK_SUFFIX ib_slvl_table_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_slvl_table_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_slvl_table_record_t
c2d36b
@@ -7446,15 +7402,13 @@ typedef struct _ib_slvl_table {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_slvl_table_record {
c2d36b
 	ib_net16_t lid;		// for CA: lid of port, for switch lid of port 0
c2d36b
 	uint8_t in_port_num;	// reserved for CAs
c2d36b
 	uint8_t out_port_num;	// reserved for CAs
c2d36b
 	uint32_t resv;
c2d36b
 	ib_slvl_table_t slvl_tbl;
c2d36b
-} PACK_SUFFIX ib_slvl_table_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_slvl_table_record_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 /****f* IBA Base: Types/ib_slvl_table_set
c2d36b
@@ -7553,12 +7507,10 @@ ib_slvl_table_get(IN const ib_slvl_table_t * p_slvl_tbl, IN uint8_t sl_index)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_vl_arb_element {
c2d36b
 	uint8_t vl;
c2d36b
 	uint8_t weight;
c2d36b
-} PACK_SUFFIX ib_vl_arb_element_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_vl_arb_element_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 #define IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK 32
c2d36b
@@ -7572,11 +7524,9 @@ typedef struct _ib_vl_arb_element {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_vl_arb_table {
c2d36b
 	ib_vl_arb_element_t vl_entry[IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK];
c2d36b
-} PACK_SUFFIX ib_vl_arb_table_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_vl_arb_table_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_vl_arb_table_record_t
c2d36b
@@ -7588,21 +7538,18 @@ typedef struct _ib_vl_arb_table {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_vl_arb_table_record {
c2d36b
 	ib_net16_t lid;		// for CA: lid of port, for switch lid of port 0
c2d36b
 	uint8_t port_num;
c2d36b
 	uint8_t block_num;
c2d36b
 	uint32_t reserved;
c2d36b
 	ib_vl_arb_table_t vl_arb_tbl;
c2d36b
-} PACK_SUFFIX ib_vl_arb_table_record_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_vl_arb_table_record_t;
c2d36b
 /************/
c2d36b
 
c2d36b
 /*
c2d36b
  *	Global route header information received with unreliable datagram messages
c2d36b
  */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_grh {
c2d36b
 	ib_net32_t ver_class_flow;
c2d36b
 	ib_net16_t resv1;
c2d36b
@@ -7610,8 +7557,7 @@ typedef struct _ib_grh {
c2d36b
 	uint8_t hop_limit;
c2d36b
 	ib_gid_t src_gid;
c2d36b
 	ib_gid_t dest_gid;
c2d36b
-} PACK_SUFFIX ib_grh_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_grh_t;
c2d36b
 
c2d36b
 /****f* IBA Base: Types/ib_grh_get_ver_class_flow
c2d36b
 * NAME
c2d36b
@@ -7719,7 +7665,6 @@ ib_grh_set_ver_class_flow(IN const uint8_t ver,
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_member_rec {
c2d36b
 	ib_gid_t mgid;
c2d36b
 	ib_gid_t port_gid;
c2d36b
@@ -7735,8 +7680,7 @@ typedef struct _ib_member_rec {
c2d36b
 	uint8_t proxy_join:1;
c2d36b
 	uint8_t reserved[2];
c2d36b
 	uint8_t pad[4];
c2d36b
-} PACK_SUFFIX ib_member_rec_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_member_rec_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	mgid
c2d36b
@@ -8599,14 +8543,12 @@ typedef struct _ib_inform_info_record {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_perfmgt_mad {
c2d36b
 	ib_mad_t header;
c2d36b
 	uint8_t resv[40];
c2d36b
 #define	IB_PM_DATA_SIZE		192
c2d36b
 	uint8_t data[IB_PM_DATA_SIZE];
c2d36b
-} PACK_SUFFIX ib_perfmgt_mad_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_perfmgt_mad_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	header
c2d36b
@@ -8632,7 +8574,6 @@ typedef struct _ib_perfmgt_mad {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_port_counters {
c2d36b
 	uint8_t reserved;
c2d36b
 	uint8_t port_select;
c2d36b
@@ -8655,8 +8596,7 @@ typedef struct _ib_port_counters {
c2d36b
 	ib_net32_t xmit_pkts;
c2d36b
 	ib_net32_t rcv_pkts;
c2d36b
 	ib_net32_t xmit_wait;
c2d36b
-} PACK_SUFFIX ib_port_counters_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_port_counters_t;
c2d36b
 
c2d36b
 #define PC_LINK_INT(integ_buf_over) ((integ_buf_over & 0xF0) >> 4)
c2d36b
 #define PC_BUF_OVERRUN(integ_buf_over) (integ_buf_over & 0x0F)
c2d36b
@@ -8670,7 +8610,6 @@ typedef struct _ib_port_counters {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_port_counters_ext {
c2d36b
 	uint8_t reserved;
c2d36b
 	uint8_t port_select;
c2d36b
@@ -8698,8 +8637,7 @@ typedef struct _ib_port_counters_ext {
c2d36b
 	ib_net64_t vl15_dropped;
c2d36b
 	ib_net64_t xmit_wait;
c2d36b
 	ib_net64_t qp1_dropped;
c2d36b
-} PACK_SUFFIX ib_port_counters_ext_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_port_counters_ext_t;
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_port_samples_control
c2d36b
 * NAME
c2d36b
@@ -8767,7 +8705,6 @@ typedef struct _ib_port_samples_control {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_port_samples_result {
c2d36b
 	ib_net16_t tag;
c2d36b
 	ib_net16_t sample_status;	/* 14 bits res : 2 bits sample_status */
c2d36b
@@ -8786,8 +8723,7 @@ typedef struct _ib_port_samples_result {
c2d36b
 	ib_net32_t counter12;
c2d36b
 	ib_net32_t counter13;
c2d36b
 	ib_net32_t counter14;
c2d36b
-} PACK_SUFFIX ib_port_samples_result_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_port_samples_result_t;
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_port_xmit_data_sl
c2d36b
 * NAME
c2d36b
@@ -8798,15 +8734,13 @@ typedef struct _ib_port_samples_result {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_port_xmit_data_sl {
c2d36b
 	uint8_t reserved;
c2d36b
 	uint8_t port_select;
c2d36b
 	ib_net16_t counter_select;
c2d36b
 	ib_net32_t port_xmit_data_sl[16];
c2d36b
 	uint8_t resv[124];
c2d36b
-} PACK_SUFFIX ib_port_xmit_data_sl_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_port_xmit_data_sl_t;
c2d36b
 
c2d36b
 /****s* IBA Base: Types/ib_port_rcv_data_sl
c2d36b
 * NAME
c2d36b
@@ -8817,15 +8751,13 @@ typedef struct _ib_port_xmit_data_sl {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_port_rcv_data_sl {
c2d36b
 	uint8_t reserved;
c2d36b
 	uint8_t port_select;
c2d36b
 	ib_net16_t counter_select;
c2d36b
 	ib_net32_t port_rcv_data_sl[16];
c2d36b
 	uint8_t resv[124];
c2d36b
-} PACK_SUFFIX ib_port_rcv_data_sl_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_port_rcv_data_sl_t;
c2d36b
 
c2d36b
 /****d* IBA Base: Types/DM_SVC_NAME
c2d36b
 * NAME
c2d36b
@@ -8850,14 +8782,12 @@ typedef struct _ib_port_rcv_data_sl {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_dm_mad {
c2d36b
 	ib_mad_t header;
c2d36b
 	uint8_t resv[40];
c2d36b
 #define	IB_DM_DATA_SIZE		192
c2d36b
 	uint8_t data[IB_DM_DATA_SIZE];
c2d36b
-} PACK_SUFFIX ib_dm_mad_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_dm_mad_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	header
c2d36b
@@ -8883,7 +8813,6 @@ typedef struct _ib_dm_mad {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_iou_info {
c2d36b
 	ib_net16_t change_id;
c2d36b
 	uint8_t max_controllers;
c2d36b
@@ -8894,8 +8823,7 @@ typedef struct _ib_iou_info {
c2d36b
 #define	IOC_INSTALLED			0x1
c2d36b
 //              Reserved values                         0x02-0xE
c2d36b
 #define	SLOT_DOES_NOT_EXIST		0xF
c2d36b
-} PACK_SUFFIX ib_iou_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_iou_info_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	change_id
c2d36b
@@ -9023,7 +8951,6 @@ ioc_at_slot(IN const ib_iou_info_t * const p_iou_info, IN uint8_t slot)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_ioc_profile {
c2d36b
 	ib_net64_t ioc_guid;
c2d36b
 	ib_net32_t vend_id;
c2d36b
@@ -9057,8 +8984,7 @@ typedef struct _ib_ioc_profile {
c2d36b
 	uint8_t resv6[9];
c2d36b
 #define	CTRL_ID_STRING_LEN	64
c2d36b
 	char id_string[CTRL_ID_STRING_LEN];
c2d36b
-} PACK_SUFFIX ib_ioc_profile_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_ioc_profile_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	ioc_guid
c2d36b
@@ -9142,13 +9068,11 @@ ib_ioc_profile_set_vend_id(IN ib_ioc_profile_t * const p_ioc_profile,
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_svc_entry {
c2d36b
 #define	MAX_SVC_ENTRY_NAME_LEN		40
c2d36b
 	char name[MAX_SVC_ENTRY_NAME_LEN];
c2d36b
 	ib_net64_t id;
c2d36b
-} PACK_SUFFIX ib_svc_entry_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_svc_entry_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	name
c2d36b
@@ -9170,12 +9094,10 @@ typedef struct _ib_svc_entry {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_svc_entries {
c2d36b
 #define	SVC_ENTRY_COUNT			4
c2d36b
 	ib_svc_entry_t service_entry[SVC_ENTRY_COUNT];
c2d36b
-} PACK_SUFFIX ib_svc_entries_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_svc_entries_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	service_entry
c2d36b
@@ -9203,7 +9125,6 @@ ib_dm_get_slot_lo_hi(IN const ib_net32_t slot_lo_hi,
c2d36b
 /*
c2d36b
  *	IBA defined information describing an I/O controller
c2d36b
  */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_ioc_info {
c2d36b
 	ib_net64_t module_guid;
c2d36b
 	ib_net64_t iou_guid;
c2d36b
@@ -9211,8 +9132,7 @@ typedef struct _ib_ioc_info {
c2d36b
 	ib_net64_t access_key;
c2d36b
 	uint16_t initiators_conf;
c2d36b
 	uint8_t resv[38];
c2d36b
-} PACK_SUFFIX ib_ioc_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_ioc_info_t;
c2d36b
 
c2d36b
 /*
c2d36b
  *	The following definitions are shared between the Access Layer and VPD
c2d36b
@@ -11569,14 +11489,12 @@ typedef struct _ib_ci_op {
c2d36b
 #define IB_CC_MAD_HDR_SIZE (sizeof(ib_sa_mad_t) - IB_CC_LOG_DATA_SIZE \
c2d36b
 						- IB_CC_MGT_DATA_SIZE)
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_cc_mad {
c2d36b
 	ib_mad_t header;
c2d36b
 	ib_net64_t cc_key;
c2d36b
 	uint8_t log_data[IB_CC_LOG_DATA_SIZE];
c2d36b
 	uint8_t mgt_data[IB_CC_MGT_DATA_SIZE];
c2d36b
-} PACK_SUFFIX ib_cc_mad_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_cc_mad_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	header
c2d36b
@@ -11688,13 +11606,11 @@ ib_cc_mad_get_mgt_data_ptr(IN const ib_cc_mad_t * const p_cc_mad)
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_cong_info {
c2d36b
 	uint8_t cong_info;
c2d36b
 	uint8_t resv;
c2d36b
 	uint8_t ctrl_table_cap;
c2d36b
-} PACK_SUFFIX ib_cong_info_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_cong_info_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	cong_info
c2d36b
@@ -11751,14 +11667,12 @@ typedef struct _ib_cong_key_info {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_cong_log_event_sw {
c2d36b
 	ib_net16_t slid;
c2d36b
 	ib_net16_t dlid;
c2d36b
 	ib_net32_t sl;
c2d36b
 	ib_net32_t time_stamp;
c2d36b
-} PACK_SUFFIX ib_cong_log_event_sw_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_cong_log_event_sw_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	slid
c2d36b
@@ -11787,15 +11701,13 @@ typedef struct _ib_cong_log_event_sw {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_cong_log_event_ca {
c2d36b
 	ib_net32_t local_qp_resv0;
c2d36b
 	ib_net32_t remote_qp_sl_service_type;
c2d36b
 	ib_net16_t remote_lid;
c2d36b
 	ib_net16_t resv1;
c2d36b
 	ib_net32_t time_stamp;
c2d36b
-} PACK_SUFFIX ib_cong_log_event_ca_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_cong_log_event_ca_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *	resv0_local_qp
c2d36b
@@ -11895,7 +11807,6 @@ typedef struct _ib_cong_log {
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
 #define IB_CC_PORT_MASK_DATA_SIZE 32
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_sw_cong_setting {
c2d36b
 	ib_net32_t control_map;
c2d36b
 	uint8_t victim_mask[IB_CC_PORT_MASK_DATA_SIZE];
c2d36b
@@ -11905,8 +11816,7 @@ typedef struct _ib_sw_cong_setting {
c2d36b
 	ib_net16_t cs_threshold_resv;
c2d36b
 	ib_net16_t cs_return_delay;
c2d36b
 	ib_net16_t marking_rate;
c2d36b
-} PACK_SUFFIX ib_sw_cong_setting_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_sw_cong_setting_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
@@ -11960,13 +11870,11 @@ typedef struct _ib_sw_cong_setting {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_sw_port_cong_setting_element {
c2d36b
 	uint8_t valid_ctrl_type_res_threshold;
c2d36b
 	uint8_t packet_size;
c2d36b
 	ib_net16_t cong_param;
c2d36b
-} PACK_SUFFIX ib_sw_port_cong_setting_element_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_sw_port_cong_setting_element_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
@@ -12023,11 +11931,9 @@ typedef ib_sw_port_cong_setting_element_t ib_sw_port_cong_setting_block_t[IB_CC_
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
 
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_sw_port_cong_setting {
c2d36b
 	ib_sw_port_cong_setting_block_t block;
c2d36b
-} PACK_SUFFIX ib_sw_port_cong_setting_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_sw_port_cong_setting_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
@@ -12047,7 +11953,6 @@ typedef struct _ib_sw_port_cong_setting {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_ca_cong_entry {
c2d36b
 	ib_net16_t ccti_timer;
c2d36b
 	uint8_t ccti_increase;
c2d36b
@@ -12055,8 +11960,7 @@ typedef struct _ib_ca_cong_entry {
c2d36b
 	uint8_t ccti_min;
c2d36b
 	uint8_t resv0;
c2d36b
 	ib_net16_t resv1;
c2d36b
-} PACK_SUFFIX ib_ca_cong_entry_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_ca_cong_entry_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
@@ -12089,13 +11993,11 @@ typedef struct _ib_ca_cong_entry {
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
 #define IB_CA_CONG_ENTRY_DATA_SIZE 16
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_ca_cong_setting {
c2d36b
 	ib_net16_t port_control;
c2d36b
 	ib_net16_t control_map;
c2d36b
 	ib_ca_cong_entry_t entry_list[IB_CA_CONG_ENTRY_DATA_SIZE];
c2d36b
-} PACK_SUFFIX ib_ca_cong_setting_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_ca_cong_setting_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
@@ -12125,11 +12027,9 @@ typedef struct _ib_ca_cong_setting {
c2d36b
 *
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_cc_tbl_entry {
c2d36b
 	ib_net16_t shift_multiplier;
c2d36b
-} PACK_SUFFIX ib_cc_tbl_entry_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_cc_tbl_entry_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
@@ -12153,13 +12053,11 @@ typedef struct _ib_cc_tbl_entry {
c2d36b
 * SYNOPSIS
c2d36b
 */
c2d36b
 #define IB_CC_TBL_ENTRY_LIST_MAX 64
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_cc_tbl {
c2d36b
 	ib_net16_t ccti_limit;
c2d36b
 	ib_net16_t resv;
c2d36b
 	ib_cc_tbl_entry_t entry_list[IB_CC_TBL_ENTRY_LIST_MAX];
c2d36b
-} PACK_SUFFIX ib_cc_tbl_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_cc_tbl_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
@@ -12182,11 +12080,9 @@ typedef struct _ib_cc_tbl {
c2d36b
 *
c2d36b
 * SOURCE
c2d36b
 */
c2d36b
-#include <complib/cl_packon.h>
c2d36b
 typedef struct _ib_time_stamp {
c2d36b
 	ib_net32_t value;
c2d36b
-} PACK_SUFFIX ib_time_stamp_t;
c2d36b
-#include <complib/cl_packoff.h>
c2d36b
+} ib_time_stamp_t;
c2d36b
 /*
c2d36b
 * FIELDS
c2d36b
 *
c2d36b
-- 
c2d36b
2.20.1
c2d36b