From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F6FEC43381 for ; Fri, 15 Feb 2019 17:16:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1AE0F2190C for ; Fri, 15 Feb 2019 17:16:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="fS50q0OI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729046AbfBORQm (ORCPT ); Fri, 15 Feb 2019 12:16:42 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44337 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbfBORQl (ORCPT ); Fri, 15 Feb 2019 12:16:41 -0500 Received: by mail-pg1-f193.google.com with SMTP id y1so5075181pgk.11 for ; Fri, 15 Feb 2019 09:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+ouTT9jabsn1fFyw9cxn3DL/iJDGdcXTwJIvI0HPxfk=; b=fS50q0OI8R+4o0YMI0gfn2ZJWjl6HywC8oKxUBWfTTrT0W7gqLhNF0l07zCb5uEkK8 yTMrM+4K2M8C0yB3LpUD9VmZCz5J1kdpDfW2xaCnzokI7MEBBk8xXhZ6SC96Kg86Uq/z ZivyhoX9ti5df5Y15aKwEHVyMg20jPGnUOoIQknmncD9FLTpJokpJVbhcN1uXGgIiXtn s8eMmvDHQ6HSy+FGmKm32SJb6HV5MAHp/S2QhGCTuHyU2HHhhbXT7rnuFiLflEFrtK07 dxZgi0GOCqixK54qg3fHHQnVdOng69bylpsBEHC4m41Q8n/1vKiIT/0eBMVOynkKduK/ JLCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+ouTT9jabsn1fFyw9cxn3DL/iJDGdcXTwJIvI0HPxfk=; b=e55nHdIFHiZ8cpSH7qrZy0XldsbPTUBsQZH4dySHD3WBVnNB7zi3FFqlAwGYMw0JQe BfgpIK1nh+ZAzM/zRNrc/2wWfbF+T9jgKPIIm9G+WcxnJr2i2MyKqEV98xSkyV6vgV2o Cu0qAOO8/gdt98kuSTQzT/ZhIj0Gt7u1DoWlRTB2a3StP0yLaEP/TwE04uYUfci29hFo Wi7wzsMfiDjLfzVvVxNvM5LMhrS/ZxTVg545KkVJnznn6YqFqbMsEyLy6CorgJlhSKGk DfQ6QLSQDK2EnXvUf3p5WYvRNO1jjSnBVebjbvKhkftsDar/LNvazJ0IGZ+8PX126T87 LjMA== X-Gm-Message-State: AHQUAuZvqPMy91wDJ982JSpkumsFQs+6KVSGBbJa+VpAU5a289Hpdgh5 VNoTPikaU+EI+ztC51uV8rSMfA== X-Google-Smtp-Source: AHgI3IbaiH5w8osxi7Xi574mpfUD3Tn8mTo+IzwDCECG0gOQfUtIzMjguPNI8Llw+oa9Ex84vNvZGA== X-Received: by 2002:a63:5402:: with SMTP id i2mr6221473pgb.79.1550250999665; Fri, 15 Feb 2019 09:16:39 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id c4sm5963622pgq.85.2019.02.15.09.16.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 09:16:38 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1guh6M-0000E5-6Y; Fri, 15 Feb 2019 10:16:38 -0700 Date: Fri, 15 Feb 2019 10:16:38 -0700 From: Jason Gunthorpe To: Shiraz Saleem Cc: dledford@redhat.com, davem@davemloft.net, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, mustafa.ismail@intel.com, jeffrey.t.kirsher@intel.com Subject: Re: [RFC v1 17/19] RDMA/irdma: Add ABI definitions Message-ID: <20190215171638.GA30706@ziepe.ca> References: <20190215171107.6464-1-shiraz.saleem@intel.com> <20190215171107.6464-18-shiraz.saleem@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190215171107.6464-18-shiraz.saleem@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Feb 15, 2019 at 11:11:04AM -0600, Shiraz Saleem wrote: > From: Mustafa Ismail > > Add ABI definitions for irdma. > > Signed-off-by: Mustafa Ismail > Signed-off-by: Shiraz Saleem > include/uapi/rdma/irdma-abi.h | 140 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 140 insertions(+) > create mode 100644 include/uapi/rdma/irdma-abi.h > > diff --git a/include/uapi/rdma/irdma-abi.h b/include/uapi/rdma/irdma-abi.h > new file mode 100644 > index 0000000..5b0e2d5 > +++ b/include/uapi/rdma/irdma-abi.h > @@ -0,0 +1,140 @@ > +/* > + * Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved. > + * Copyright (c) 2005 Topspin Communications. All rights reserved. > + * Copyright (c) 2005 Cisco Systems. All rights reserved. > + * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. > + * > + * This software is available to you under a choice of one of two > + * licenses. You may choose to be licensed under the terms of the GNU > + * General Public License (GPL) Version 2, available from the file > + * COPYING in the main directory of this source tree, or the > + * OpenIB.org BSD license below: > + * > + * Redistribution and use in source and binary forms, with or > + * without modification, are permitted provided that the following > + * conditions are met: > + * > + * - Redistributions of source code must retain the above > + * copyright notice, this list of conditions and the following > + * disclaimer. > + * > + * - Redistributions in binary form must reproduce the above > + * copyright notice, this list of conditions and the following > + * disclaimer in the documentation and/or other materials > + * provided with the distribution. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > + * SOFTWARE. > + * > + */ > + > +#ifndef IRDMA_ABI_H > +#define IRDMA_ABI_H > + > +#include > + > +#define IRDMA_ABI_VER 6 Starting with high numbers? > +enum irdma_memreg_type { > + IW_MEMREG_TYPE_MEM = 0, > + IW_MEMREG_TYPE_QP = 1, > + IW_MEMREG_TYPE_CQ = 2, > + IW_MEMREG_TYPE_RSVD = 3, > + IW_MEMREG_TYPE_MW = 4, > +}; > + > +struct irdma_alloc_ucontext_req { > + __u32 rsvd32; > + __u8 userspace_ver; > + __u8 rsvd8[3]; > +}; > + > +struct irdma_alloc_ucontext_resp { > + __u8 kernel_ver; > + __u8 rsvd[7]; > + struct irdma_hw_attrs hw_attrs; This won't even compile like this - don't forget you have to send the rdma-core PR along with the kernel patches. You should already be running the travis checks yourself. rdma-core should detect malformed user space headers.. > +struct irdma_mem_reg_req { > + __u16 reg_type; /* Memory, QP or CQ */ > + __u16 cq_pages; > + __u16 rq_pages; > + __u16 sq_pages; > +}; New structs should be aligned to 8 bytes. > +struct i40iw_create_qp_resp { > + __u32 qp_id; > + __u32 actual_sq_size; > + __u32 actual_rq_size; > + __u32 i40iw_drv_opt; > + __u16 push_idx; > + __u8 lsmm; > + __u8 rsvd2; > +}; ditto > +struct irdma_create_ah_resp { > + __u32 ah_id; > + __u32 rsvd[4]; typo? __u8? Jason