From patchwork Tue Mar 20 21:18:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10297943 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 D528460349 for ; Tue, 20 Mar 2018 21:19:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C69072969D for ; Tue, 20 Mar 2018 21:19:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB7A4296A0; Tue, 20 Mar 2018 21:19:09 +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 D830A2969D for ; Tue, 20 Mar 2018 21:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbeCTVTF (ORCPT ); Tue, 20 Mar 2018 17:19:05 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:40644 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbeCTVTC (ORCPT ); Tue, 20 Mar 2018 17:19:02 -0400 Received: by mail-wm0-f67.google.com with SMTP id t6so6214864wmt.5 for ; Tue, 20 Mar 2018 14:19:01 -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=H9lRMSQsz7fDFsoG8pqNVSyaNTb+7KIp/ajmlKX8Qmc=; b=lbZrgOxBugntd23KjCXERa420Ewux/GBwt5e8Cctic1n/ueEG16lhJ7ePYlo2BBLBF Zi1u/FqZCWSc6SIvBjeDnaCNUnEiXNofKup3WuzEegkLfrDk7rbyp9H44CTec+Kq1wpJ SdY9SQT4NRTun3i6GJr693oglfV55MhFa68Sw7YqRHTH6cXUTAjOVhW4IKhzMwBDNaRG zCj9CGZZ8HREc5x4iv0SJ538LuLu27JHQ7fRxW6rEh8fC3ERvU9aPuoj1FQOMyU30L2O z11ECJUSJY67PaKWrIBM1XLfCpWtsOcmZDtlThzhP1LmmvJOquFkYBJrVLxkH/NbUjcc mwMw== 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=H9lRMSQsz7fDFsoG8pqNVSyaNTb+7KIp/ajmlKX8Qmc=; b=eISzEqN3Zdw8Suj+wKeCJ3hVBH0lufvQeJ8sgc6KPIrfCEmDg24ICiUYu1VnAiJ9Sl wU7WMU74ekSGGqGNCNlFBjeJDLvKTLwqCi1VRgOe6mo+hMccJrrCK19v1XvPdE3ViAZc goCaLyB/X3wyFze0CBP9US4oOJkNUFnfkUj2VFC+vqt29dxVywIqOnCEVWGebeyRfw37 vvL8LHIy+logLSXE0E06rBZI3SciMOiKrAa0S7/URgDVjLlmyVsCH3B4icGb6PHwKaNh cF/WbdVbEUY8TLZ3cJeIbj1K2hsv/gnWG0oS7yQjwkHkiiBGCwroyo+IZ/GodgsWcUnq 4F/A== X-Gm-Message-State: AElRT7HdD9X3V+Ilqn2oyBEts41BmbF6gCJDUqg3lLlgdFEJHsxyvqU5 nCjKjBGojciInnt4vl2Ng82zRYTfShY= X-Google-Smtp-Source: AG47ELuhs3RUSjTrm3v20OXXXTMuFALSHr9BuTHN82GjrH+py7jn9qlnXb5y5B9ntvKgDReGoQ05rw== X-Received: by 10.28.129.86 with SMTP id c83mr807642wmd.37.1521580741003; Tue, 20 Mar 2018 14:19:01 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id s15sm916314wrg.28.2018.03.20.14.18.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 14:18:59 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1eyOen-0002fC-Be; Tue, 20 Mar 2018 15:18:57 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe , Tatyana Nikolova Subject: [PATCH rdma-core 09/20] nes: Use kernel uapi headers Date: Tue, 20 Mar 2018 15:18:39 -0600 Message-Id: <20180320211850.10090-10-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 Remove duplicated loose definitions and one un-used struct Signed-off-by: Jason Gunthorpe --- providers/nes/nes-abi.h | 17 +---------------- providers/nes/nes_uverbs.c | 6 +++--- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/providers/nes/nes-abi.h b/providers/nes/nes-abi.h index 3c3362a2ec5faf..54e8708cbf6471 100644 --- a/providers/nes/nes-abi.h +++ b/providers/nes/nes-abi.h @@ -35,9 +35,7 @@ #define nes_ABI_H #include - -#define NES_ABI_USERSPACE_VER 2 -#define NES_ABI_KERNEL_VER 2 +#include struct nes_get_context { struct ibv_get_context cmd; @@ -78,12 +76,6 @@ struct nes_ucreate_cq_resp { __u32 reserved; }; -enum nes_umemreg_type { - NES_UMEMREG_TYPE_MEM = 0x0000, - NES_UMEMREG_TYPE_QP = 0x0001, - NES_UMEMREG_TYPE_CQ = 0x0002, -}; - struct nes_ureg_mr { struct ibv_reg_mr ibv_cmd; __u32 reg_type; /* indicates if id is memory, QP or CQ */ @@ -106,11 +98,4 @@ struct nes_ucreate_qp_resp { __u32 nes_drv_opt; }; -struct nes_cqe { - __u32 header; - __u32 len; - __u32 wrid_hi_stag; - __u32 wrid_low_msn; -}; - #endif /* nes_ABI_H */ diff --git a/providers/nes/nes_uverbs.c b/providers/nes/nes_uverbs.c index a3bd65f6c743f6..be3b057c5bf7b4 100644 --- a/providers/nes/nes_uverbs.c +++ b/providers/nes/nes_uverbs.c @@ -176,7 +176,7 @@ struct ibv_mr *nes_ureg_mr(struct ibv_pd *pd, void *addr, if (!mr) return NULL; - cmd.reg_type = NES_UMEMREG_TYPE_MEM; + cmd.reg_type = IWNES_MEMREG_TYPE_MEM; if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, access, mr, &cmd.ibv_cmd, sizeof cmd, &resp, sizeof resp)) { @@ -239,7 +239,7 @@ struct ibv_cq *nes_ucreate_cq(struct ibv_context *context, int cqe, goto err; /* Register the memory for the CQ */ - reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ; + reg_mr_cmd.reg_type = IWNES_MEMREG_TYPE_CQ; ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes, (nesucq->size*sizeof(struct nes_hw_cqe)), @@ -951,7 +951,7 @@ static int nes_vmapped_qp(struct nes_uqp *nesuqp, struct ibv_pd *pd, struct ibv_ nesuqp->rq_vbase = (struct nes_hw_qp_wqe *) (((char *) nesuqp->sq_vbase) + (nesuqp->sq_size * sizeof(struct nes_hw_qp_wqe))); - reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_QP; + reg_mr_cmd.reg_type = IWNES_MEMREG_TYPE_QP; //fprintf(stderr, PFX "qp_rq_vbase = %p qp_sq_vbase=%p reg_mr = %p\n", // nesuqp->rq_vbase, nesuqp->sq_vbase, &nesuqp->mr);