From patchwork Mon Dec 22 23:32:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 5529271 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E6C64BEEA8 for ; Mon, 22 Dec 2014 23:32:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E968720165 for ; Mon, 22 Dec 2014 23:32:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 719C620120 for ; Mon, 22 Dec 2014 23:32:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753270AbaLVXcQ (ORCPT ); Mon, 22 Dec 2014 18:32:16 -0500 Received: from prdiron-2.llnl.gov ([128.15.143.172]:29296 "EHLO prdiron-2.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752818AbaLVXcO (ORCPT ); Mon, 22 Dec 2014 18:32:14 -0500 X-Attachments: Received: from auk59.llnl.gov (HELO [134.9.93.24]) ([134.9.93.24]) by prdiron-2.llnl.gov with ESMTP; 22 Dec 2014 15:32:13 -0800 Subject: [PATCH 1/3] osm_congestion_control.c: Add additional header status check From: Albert Chu To: linux-rdma@vger.kernel.org Date: Mon, 22 Dec 2014 15:32:12 -0800 Message-Id: <1419291132.21271.14.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 In cc_rcv_mad, also check for IB_MAD_STATUS_UNSUP_CLASS_VER as indication congestion control is not available. Signed-off-by: Albert L. Chu --- opensm/osm_congestion_control.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/opensm/osm_congestion_control.c b/opensm/osm_congestion_control.c index ead1888..0612ba1 100644 --- a/opensm/osm_congestion_control.c +++ b/opensm/osm_congestion_control.c @@ -479,7 +479,8 @@ static void cc_rcv_mad(void *context, void *data) p_port->cc_timeout_count = 0; if (p_cc_mad->header.status) { - if (p_cc_mad->header.status & IB_MAD_STATUS_UNSUP_METHOD + if (p_cc_mad->header.status & IB_MAD_STATUS_UNSUP_CLASS_VER + || p_cc_mad->header.status & IB_MAD_STATUS_UNSUP_METHOD || p_cc_mad->header.status & IB_MAD_STATUS_UNSUP_METHOD_ATTR) p_port->cc_unavailable_flag = 1; cl_plock_release(&p_osm->lock);