From patchwork Wed Aug 10 06:27:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dotan Barak X-Patchwork-Id: 1051802 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7A6YplZ022900 for ; Wed, 10 Aug 2011 06:34:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751075Ab1HJGeu (ORCPT ); Wed, 10 Aug 2011 02:34:50 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:45134 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839Ab1HJGeu (ORCPT ); Wed, 10 Aug 2011 02:34:50 -0400 Received: by wyg24 with SMTP id 24so480186wyg.19 for ; Tue, 09 Aug 2011 23:34:48 -0700 (PDT) Received: by 10.227.11.134 with SMTP id t6mr6535084wbt.21.1312957671495; Tue, 09 Aug 2011 23:27:51 -0700 (PDT) Received: from vnc11.lab.mtl.com ([82.166.227.17]) by mx.google.com with ESMTPS id et16sm491434wbb.19.2011.08.09.23.27.49 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 23:27:50 -0700 (PDT) From: Dotan Barak To: roland@kernel.org Subject: [PATCH] IB/core - delete redundant check for DR SMP Date: Wed, 10 Aug 2011 09:27:45 +0300 User-Agent: KMail/1.9.4 Cc: linux-rdma@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201108100927.45568.dotanb@sw.voltaire.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 (demeter2.kernel.org [140.211.167.43]); Wed, 10 Aug 2011 06:34:51 +0000 (UTC) The function handle_outgoing_dr_smp() is only called if the MAD to be sent is a directed route SMP. Thus, the check for IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE is redundant. Signed-off-by: Ralph Campbell Signed-off-by: Dotan Barak Acked-by: Sean Hefty Acked-by: Hal Rosenstock --- drivers/infiniband/core/mad.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: ofed_kernel/drivers/infiniband/core/mad.c =================================================================== --- ofed_kernel.orig/drivers/infiniband/core/mad.c +++ ofed_kernel/drivers/infiniband/core/mad.c @@ -679,8 +679,7 @@ static int handle_outgoing_dr_smp(struct struct ib_wc mad_wc; struct ib_send_wr *send_wr = &mad_send_wr->send_wr; - if (device->node_type == RDMA_NODE_IB_SWITCH && - smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) + if (device->node_type == RDMA_NODE_IB_SWITCH) port_num = send_wr->wr.ud.port_num; else port_num = mad_agent_priv->agent.port_num;