From patchwork Thu Jan 11 22:13:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10158751 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 32E3A601A1 for ; Thu, 11 Jan 2018 22:13:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 227D42850D for ; Thu, 11 Jan 2018 22:13:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 167A2285FD; Thu, 11 Jan 2018 22:13:57 +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 AC6DB2850D for ; Thu, 11 Jan 2018 22:13:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933348AbeAKWNy (ORCPT ); Thu, 11 Jan 2018 17:13:54 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40251 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933167AbeAKWNx (ORCPT ); Thu, 11 Jan 2018 17:13:53 -0500 Received: by mail-wm0-f68.google.com with SMTP id f206so8200262wmf.5 for ; Thu, 11 Jan 2018 14:13:52 -0800 (PST) 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=PEuMsQHI+fBM2lxPdX9zsLsUoAUPvBtWle1U3XO/yJ0=; b=YBU7EHkLuM6EABDlZKTM5qJnJn2q/nALrmWBabJVLe9HZ+iflHQaoFaG+FScXdWZrM 6uMUxzDL3f2y1PkLN/YRwxFdkyhEantI7fe3H5AaROlHjNTWdfyC5AoU4n3mn8punS7P X2wuB9YEWkZ2bc9nMT2Fxrx612OW6mK3BaNmo/VbVisxqL17ZkbNfJDRLgoXqyhj5NU0 r6XpywNwXUqGR0b5oMtfTZXfdeFlynbENKjJ0FXiq8LReS5PnmKaxA7AEJZjBQRMUs06 hA1CKBzCyy+UgmyNMlZko2ftopPLhIc46xpp4mPslHZh7TxMbQMjhb2DLr/a1BOXU8K6 qjLQ== 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=PEuMsQHI+fBM2lxPdX9zsLsUoAUPvBtWle1U3XO/yJ0=; b=Zbfn36Y+1JN4FGYG0+09bZ0QUHCKV0n4NsX1r80bKhcp6T0NuGZH4Nc7wHlL3Y2Xfg JiOhG+ajGLRgo5LsgvGunyY+vq497EEwrrx4iHis3zybJhzAzZb4oW79F8LArRtOXKup x373uK9Av+FaERizcq/6GxKEXpRmZXajlvBIzKjksXCnv0xZvLRBmU1UfdpdYqPwM0JK 7xDcxDB9vr+wpI1oyBaeT3qwPP0yuXg3qoLiiZLQYk4v2ZxfaTrD54LFNe8pGOjwRn3f EAoiY9VBYZ7EgH+MGZxVxhf7D1bO55y3X5+BNkNhHwkWCktGSGyySmM2t8JLbAiTd62O ZIaw== X-Gm-Message-State: AKwxytfv5YPPr0vcuYT+uyNnQVdDS+nwmyXCJjdIo+YSnFKYy05JeE4H oJQEAmVK9i6W4eOIKHy05DzMIUkjyzk= X-Google-Smtp-Source: ACJfBoufjHz1EXXvrNt+TGL9EuuEw8rqg3PRqk0dUXEXvGTK+z3vsCVptE1S5vkji7uyrpfFWk8qag== X-Received: by 10.28.145.197 with SMTP id t188mr2365340wmd.132.1515708831735; Thu, 11 Jan 2018 14:13:51 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id j6sm2216998wmg.41.2018.01.11.14.13.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 14:13:50 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1eZl6Z-0000KO-7l; Thu, 11 Jan 2018 15:13:47 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 15/17] verbs: Use kernel uapi header for ibv_modify_qp_common Date: Thu, 11 Jan 2018 15:13:38 -0700 Message-Id: <20180111221340.965-16-jgg@ziepe.ca> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180111221340.965-1-jgg@ziepe.ca> References: <20180111221340.965-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 The kernel header has a redundant driver_data. Signed-off-by: Jason Gunthorpe --- libibverbs/cmd.c | 2 +- libibverbs/kern-abi.h | 33 ++------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c index f73af7b7a92d80..0e1589e1c8963e 100644 --- a/libibverbs/cmd.c +++ b/libibverbs/cmd.c @@ -1273,7 +1273,7 @@ int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, static void copy_modify_qp_fields(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask, - struct ibv_modify_qp_common *cmd) + struct ib_uverbs_modify_qp *cmd) { cmd->qp_handle = qp->handle; cmd->attr_mask = attr_mask; diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h index 57ef1dd6ff6beb..8400ce1c47e92d 100644 --- a/libibverbs/kern-abi.h +++ b/libibverbs/kern-abi.h @@ -337,46 +337,17 @@ struct ibv_query_qp { __u64 driver_data[0]; }; -struct ibv_modify_qp_common { - struct ib_uverbs_qp_dest dest; - struct ib_uverbs_qp_dest alt_dest; - __u32 qp_handle; - __u32 attr_mask; - __u32 qkey; - __u32 rq_psn; - __u32 sq_psn; - __u32 dest_qp_num; - __u32 qp_access_flags; - __u16 pkey_index; - __u16 alt_pkey_index; - __u8 qp_state; - __u8 cur_qp_state; - __u8 path_mtu; - __u8 path_mig_state; - __u8 en_sqd_async_notify; - __u8 max_rd_atomic; - __u8 max_dest_rd_atomic; - __u8 min_rnr_timer; - __u8 port_num; - __u8 timeout; - __u8 retry_cnt; - __u8 rnr_retry; - __u8 alt_port_num; - __u8 alt_timeout; - __u8 reserved[2]; -}; - struct ibv_modify_qp { __u32 command; __u16 in_words; __u16 out_words; - struct ibv_modify_qp_common base; + struct ib_uverbs_modify_qp base; __u64 driver_data[0]; }; struct ibv_modify_qp_ex { struct ex_hdr hdr; - struct ibv_modify_qp_common base; + struct ib_uverbs_modify_qp base; __u32 rate_limit; __u32 reserved; };