aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_hw.c
diff options
context:
space:
mode:
authorFaisal Latif <flatif@neteffect.com>2008-07-24 23:50:45 -0400
committerRoland Dreier <rolandd@cisco.com>2008-07-24 23:50:45 -0400
commit6492cdf3a24fd620660c399745b5e169a0ed27d6 (patch)
tree474a0e937cda0b4cff70bc47a657d8338fb91d22 /drivers/infiniband/hw/nes/nes_hw.c
parentfb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 (diff)
RDMA/nes: CM connection setup/teardown rework
Major rework of CM connection setup/teardown. We had a number of issues with MPI applications not starting/terminating properly over time. With these changes we were able to run longer on larger clusters. * Remove memory allocation from nes_connect() and nes_cm_connect(). * Fix mini_cm_dec_refcnt_listen() when destroying listener. * Remove unnecessary code from schedule_nes_timer() and nes_cm_timer_tick(). * Functionalize mini_cm_recv_pkt() and process_packet(). * Clean up cm_node->ref_count usage. * Reuse skbs if available. Signed-off-by: Faisal Latif <flatif@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_hw.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 85f26d19a32b..1513d4066f1b 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -2814,7 +2814,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
2814 nesqp = *((struct nes_qp **)&context); 2814 nesqp = *((struct nes_qp **)&context);
2815 if (atomic_inc_return(&nesqp->close_timer_started) == 1) { 2815 if (atomic_inc_return(&nesqp->close_timer_started) == 1) {
2816 nesqp->cm_id->add_ref(nesqp->cm_id); 2816 nesqp->cm_id->add_ref(nesqp->cm_id);
2817 nes_add_ref(&nesqp->ibqp);
2818 schedule_nes_timer(nesqp->cm_node, (struct sk_buff *)nesqp, 2817 schedule_nes_timer(nesqp->cm_node, (struct sk_buff *)nesqp,
2819 NES_TIMER_TYPE_CLOSE, 1, 0); 2818 NES_TIMER_TYPE_CLOSE, 1, 0);
2820 nes_debug(NES_DBG_AEQ, "QP%u Not decrementing QP refcount (%d)," 2819 nes_debug(NES_DBG_AEQ, "QP%u Not decrementing QP refcount (%d),"
@@ -2838,7 +2837,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
2838 if (async_event_id == NES_AEQE_AEID_RESET_SENT) { 2837 if (async_event_id == NES_AEQE_AEID_RESET_SENT) {
2839 tcp_state = NES_AEQE_TCP_STATE_CLOSED; 2838 tcp_state = NES_AEQE_TCP_STATE_CLOSED;
2840 } 2839 }
2841 nes_add_ref(&nesqp->ibqp);
2842 spin_lock_irqsave(&nesqp->lock, flags); 2840 spin_lock_irqsave(&nesqp->lock, flags);
2843 nesqp->hw_iwarp_state = iwarp_state; 2841 nesqp->hw_iwarp_state = iwarp_state;
2844 nesqp->hw_tcp_state = tcp_state; 2842 nesqp->hw_tcp_state = tcp_state;
@@ -2876,7 +2874,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
2876 } 2874 }
2877 spin_unlock_irqrestore(&nesqp->lock, flags); 2875 spin_unlock_irqrestore(&nesqp->lock, flags);
2878 if (next_iwarp_state) { 2876 if (next_iwarp_state) {
2879 nes_add_ref(&nesqp->ibqp);
2880 nes_debug(NES_DBG_AEQ, "issuing hw modifyqp for QP%u. next state = 0x%08X," 2877 nes_debug(NES_DBG_AEQ, "issuing hw modifyqp for QP%u. next state = 0x%08X,"
2881 " also added another reference\n", 2878 " also added another reference\n",
2882 nesqp->hwqp.qp_id, next_iwarp_state); 2879 nesqp->hwqp.qp_id, next_iwarp_state);
@@ -2888,7 +2885,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
2888 /* FIN Received but ib state not RTS, 2885 /* FIN Received but ib state not RTS,
2889 close complete will be on its way */ 2886 close complete will be on its way */
2890 spin_unlock_irqrestore(&nesqp->lock, flags); 2887 spin_unlock_irqrestore(&nesqp->lock, flags);
2891 nes_rem_ref(&nesqp->ibqp);
2892 return; 2888 return;
2893 } 2889 }
2894 spin_unlock_irqrestore(&nesqp->lock, flags); 2890 spin_unlock_irqrestore(&nesqp->lock, flags);
@@ -2922,7 +2918,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
2922 if ((tcp_state == NES_AEQE_TCP_STATE_CLOSE_WAIT) || 2918 if ((tcp_state == NES_AEQE_TCP_STATE_CLOSE_WAIT) ||
2923 ((nesqp->ibqp_state == IB_QPS_RTS)&& 2919 ((nesqp->ibqp_state == IB_QPS_RTS)&&
2924 (async_event_id == NES_AEQE_AEID_LLP_CONNECTION_RESET))) { 2920 (async_event_id == NES_AEQE_AEID_LLP_CONNECTION_RESET))) {
2925 nes_add_ref(&nesqp->ibqp);
2926 nes_cm_disconn(nesqp); 2921 nes_cm_disconn(nesqp);
2927 } else { 2922 } else {
2928 nesqp->in_disconnect = 0; 2923 nesqp->in_disconnect = 0;
@@ -2931,7 +2926,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
2931 break; 2926 break;
2932 case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES: 2927 case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES:
2933 nesqp = *((struct nes_qp **)&context); 2928 nesqp = *((struct nes_qp **)&context);
2934 nes_add_ref(&nesqp->ibqp);
2935 spin_lock_irqsave(&nesqp->lock, flags); 2929 spin_lock_irqsave(&nesqp->lock, flags);
2936 nesqp->hw_iwarp_state = NES_AEQE_IWARP_STATE_ERROR; 2930 nesqp->hw_iwarp_state = NES_AEQE_IWARP_STATE_ERROR;
2937 nesqp->hw_tcp_state = NES_AEQE_TCP_STATE_CLOSED; 2931 nesqp->hw_tcp_state = NES_AEQE_TCP_STATE_CLOSED;
@@ -3042,7 +3036,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
3042 nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context); 3036 nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
3043 } 3037 }
3044 /* tell cm to disconnect, cm will queue work to thread */ 3038 /* tell cm to disconnect, cm will queue work to thread */
3045 nes_add_ref(&nesqp->ibqp);
3046 nes_cm_disconn(nesqp); 3039 nes_cm_disconn(nesqp);
3047 break; 3040 break;
3048 case NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE: 3041 case NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE:
@@ -3062,7 +3055,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
3062 nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context); 3055 nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
3063 } 3056 }
3064 /* tell cm to disconnect, cm will queue work to thread */ 3057 /* tell cm to disconnect, cm will queue work to thread */
3065 nes_add_ref(&nesqp->ibqp);
3066 nes_cm_disconn(nesqp); 3058 nes_cm_disconn(nesqp);
3067 break; 3059 break;
3068 case NES_AEQE_AEID_LLP_RECEIVED_MPA_CRC_ERROR: 3060 case NES_AEQE_AEID_LLP_RECEIVED_MPA_CRC_ERROR:
@@ -3082,7 +3074,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
3082 nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context); 3074 nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
3083 } 3075 }
3084 /* tell cm to disconnect, cm will queue work to thread */ 3076 /* tell cm to disconnect, cm will queue work to thread */
3085 nes_add_ref(&nesqp->ibqp);
3086 nes_cm_disconn(nesqp); 3077 nes_cm_disconn(nesqp);
3087 break; 3078 break;
3088 /* TODO: additional AEs need to be here */ 3079 /* TODO: additional AEs need to be here */