[ofw] Bad merge in checking 1440

Fab Tillier ftillier at windows.microsoft.com
Wed Jul 23 14:31:10 PDT 2008


Hi Sean,

Your changes in revision 1440 reverted some of the handle exchange\validation between UAL and KAL that shouldn't have been.

Index: core/al/kernel/al_proxy_verbs.c
===================================================================
--- core/al/kernel/al_proxy_verbs.c     (revision 1430)
+++ core/al/kernel/al_proxy_verbs.c     (working copy)
@@ -2356,7 +2356,7 @@
                {
                        /* Validate the AV handle for UD */
                        h_av = (ib_av_handle_t)al_hdl_ref( p_context->h_al,
-                               p_wr[i].dgrm.ud.h_av_padding, AL_OBJ_TYPE_H_AV );
+                               (ULONG_PTR) p_wr[i].dgrm.ud.h_av, AL_OBJ_TYPE_H_AV );
                        if( !h_av )
                        {
                                status = IB_INVALID_AV_HANDLE;Index: core/al/user/ual_qp.c
===================================================================
--- core/al/user/ual_qp.c       (revision 1430)
+++ core/al/user/ual_qp.c       (working copy)
@@ -119,8 +119,8 @@
                p_qp_ioctl->in.send_wr[num_wr] = *p_wr;
                if( h_qp->type == IB_QPT_UNRELIABLE_DGRM )
                {
-                       p_qp_ioctl->in.send_wr[num_wr].dgrm.ud.h_av_padding =
-                               p_wr->dgrm.ud.h_av->obj.hdl;
+                       p_qp_ioctl->in.send_wr[num_wr].dgrm.ud.h_av =
+                               (ib_av_handle_t) (ULONG_PTR) p_wr->dgrm.ud.h_av->obj.hdl;
                }
                num_wr++;
                cl_memcpy(

You also lost the TO_LONG_PTR use in the ib_send_wr_t structure, which is exchanged between UAL and KAL.  If you remove the code that exchanges the WR between user and kernel mode you can eliminate the TO_LONG_PTR use from that structure.  The WR is exchanged in an IOCTL if a UVP doesn't kernel bypass for QP operations.  Alternatively, you can create an IOCTL-safe WR structure and change the IOCTL handling to copy the WR structure field by field into the IOCTL structure, to keep the functionality but eliminate the TO_LONG_PTR use in the public structure.

-Fab



More information about the ofw mailing list