From patchwork Fri Apr 24 12:23:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Wang X-Patchwork-Id: 6270041 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D4A969F1C4 for ; Fri, 24 Apr 2015 12:32:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBAB72026F for ; Fri, 24 Apr 2015 12:32:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A4DB20268 for ; Fri, 24 Apr 2015 12:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757689AbbDXMcj (ORCPT ); Fri, 24 Apr 2015 08:32:39 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:35378 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753641AbbDXMYN (ORCPT ); Fri, 24 Apr 2015 08:24:13 -0400 Received: by widdi4 with SMTP id di4so19910940wid.0 for ; Fri, 24 Apr 2015 05:24:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eDeUV0CGTr9kxLcQqcSbZFPzkE/Tgkgq1Mv/Vf34FiY=; b=EGdPrTN6Pnzdcz1UbrNmj07DHKG168xL9DWU/YQ/DocQLc40dnCC0Y+kwEpJX8fF1v +sg+2g1nuH6A2wcQ6DB6Iw5IBxBKLxRNBCLT9Yx/wWnSZpQ5SiODwDOmidf9UG8uTvTg M+EWgmCOxVow6+d1qXVCErOyEOQ/8xBeNH2eSWGxOAEndHFw9RJoxfS0fJIme3tvvML+ m0AP0VD3rDVSOn6hxzlz75Fl/WLlXXNECllXbu0g76dwGRBp4n0UO0JjLev42EzA2fS4 Eicy9tRoCsztY1MRzU+SwpLk7wauNwZXM0HThrRvoJhc4Z9KH8X48VxeN2UAZw5ZTPRp y7xw== X-Gm-Message-State: ALoCoQl410QmQrGvk3qNlaT/zoJl9CfM1jBbZKDCrM5k/tZv5ixCfDapag6H0xbX/JoXOOCPh/9n X-Received: by 10.180.104.4 with SMTP id ga4mr3471386wib.86.1429878251729; Fri, 24 Apr 2015 05:24:11 -0700 (PDT) Received: from ubuntu.pb.local ([62.217.45.26]) by mx.google.com with ESMTPSA id m4sm16704020wjb.25.2015.04.24.05.24.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Apr 2015 05:24:10 -0700 (PDT) From: Michael Wang To: Roland Dreier , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michael Wang , Steve Wise , Tom Talpey , Jason Gunthorpe , Doug Ledford , Ira Weiny , Tom Tucker , Hoang-Nam Nguyen , Christoph Raisch , Mike Marciniszyn , Eli Cohen , Faisal Latif , Jack Morgenstein , Or Gerlitz , Haggai Eran Subject: [PATCH v6 09/26] IB/Verbs: Reform IB-core verbs Date: Fri, 24 Apr 2015 14:23:33 +0200 Message-Id: <1429878230-11749-10-git-send-email-yun.wang@profitbricks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1429878230-11749-1-git-send-email-yun.wang@profitbricks.com> References: <1429878230-11749-1-git-send-email-yun.wang@profitbricks.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_BLACK 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 Use raw management helpers to reform IB-core verbs Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/verbs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 626c9cf..7264860 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -200,11 +200,9 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc, u32 flow_class; u16 gid_index; int ret; - int is_eth = (rdma_port_get_link_layer(device, port_num) == - IB_LINK_LAYER_ETHERNET); memset(ah_attr, 0, sizeof *ah_attr); - if (is_eth) { + if (rdma_tech_iboe(device, port_num)) { if (!(wc->wc_flags & IB_WC_GRH)) return -EPROTOTYPE; @@ -873,7 +871,7 @@ int ib_resolve_eth_l2_attrs(struct ib_qp *qp, union ib_gid sgid; if ((*qp_attr_mask & IB_QP_AV) && - (rdma_port_get_link_layer(qp->device, qp_attr->ah_attr.port_num) == IB_LINK_LAYER_ETHERNET)) { + (rdma_tech_iboe(qp->device, qp_attr->ah_attr.port_num))) { ret = ib_query_gid(qp->device, qp_attr->ah_attr.port_num, qp_attr->ah_attr.grh.sgid_index, &sgid); if (ret)