From patchwork Mon Dec 22 23:32:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 5529291 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 42AA99F30B for ; Mon, 22 Dec 2014 23:32:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8CFB420165 for ; Mon, 22 Dec 2014 23:32:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BED6B20120 for ; Mon, 22 Dec 2014 23:32:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752469AbaLVXcX (ORCPT ); Mon, 22 Dec 2014 18:32:23 -0500 Received: from prdiron-3.llnl.gov ([128.15.143.173]:33661 "EHLO prdiron-3.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbaLVXcW (ORCPT ); Mon, 22 Dec 2014 18:32:22 -0500 X-Attachments: Received: from auk59.llnl.gov (HELO [134.9.93.24]) ([134.9.93.24]) by prdiron-3.llnl.gov with ESMTP; 22 Dec 2014 15:32:22 -0800 Subject: [PATCH 3/3] osm_congestion_control.c: Reset cc_timeout_count when count threshold passed From: Albert Chu To: linux-rdma@vger.kernel.org Date: Mon, 22 Dec 2014 15:32:21 -0800 Message-Id: <1419291141.21271.17.camel@auk59.llnl.gov> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Albert L. Chu --- opensm/osm_congestion_control.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/opensm/osm_congestion_control.c b/opensm/osm_congestion_control.c index 54574b7..bfcd8a5 100644 --- a/opensm/osm_congestion_control.c +++ b/opensm/osm_congestion_control.c @@ -705,8 +705,10 @@ static void cc_mad_send_err_callback(void *bind_context, if (p_madw->status == IB_TIMEOUT) { p_port->cc_timeout_count++; if (p_port->cc_timeout_count > OSM_CC_TIMEOUT_COUNT_THRESHOLD - && !p_port->cc_unavailable_flag) + && !p_port->cc_unavailable_flag) { p_port->cc_unavailable_flag = TRUE; + p_port->cc_timeout_count = 0; + } } else p_cc->subn->subnet_initialization_error = TRUE;