From patchwork Tue Mar 20 21:18:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10297947 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 C912A600F6 for ; Tue, 20 Mar 2018 21:19:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9AA72969A for ; Tue, 20 Mar 2018 21:19:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE64B2969F; Tue, 20 Mar 2018 21:19:11 +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 4EE232969A for ; Tue, 20 Mar 2018 21:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751468AbeCTVTK (ORCPT ); Tue, 20 Mar 2018 17:19:10 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35186 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbeCTVTF (ORCPT ); Tue, 20 Mar 2018 17:19:05 -0400 Received: by mail-wm0-f68.google.com with SMTP id r82so6245151wme.0 for ; Tue, 20 Mar 2018 14:19:04 -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=ZKxJ+l91uzilQyfQtlmtS/dKvvoXCg4Vkm5eAtxIu5I=; b=DP1LLTCHB3XTSpa1B12lpBIv4e4gje8sRYQiKWHqsGpTuww++SzL/TOip3eHY3LU70 B2h5h0UYLHJNdebnIsHwLnSIHosDb92r1yLHsgP40DCc2HpPcmSQGovvsXv4V8njLtZk nEPkvqQdE0dCo5WlCYhvaCUT4wcVO8xvP2c3lBS0EcN6Fcfw6rEwFcgWIft2yFeHXFdd jWjBa2Qd9G7Wvkky89rouwcQKdt24t4vSNFztHJPalD23qA0dW2TKvrKJtlZNr5Pnhs1 Q2zES3EyMTMXjF7HsfSCIEC8dt9Zezou+sepC4z1nUmugUKLurIH7QyDHm0YCnJ1HD/z E3vw== 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=ZKxJ+l91uzilQyfQtlmtS/dKvvoXCg4Vkm5eAtxIu5I=; b=qzzI1hURe1MD7aF/er4LHq+RpEhnvmsjf7C4dj1AVpqbxAhWgwelfMEwK+WEW0dwBY 0LhEPmZuYNWZ80P5zXkY0pR4n8AQmbRD6/Dc3FeAyQyKBeGI5DQQgsdmkC6iaEgjNIJL pKWtViM6kk06Ahl2dx2fKiqALIklj8Iben9CB6yqKr8A87QEDrYGwdta4uReDAdPbt47 eqQV61tmHoSl4m6TMLn4lukuCImXHIagNQNyQY15lHkdL73ougXuxBtLk3d3lVxhbbrb aN3qpcnjYqnETKrWxQnwxZ8vsrRyear0uvFAZyyELyWce5llqBhy++uv7AJV0UZEONTD Y+kQ== X-Gm-Message-State: AElRT7H0VyAsjVbHLbWrl7V1CIzkJxwdWLFk2XWOu/KBtRXV3LJURJmk pWFGC5Lb5imdi+S3XNKoQW8+aAGuHv4= X-Google-Smtp-Source: AG47ELssOnt+0xW1UQeOcKGkOE9eIzZ6nalb7lzL3axwgQqjDClH2iTeRdM6an9lv1l2rl7Hm0d36Q== X-Received: by 10.28.45.209 with SMTP id t200mr849472wmt.90.1521580743645; Tue, 20 Mar 2018 14:19:03 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id k18sm3217035wmd.4.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-0002ek-62; Tue, 20 Mar 2018 15:18:57 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe , Yishai Hadas Subject: [PATCH rdma-core 06/20] mlx5: Use kernel uapi header structs Date: Tue, 20 Mar 2018 15:18:36 -0600 Message-Id: <20180320211850.10090-7-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 Use the loose structs from the kernel headers, using the script: $ sed -i \ -e 's/struct[ \t]mlx5_drv_create_wq\([ \t,]\)/struct mlx5_ib_create_wq\1/g' \ -e 's/struct[ \t]mlx5_rss_caps\([ \t,]\)/struct mlx5_ib_rss_caps\1/g' \ -e 's/struct[ \t]mlx5_create_qp_drv_ex\([ \t,]\)/struct mlx5_ib_create_qp\1/g' \ `git ls-files` Signed-off-by: Jason Gunthorpe --- providers/mlx5/mlx5-abi.h | 42 +++--------------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/providers/mlx5/mlx5-abi.h b/providers/mlx5/mlx5-abi.h index 013a8ef0ed1c8d..d5bb4c7191b3f4 100644 --- a/providers/mlx5/mlx5-abi.h +++ b/providers/mlx5/mlx5-abi.h @@ -139,26 +139,9 @@ struct mlx5_create_srq_ex { __u32 reserved1; }; -struct mlx5_create_qp_drv_ex { - __u64 buf_addr; - __u64 db_addr; - __u32 sq_wqe_count; - __u32 rq_wqe_count; - __u32 rq_wqe_shift; - __u32 flags; - __u32 uidx; - __u32 reserved; - union { - /* SQ buffer address - used for Raw Packet QP */ - __u64 sq_buf_addr; - /* DC access key - used to create a DCT QP */ - __u64 access_key; - }; -}; - struct mlx5_create_qp_ex { struct ibv_create_qp_ex ibv_cmd; - struct mlx5_create_qp_drv_ex drv_ex; + struct mlx5_ib_create_qp drv_ex; }; struct mlx5_create_qp_ex_rss { @@ -201,22 +184,9 @@ struct mlx5_create_qp_resp { __u32 uuar_index; }; -struct mlx5_drv_create_wq { - __u64 buf_addr; - __u64 db_addr; - __u32 rq_wqe_count; - __u32 rq_wqe_shift; - __u32 user_index; - __u32 flags; - __u32 comp_mask; - __u32 single_stride_log_num_of_bytes; - __u32 single_wqe_log_num_of_strides; - __u32 two_byte_shift_en; -}; - struct mlx5_create_wq { struct ibv_create_wq ibv_cmd; - struct mlx5_drv_create_wq drv; + struct mlx5_ib_create_wq drv; }; struct mlx5_create_wq_resp { @@ -255,12 +225,6 @@ struct mlx5_query_device_ex { struct ibv_query_device_ex ibv_cmd; }; -struct mlx5_rss_caps { - __u64 rx_hash_fields_mask; /* enum ibv_rx_hash_fields */ - __u8 rx_hash_function; /* enum ibv_rx_hash_function_flags */ - __u8 reserved[7]; -}; - struct mlx5_striding_rq_caps { struct mlx5dv_striding_rq_caps caps; __u32 reserved; @@ -271,7 +235,7 @@ struct mlx5_query_device_ex_resp { __u32 comp_mask; __u32 response_length; struct ibv_tso_caps tso_caps; - struct mlx5_rss_caps rss_caps; /* vendor data channel */ + struct mlx5_ib_rss_caps rss_caps; /* vendor data channel */ struct mlx5dv_cqe_comp_caps cqe_comp_caps; struct mlx5_packet_pacing_caps packet_pacing_caps; __u32 support_multi_pkt_send_wqe;