The trap data in the ib_event_rec is both incomplete (wrt the types of
traps that it can report) and unused.  Remove it to save stack space.

This will also make it cleaner to have event handlers per QP, SRQ, CQ, etc.

Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>
---
This breaks the ABI, so it would be ideal to include it with other ABI
breaking changes (like WDK support).

Index: hw/mthca/kernel/hca_data.c
===================================================================
--- hw/mthca/kernel/hca_data.c  (revision 1006)
+++ hw/mthca/kernel/hca_data.c  (working copy)
@@ -352,7 +334,6 @@
 
        // prepare parameters
        event_rec.context = (void *)hob_p->ca_context;
-       event_rec.trap.info.port_num = ev->element.port_num;
        event_rec.type = ev->event;
        if (event_rec.type > IB_AE_UNKNOWN) {
                // CL_ASSERT(0); // This shouldn't happen
@@ -841,7 +822,7 @@
                        &ah_attr_p->grh.traffic_class, 
&ah_attr_p->grh.flow_label );
                err = ib_find_cached_gid((struct ib_device *)ib_dev_p, 
                        (union ib_gid   *)ibal_av_p->grh.src_gid.raw, 
&port_num, &gid_index);
-               if (err) {
+               if (err) {
 
                        HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_SHIM 
,("ib_find_cached_gid failed %d (%#x). Using default:
sgid_index = 0\n", err, err));
                        gid_index = 0;
Index: inc/iba/ib_types.h
===================================================================
--- inc/iba/ib_types.h  (revision 1006)
+++ inc/iba/ib_types.h  (working copy)
@@ -8943,43 +8943,6 @@
        /* HCA vendor specific event information. */
        uint64_t                                vendor_specific;
 
-       /* The following structures are valid only for trap types. */
-       union _trap
-       {
-               struct
-               {
-                       uint16_t                        lid;
-                       ib_net64_t                      port_guid;
-                       uint8_t                         port_num;
-
-                       /*
-                        * The following structure is valid only for
-                        * P_KEY, Q_KEY, and M_KEY violation traps.
-                        */
-                       struct
-                       {
-                               uint8_t                 sl;
-                               uint16_t                src_lid;
-                               uint16_t                dest_lid;
-                               union _key
-                               {
-                                       uint16_t        pkey;
-                                       uint32_t        qkey;
-                                       uint64_t        mkey;
-                               } key;
-                               uint32_t                src_qp;
-                               uint32_t                dest_qp;
-                               ib_gid_t                src_gid;
-                               ib_gid_t                dest_gid;
-
-                       }       violation;
-
-               } info;
-
-               ib_net64_t      sysimg_guid;
-
-       }       trap;
-
 }      ib_event_rec_t;
 /*******/
 


_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to