[IBAL] Fix REJ processing - a REJ received with INVALID_SID should not retry
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Jul 2006 13:34:20 +0000 (13:34 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Jul 2006 13:34:20 +0000 (13:34 +0000)
for client/server connection requests.

This fixes bug 148 (http://openib.org/bugzilla/show_bug.cgi?id=148)

Fix suggested by Yossi Leybovich (sleybo@mellanox.co.il)

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@406 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/kernel/al_cm_cep.c

index 7a562c4..3e9035b 100644 (file)
@@ -892,16 +892,18 @@ __process_rej(
 \r
        p_rej = (mad_cm_rej_t*)p_mad->p_mad_buf;\r
 \r
+       AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_CM,\r
+               ("Request rejected reason - %d.\n", p_rej->reason) );\r
+\r
        switch( p_cep->state )\r
        {\r
        case CEP_STATE_REQ_SENT:\r
                /*\r
                 * Ignore rejects with the status set to IB_REJ_INVALID_SID.  We will\r
                 * continue to retry (up to max_cm_retries) to connect to the remote\r
-                * side.  This is required to support peer-to-peer connections and\r
-                * clients that try to connect before the server comes up.\r
+                * side.  This is required to support peer-to-peer connections.\r
                 */\r
-               if( p_rej->reason == IB_REJ_INVALID_SID )\r
+               if( p_cep->p2p && p_rej->reason == IB_REJ_INVALID_SID )\r
                {\r
                        AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_CM,\r
                                ("Request rejected (invalid SID) - retrying.\n") );\r