From patchwork Thu Jan 11 22:13:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10158755 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 8B390601A1 for ; Thu, 11 Jan 2018 22:13:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C6E92850D for ; Thu, 11 Jan 2018 22:13:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71436285C6; Thu, 11 Jan 2018 22:13:59 +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 1AE132850D for ; Thu, 11 Jan 2018 22:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933287AbeAKWN4 (ORCPT ); Thu, 11 Jan 2018 17:13:56 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:43690 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933341AbeAKWNy (ORCPT ); Thu, 11 Jan 2018 17:13:54 -0500 Received: by mail-wr0-f194.google.com with SMTP id s13so3630002wra.10 for ; Thu, 11 Jan 2018 14:13:54 -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=vaOKUXQ89xnPk2XfolV3fHIousnmXkdSwPQz9zbC7Os=; b=CVwDCpVy6hWXIAgz0W+WYKRVU7MtIl6ePPplew1vrUSwqFj2kquh2HevUfoCpYhrzo oyL3N6nmS9pvXXHicWnCdJtG0mr6d8weboQCU6Cw7iM7Tua4NWArDPdVayShifK6RRRe oyrJf6VSiTrtfoTWD7tkpIE/FYC6p/kPtJGaW4THKJlS1lL1GOrhtV6cItfrteDUNdJA q45RAPkEPvN8/3owOuRxY5DLoV7R+dGqM+UTghmXHYr55fPDIbMSm9w8vhojmf5M8H5L I9RUeb1lNYvk7hyYr6p5adJ3qRMWdfmOEFAi4ilp6zUmB+kGCqmFGQAy9vknD0WEAj+x rw/A== 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=vaOKUXQ89xnPk2XfolV3fHIousnmXkdSwPQz9zbC7Os=; b=At+Pphkaylf+tViS6vTPNXVbT5824IAfKqikbq491W4zqXDQa+3wULi6t6MDHlBm33 1v7CSQ6rExh2B/c5FZ6zjr1dbfWr2t7Mf0WQInbcTdAGvWSuaXl6Jjcs4DWFFuzPCjrT sLS+NwStEL2jfwVtu+APCFCB8CfggDKLmNClUgMOztxx148y6cIcli3sXEUbHEEw0Now JrGh6AXsHREH3Gn3AgNk7Yysqn6fYYjO4qumPF0diFKfnxChHGNDwakgpg7b2q1K947Q TMAwLT2qZRy9LH1QBrJ1haHSDeZ0/QUYiawXF6HjWEQsr+X/+Osp//u0Egghf5JL/6U1 Hf/w== X-Gm-Message-State: AKwxytfnO0cl+wFCoOKtRuAwUIeyCOJURkJbeiY0ymGdqgV3i21QBbVo iMI+i6ps3AynjXkfeACL1dI0575HH0M= X-Google-Smtp-Source: ACJfBotGoidovmL9mjt/H0G5YGTDtPOCGTyCWwE7efcOi5VYP23G2EynDfdkqSYyCf12L62mdhynug== X-Received: by 10.223.176.233 with SMTP id j38mr9050746wra.252.1515708833227; Thu, 11 Jan 2018 14:13:53 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id 51sm4259551wrw.15.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 1eZl6Y-0000JT-SE; Thu, 11 Jan 2018 15:13:46 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 08/17] verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp Date: Thu, 11 Jan 2018 15:13:31 -0700 Message-Id: <20180111221340.965-9-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 For some reason the struct member names do not match the kernel version, fix it. Signed-off-by: Jason Gunthorpe --- libibverbs/cmd.c | 4 ++-- libibverbs/kern-abi.h | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c index a675bfb7d02fd3..ad0e0dc3736756 100644 --- a/libibverbs/cmd.c +++ b/libibverbs/cmd.c @@ -257,8 +257,8 @@ int ibv_cmd_query_device_ex(struct ibv_context *context, if (resp->response_length >= offsetof(struct ibv_query_device_resp_ex, cq_mod_caps) + sizeof(resp->cq_mod_caps)) { - attr->cq_mod_caps.max_cq_count = resp->cq_mod_caps.cq_count; - attr->cq_mod_caps.max_cq_period = resp->cq_mod_caps.cq_period; + attr->cq_mod_caps.max_cq_count = resp->cq_mod_caps.max_cq_moderation_count; + attr->cq_mod_caps.max_cq_period = resp->cq_mod_caps.max_cq_moderation_period; } } diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h index 3468e5497c3531..6a697987799c68 100644 --- a/libibverbs/kern-abi.h +++ b/libibverbs/kern-abi.h @@ -110,12 +110,6 @@ struct ibv_query_device_ex { __u32 reserved; }; -struct ibv_cq_moderation_caps_resp { - __u16 cq_count; - __u16 cq_period; - __u32 reserved; -}; - struct ibv_query_device_resp_ex { struct ib_uverbs_query_device_resp base; __u32 comp_mask; @@ -128,7 +122,7 @@ struct ibv_query_device_resp_ex { __u32 max_wq_type_rq; __u32 raw_packet_caps; struct ib_uverbs_tm_caps tm_caps; - struct ibv_cq_moderation_caps_resp cq_mod_caps; + struct ib_uverbs_cq_moderation_caps cq_mod_caps; }; struct ibv_query_port {