[ofa-general] [PATCH] opensm/include/iba/ib_types.h: update Notice DataDetails for Trap 144 to 1.2.1
Ira Weiny
weiny2 at llnl.gov
Fri Mar 14 09:40:27 PDT 2008
On Fri, 14 Mar 2008 07:14:05 -0700
Hal Rosenstock <hrosenstock at xsigo.com> wrote:
> On Fri, 2008-03-14 at 00:12 +0000, Sasha Khapyorsky wrote:
> > On 11:13 Wed 12 Mar , Hal Rosenstock wrote:
> > > >
> > > > struct _ntc_144 {
> > > > ib_net16_t pad1;
> > > > - ib_net16_t lid; // lid where capability mask changed
> > > > - ib_net16_t pad2;
> > > > - ib_net32_t new_cap_mask; // new capability mask
> > > > + ib_net16_t lid; // lid where change occured
> > > > + uint8_t pad2; // reserved
> > > > + uint8_t local_changes; // 7b reserved 1b local changes
> > > > + ib_net32_t new_cap_mask; // new capability mask
> > > > + ib_net16_t change_flgs; // 13b reserved 3b change flags
> > >
> > > Should this be padded out as in the 1.2.1 spec ?
> >
> > It is stated in the 1.2.1 that an upper bits in change_flgs are reserved
> > for the same purpose - OtherLocalChanges mask. So it looks ok for me to
> > have it as one field and not redo later.
>
> Have what as one field ? change_flgs ?
>
> I was referring to a pad3 at the end of the structure as in the spec.
>
I don't think we need this as the union has a "raw_data" of size 54 bytes at
the beginning. However, here is a patch which pads out all the structures
according to the spec.
Ira
>From 9c3deb0df42e31a3807ee32a0ea7c20b8303b016 Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <weiny2 at llnl.gov>
Date: Fri, 14 Mar 2008 09:38:36 -0700
Subject: [PATCH] opensm/include/iba/ib_types.h: pad structs in ib_mad_notice_attr_t.data_details
Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
opensm/include/iba/ib_types.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
index 51695b5..edc1732 100644
--- a/opensm/include/iba/ib_types.h
+++ b/opensm/include/iba/ib_types.h
@@ -7129,16 +7129,19 @@ typedef struct _ib_mad_notice_attr // Total Size calc Accumulated
struct _ntc_64_67 {
uint8_t res[6];
ib_gid_t gid; // the Node or Multicast Group that came in/out
+ uint8_t pad[32];
} PACK_SUFFIX ntc_64_67;
struct _ntc_128 {
ib_net16_t sw_lid; // the sw lid of which link state changed
+ uint8_t pad[52];
} PACK_SUFFIX ntc_128;
struct _ntc_129_131 {
ib_net16_t pad;
ib_net16_t lid; // lid and port number of the violation
uint8_t port_num;
+ uint8_t pad2[49];
} PACK_SUFFIX ntc_129_131;
struct _ntc_144 {
@@ -7148,6 +7151,7 @@ typedef struct _ib_mad_notice_attr // Total Size calc Accumulated
uint8_t local_changes; // 7b reserved 1b local changes
ib_net32_t new_cap_mask; // new capability mask
ib_net16_t change_flgs; // 13b reserved 3b change flags
+ uint8_t pad3[42];
} PACK_SUFFIX ntc_144;
struct _ntc_145 {
@@ -7155,6 +7159,7 @@ typedef struct _ib_mad_notice_attr // Total Size calc Accumulated
ib_net16_t lid; // lid where sys guid changed
ib_net16_t pad2;
ib_net64_t new_sys_guid; // new system image guid
+ uint8_t pad3[40];
} PACK_SUFFIX ntc_145;
struct _ntc_256 { // total: 54
@@ -7182,6 +7187,7 @@ typedef struct _ib_mad_notice_attr // Total Size calc Accumulated
ib_net32_t qp2; // 4
ib_gid_t gid1; // 16
ib_gid_t gid2; // 16
+ uint8_t pad2[4];
} PACK_SUFFIX ntc_257_258;
struct _ntc_259 // pkey violation from switch 51
@@ -7196,6 +7202,7 @@ typedef struct _ib_mad_notice_attr // Total Size calc Accumulated
ib_gid_t gid2; // 16
ib_net16_t sw_lid; // 2
uint8_t port_no; // 1
+ uint8_t pad2[3];
} PACK_SUFFIX ntc_259;
} data_details;
--
1.5.1
More information about the general
mailing list