From patchwork Tue Mar 20 21:18:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10297965 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0F4886039A for ; Tue, 20 Mar 2018 21:19:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F344A2969D for ; Tue, 20 Mar 2018 21:19:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E82022969F; Tue, 20 Mar 2018 21:19:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DD7F296A0 for ; Tue, 20 Mar 2018 21:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751319AbeCTVTR (ORCPT ); Tue, 20 Mar 2018 17:19:17 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:43003 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458AbeCTVTH (ORCPT ); Tue, 20 Mar 2018 17:19:07 -0400 Received: by mail-wr0-f195.google.com with SMTP id s18so3170357wrg.9 for ; Tue, 20 Mar 2018 14:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hyogIHsPaa8umk9WEQfbp0k3/m57HL3BsqWVX+cB58w=; b=Vl17DL0VsdHs5TQxry8zZzCD4m50bAuI40f/gosHHLLL/bDfkkBVHHFqEBnotYkRx6 HUxSsieIEzFwRbdf7ObLPsxBmM1xMSxL4aDGCtXiTe2ZyDuzSj8FngM28jsXyOTZ3XdN 75dg9R2oOYFZncxZBuH2/qXT5DjhmL750HrDH9kB9p15BDcR/1cV8Ax+blvzmBKdrOe0 vH9XWbwppYI21XTJ7QCMxDt3HHZBLWOBoaUHn3sgLIwkQa9jbhBJ5YaUmC2due03NKC+ fjpFSxIU0MUuBIXIE225/EFGCvayiFCEKOrdlNfeGSMb7s3o3O2RqSi9KZYvF3fqCY4s YefA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hyogIHsPaa8umk9WEQfbp0k3/m57HL3BsqWVX+cB58w=; b=lRVyvGG7uLWcpGtSkvZBZmhvHUoP+PKqiw3M+NoVp1eF3E1fxszwWCM8iQvbeYJcuB ZtVAI2rDksuuzFES9dVLw4EIYElccotQ9WUvOImB0fay/RqyFEcyXSmb34eC4W5GR+iu snNYPKD95vE1q6hQ6N3QIN5ZpD14pY5AsKopXMt1nc25omUERYSqqGUkpOElv2ZRmsVG v3B0tXGDk4Vgw0ZgSxCNCf2KXkwOJglroEVP2xIFPZaXO23DpjgCt9iEq6uzIV3VC3Hj sjwGPDQU95AhrfLyJYK34KiG0pp4OgrX2qZGUMsW3M/CGEZEllNmGLbhC0aggYcN1yn+ 9c/w== X-Gm-Message-State: AElRT7EagWCJry3URYloR730kUXbt35EjixBO3LI5kwjW1z38OCaiCfj RXCLCGdAQihf7r+9YxJVKCuXZ6q4R+Q= X-Google-Smtp-Source: AG47ELs3m/GiXYWr8cWEuiDlU1HgXemKKbZhINWYRhd8+oIoLgNbaKPSrHviI4A4pZR2IkvZ7KzBAA== X-Received: by 10.223.162.201 with SMTP id t9mr14033534wra.148.1521580745634; Tue, 20 Mar 2018 14:19:05 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id 21sm5381202wrt.82.2018.03.20.14.18.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 14:19:00 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1eyOen-0002fS-FM; Tue, 20 Mar 2018 15:18:57 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe , Steve Wise Subject: [PATCH rdma-core 11/20] cxgb4: Use kernel uapi headers Date: Tue, 20 Mar 2018 15:18:41 -0600 Message-Id: <20180320211850.10090-12-jgg@ziepe.ca> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180320211850.10090-1-jgg@ziepe.ca> References: <20180320211850.10090-1-jgg@ziepe.ca> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe cxgb just had one enum that trivially duplicates, but needed to have the structs renamed to avoid conflicts Signed-off-by: Jason Gunthorpe Acked-by: Steve Wise --- providers/cxgb4/cxgb4-abi.h | 15 ++++++--------- providers/cxgb4/dev.c | 2 +- providers/cxgb4/verbs.c | 8 ++++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/providers/cxgb4/cxgb4-abi.h b/providers/cxgb4/cxgb4-abi.h index b18d03d25907f9..f69894f73481e6 100644 --- a/providers/cxgb4/cxgb4-abi.h +++ b/providers/cxgb4/cxgb4-abi.h @@ -34,20 +34,21 @@ #include #include +#include -struct c4iw_alloc_ucontext_resp { +struct uc4iw_alloc_ucontext_resp { struct ib_uverbs_get_context_resp ibv_resp; __u64 status_page_key; __u32 status_page_size; __u32 reserved; }; -struct c4iw_alloc_pd_resp { +struct uc4iw_alloc_pd_resp { struct ib_uverbs_alloc_pd_resp ibv_resp; uint32_t pdid; }; -struct c4iw_create_cq_resp { +struct uc4iw_create_cq_resp { struct ib_uverbs_create_cq_resp ibv_resp; __u64 key; __u64 gts_key; @@ -58,11 +59,7 @@ struct c4iw_create_cq_resp { __u32 reserved; }; -enum { - C4IW_QPF_ONCHIP = (1<<0), -}; - -struct c4iw_create_qp_resp_v0 { +struct uc4iw_create_qp_resp_v0 { struct ib_uverbs_create_qp_resp ibv_resp; __u64 sq_key; __u64 rq_key; @@ -77,7 +74,7 @@ struct c4iw_create_qp_resp_v0 { __u32 qid_mask; }; -struct c4iw_create_qp_resp { +struct uc4iw_create_qp_resp { struct ib_uverbs_create_qp_resp ibv_resp; __u64 ma_sync_key; __u64 sq_key; diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c index b1eeb528949efc..b1870219f35f67 100644 --- a/providers/cxgb4/dev.c +++ b/providers/cxgb4/dev.c @@ -109,7 +109,7 @@ static struct verbs_context *c4iw_alloc_context(struct ibv_device *ibdev, { struct c4iw_context *context; struct ibv_get_context cmd; - struct c4iw_alloc_ucontext_resp resp; + struct uc4iw_alloc_ucontext_resp resp; struct c4iw_dev *rhp = to_c4iw_dev(ibdev); struct ibv_query_device qcmd; uint64_t raw_fw_ver; diff --git a/providers/cxgb4/verbs.c b/providers/cxgb4/verbs.c index 4e6cdbc2d114f6..b50a37b2771090 100644 --- a/providers/cxgb4/verbs.c +++ b/providers/cxgb4/verbs.c @@ -79,7 +79,7 @@ int c4iw_query_port(struct ibv_context *context, uint8_t port, struct ibv_pd *c4iw_alloc_pd(struct ibv_context *context) { struct ibv_alloc_pd cmd; - struct c4iw_alloc_pd_resp resp; + struct uc4iw_alloc_pd_resp resp; struct c4iw_pd *pd; pd = malloc(sizeof *pd); @@ -168,7 +168,7 @@ int c4iw_dereg_mr(struct ibv_mr *mr) struct ibv_cq *c4iw_create_cq(struct ibv_context *context, int cqe, struct ibv_comp_channel *channel, int comp_vector) { - struct c4iw_create_cq_resp resp; + struct uc4iw_create_cq_resp resp; struct c4iw_cq *chp; struct c4iw_dev *dev = to_c4iw_dev(context->device); int ret; @@ -303,7 +303,7 @@ static struct ibv_qp *create_qp_v0(struct ibv_pd *pd, struct ibv_qp_init_attr *attr) { struct ibv_create_qp cmd; - struct c4iw_create_qp_resp_v0 resp; + struct uc4iw_create_qp_resp_v0 resp; struct c4iw_qp *qhp; struct c4iw_dev *dev = to_c4iw_dev(pd->context->device); int ret; @@ -406,7 +406,7 @@ static struct ibv_qp *create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr) { struct ibv_create_qp cmd; - struct c4iw_create_qp_resp resp; + struct uc4iw_create_qp_resp resp; struct c4iw_qp *qhp; struct c4iw_dev *dev = to_c4iw_dev(pd->context->device); struct c4iw_context *ctx = to_c4iw_context(pd->context);