From patchwork Thu Jan 11 22:13: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: 10158753 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 1C17C601A1 for ; Thu, 11 Jan 2018 22:13:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E5B528565 for ; Thu, 11 Jan 2018 22:13:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02FA5286C5; 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 8C4B928565 for ; Thu, 11 Jan 2018 22:13:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933354AbeAKWNz (ORCPT ); Thu, 11 Jan 2018 17:13:55 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:44027 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933287AbeAKWNx (ORCPT ); Thu, 11 Jan 2018 17:13:53 -0500 Received: by mail-wm0-f66.google.com with SMTP id g1so8421542wmg.2 for ; Thu, 11 Jan 2018 14:13:53 -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=iCSeHFhTIK2YXxshxv2sqwAru6wbHll4R88TeSbrdRE=; b=UNtDr1xgn0o+eu8waDedCI9WdqBDSyoN2q2SU6L96x4JtlWO6/mpXVexzo3v1eYnR2 ka726hYegre833UU4gQ8zHAIX8c9DfwGz/tkZ5O5l2KmbxPD/HV+yhC7I52IyIc+doh1 gkzak6dDag3Hl8o1i1jjjT1HqhJZhu01i6YfEEwSGh54VX0k5EBpaonrRZo6ub6PXJrd hAkIUl97NUtjD4oTEb+no15F0EsnXdshDDXBabrcswwi/XD+dgNdGd4KmKyKorbuvDxP k8Pmm7MM3/Nev52m+7W0lqs76R5BmKQI9YSFZlbVJl/vDIdOgTQ4cC9nXu94Pni3qMjc +Ryg== 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=iCSeHFhTIK2YXxshxv2sqwAru6wbHll4R88TeSbrdRE=; b=uX85uQIPdPcGcw3QtqkKiFC1ZB8SWgIyUbk3mCOw6aMux7nDmNeonOI37c1yFN7gDi BNtAq2TeRVG79FIdA+b2vikJh4HWmyF3KxNHLsPwizN+9TKWBkzIrjRMzNLfkJ580Yvy mmMgtuHcrHeE9L//EP3IBs+O2xFGr97eHyerNoq6Ddi78ygMZkhx/YSZQmbM5yKfu9Dp Bkpt3ZaSFclZUh7Pbdv9RVudN5q/yjCLkMa/6KU4p/rpLs7nvaRBih8uNWqwnDdeWRjz nAqlHS2LSl93rbQWOtspJu4dNUatSFAzo0SwALI+vO4N43H+eWiYMeK3FEQnb8ChwxXQ +Tww== X-Gm-Message-State: AKwxyteuHNs+l3fnLhrlZeMEmJbsnOi8mh6cRlToceTRy8oDM7pfhndG LelpGNO8tGdmIaTG3Qy2atBqAdRONgE= X-Google-Smtp-Source: ACJfBotHETVkIIQt3jrftSlaNfKxdKV5hxj9mDshWS4T+N5TxzvPrC8kCoehVamP0EyOsxMFUEsXUg== X-Received: by 10.28.177.197 with SMTP id a188mr2620720wmf.88.1515708832308; Thu, 11 Jan 2018 14:13:52 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id o98sm13503679wrb.19.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-0000KX-8r; Thu, 11 Jan 2018 15:13:47 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 16/17] verb: Use kernel uapi header in struct ex_hdr Date: Thu, 11 Jan 2018 15:13:39 -0700 Message-Id: <20180111221340.965-17-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 All the components are defined by the uapi header. Revise the macro to use the new names. Signed-off-by: Jason Gunthorpe --- libibverbs/ibverbs.h | 14 +++++++------- libibverbs/kern-abi.h | 15 ++------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/libibverbs/ibverbs.h b/libibverbs/ibverbs.h index 7755393fe4f3ce..ceb6c5bfd4e3f9 100644 --- a/libibverbs/ibverbs.h +++ b/libibverbs/ibverbs.h @@ -88,15 +88,15 @@ static inline uint32_t _cmd_ex(uint32_t cmd) outsize) \ do { \ size_t c_size = cmd_size - sizeof(struct ex_hdr); \ - (cmd)->hdr.command = \ + (cmd)->hdr.hdr.command = \ _cmd_ex(IB_USER_VERBS_EX_CMD_##opcode); \ - (cmd)->hdr.in_words = ((c_size) / 8); \ - (cmd)->hdr.out_words = ((resp_size) / 8); \ - (cmd)->hdr.provider_in_words = (((size) - (cmd_size))/8);\ - (cmd)->hdr.provider_out_words = \ + (cmd)->hdr.hdr.in_words = ((c_size) / 8); \ + (cmd)->hdr.hdr.out_words = ((resp_size) / 8); \ + (cmd)->hdr.ex_hdr.provider_in_words = (((size) - (cmd_size))/8);\ + (cmd)->hdr.ex_hdr.provider_out_words = \ (((outsize) - (resp_size)) / 8); \ - (cmd)->hdr.response = (uintptr_t) (out); \ - (cmd)->hdr.reserved = 0; \ + (cmd)->hdr.ex_hdr.response = (uintptr_t) (out); \ + (cmd)->hdr.ex_hdr.cmd_hdr_reserved = 0; \ } while (0) #define IBV_INIT_CMD_RESP_EX_VCMD(cmd, cmd_size, size, opcode, out, outsize) \ diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h index 8400ce1c47e92d..ca7ba14dfdb580 100644 --- a/libibverbs/kern-abi.h +++ b/libibverbs/kern-abi.h @@ -65,19 +65,8 @@ */ struct ex_hdr { - struct { - __u32 command; - __u16 in_words; - __u16 out_words; - }; - struct { - __u64 response; - }; - struct { - __u16 provider_in_words; - __u16 provider_out_words; - __u32 reserved; - }; + struct ib_uverbs_cmd_hdr hdr; + struct ib_uverbs_ex_cmd_hdr ex_hdr; }; /*