From patchwork Wed Feb 2 15:38:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heinz X-Patchwork-Id: 527071 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p12K0VIu000416 for ; Wed, 2 Feb 2011 20:03:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754422Ab1BBPig (ORCPT ); Wed, 2 Feb 2011 10:38:36 -0500 Received: from va3ehsobe005.messaging.microsoft.com ([216.32.180.31]:21857 "EHLO VA3EHSOBE005.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754434Ab1BBPi2 convert rfc822-to-8bit (ORCPT ); Wed, 2 Feb 2011 10:38:28 -0500 Received: from mail59-va3-R.bigfish.com (10.7.14.242) by VA3EHSOBE005.bigfish.com (10.7.40.25) with Microsoft SMTP Server id 14.1.225.8; Wed, 2 Feb 2011 15:38:27 +0000 Received: from mail59-va3 (localhost.localdomain [127.0.0.1]) by mail59-va3-R.bigfish.com (Postfix) with ESMTP id E25C811F0612; Wed, 2 Feb 2011 15:38:26 +0000 (UTC) X-SpamScore: -16 X-BigFish: VPS-16(zz936eK542N9371Pzz1202hzz8275bh8275dhz2ei2a8h668h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:avexcashub1.qlogic.com; RD:none; EFVD:NLI Received: from mail59-va3 (localhost.localdomain [127.0.0.1]) by mail59-va3 (MessageSwitch) id 1296661106519053_4108; Wed, 2 Feb 2011 15:38:26 +0000 (UTC) Received: from VA3EHSMHS036.bigfish.com (unknown [10.7.14.237]) by mail59-va3.bigfish.com (Postfix) with ESMTP id 6997146004F; Wed, 2 Feb 2011 15:38:26 +0000 (UTC) Received: from avexcashub1.qlogic.com (198.70.193.64) by VA3EHSMHS036.bigfish.com (10.7.99.46) with Microsoft SMTP Server (TLS) id 14.1.225.8; Wed, 2 Feb 2011 15:38:22 +0000 Received: from MNEXCASHUB1.qlogic.org (10.33.2.103) by avexcashub2.qlogic.org (10.1.4.162) with Microsoft SMTP Server (TLS) id 8.1.436.0; Wed, 2 Feb 2011 07:38:20 -0800 Received: from MNEXMB1.qlogic.org ([fe80::8516:7839:9549:6996]) by MNEXCASHUB1.qlogic.org ([::1]) with mapi; Wed, 2 Feb 2011 09:38:19 -0600 From: Mike Heinz To: Moni Shoua , Vlad CC: "nirm@voltaire.com" , ewg , "linux-rdma@vger.kernel.org" Date: Wed, 2 Feb 2011 09:38:18 -0600 Subject: RE: [ewg] [PATCH] IB/core: Control number of retries for SA to leave an MCG Thread-Topic: [ewg] [PATCH] IB/core: Control number of retries for SA to leave an MCG Thread-Index: AcvC60SXjvkuyAg/QwWiFRYwnrFyhQAA8pnQ Message-ID: <4C2744E8AD2982428C5BFE523DF8CDCB4A20A5E98F@MNEXMB1.qlogic.org> References: <4D4973B2.9070300@Voltaire.COM> In-Reply-To: <4D4973B2.9070300@Voltaire.COM> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-OriginatorOrg: qlogic.com Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 02 Feb 2011 20:03:43 +0000 (UTC) Index: ofa_kernel-1.5.3/kernel_patches/fixes/core_0290_sysfs_mcast_leave_retries.patch =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ ofa_kernel-1.5.3/kernel_patches/fixes/core_0290_sysfs_mcast_leave_retries.patch 2011-02-02 16:52:02.000000000 +0200 @@ -0,0 +1,46 @@ +Add a multicast leave maximum retry setting in sys/module/ib_sa/parameters/mcast_leave_retries. +Add a debug print when the maximum retry count is reached. + +Signed-off-by: Nir Muchtar +Reviewed-by: Moni Shoua +-- + +Index: ofa_kernel-1.5.2/drivers/infiniband/core/multicast.c +=================================================================== +--- ofa_kernel-1.5.2.orig/drivers/infiniband/core/multicast.c 2010-08-17 12:56:06.000000000 +0300 ++++ ofa_kernel-1.5.2/drivers/infiniband/core/multicast.c 2010-08-17 13:15:38.000000000 +0300 +@@ -40,6 +40,12 @@ + #include + #include "sa.h" + ++static int mcast_leave_retries = 3; ++ ++module_param_call(mcast_leave_retries, param_set_int, param_get_int, ++ &mcast_leave_retries, 0644); ++MODULE_PARM_DESC(mcast_leave_retries, "Number of retries for multicast leave requests before giving up"); ++ + static void mcast_add_one(struct ib_device *device); + static void mcast_remove_one(struct ib_device *device); + +@@ -520,8 +526,11 @@ + if (status && (group->retries > 0) && + !send_leave(group, group->leave_state)) + group->retries--; +- else ++ else { ++ if (status && group->retries <= 0) ++ printk("reached max retry count. status=%d .Giving up\n", status); + mcast_work_handler(&group->work); ++ } + } + + static struct mcast_group *acquire_group(struct mcast_port *port, +@@ -544,7 +553,7 @@ + if (!group) + return NULL; + +- group->retries = 3; ++ group->retries = mcast_leave_retries; + group->port = port; + group->rec.mgid = *mgid; + group->pkey_index = MCAST_INVALID_PKEY_INDEX;