Commit 4ab1144b authored by Norio Yamaguchi's avatar Norio Yamaguchi Committed by Huiwei Lu
Browse files

Fix strict-aliasing rules break in netmod-IB


Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
parent a6b35edc
......@@ -55,8 +55,12 @@ typedef struct {
/* macro for secret area in vc */
#define VC_CH(vc) ((MPIDI_CH3I_VC *)&(vc)->ch)
#define VC_IB(vc) ((MPID_nem_ib_vc_area *)VC_CH((vc))->netmod_area.padding)
#define VC_FIELD(vcp, field) (((MPID_nem_ib_vc_area *)VC_CH(((vcp)))->netmod_area.padding)->field)
static inline MPID_nem_ib_vc_area *VC_IB(MPIDI_VC_t * vc)
{
return (MPID_nem_ib_vc_area *) vc->ch.netmod_area.padding;
}
#define VC_FIELD(vcp, field) VC_IB(vcp)->field
/* The req provides a generic buffer in which network modules can store
private fields This removes all dependencies from the req structure
......@@ -88,8 +92,12 @@ typedef struct {
} MPID_nem_ib_req_area;
/* macro for secret area in req */
#define REQ_IB(req) ((MPID_nem_ib_req_area *)(&(req)->ch.netmod_area.padding))
#define REQ_FIELD(reqp, field) (((MPID_nem_ib_req_area *)((reqp)->ch.netmod_area.padding))->field)
static inline MPID_nem_ib_req_area *REQ_IB(MPID_Request * req)
{
return (MPID_nem_ib_req_area *) req->ch.netmod_area.padding;
}
#define REQ_FIELD(reqp, field) (REQ_IB(reqp)->field)
/* see src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h */
/* sreq is never enqueued into posted-queue nor unexpected-queue, so we can reuse sreq->dev.next */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment