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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 6267EC4361B for ; Tue, 8 Dec 2020 21:03:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31F8F239FD for ; Tue, 8 Dec 2020 21:03:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729445AbgLHVDm (ORCPT ); Tue, 8 Dec 2020 16:03:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbgLHVDm (ORCPT ); Tue, 8 Dec 2020 16:03:42 -0500 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E884BC0613CF for ; Tue, 8 Dec 2020 13:03:01 -0800 (PST) Received: by mail-qk1-x743.google.com with SMTP id w79so16609qkb.5 for ; Tue, 08 Dec 2020 13:03:01 -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; bh=9sSR/G0iajxP79sAMRXtsqqOVlTG6SJFKBgyvVDhRlA=; b=d24RgsZ2dY3yg2s9gT27ixnsxarcSd8idMtkqjVGsflu8OKBdmx+R2xZpdEfehi5h1 wsWoyB7TEyVi0tMQrziIh9wqoEV4CHrqwMVa9ZzvVQrI7+S1uhaXDE+wZ6KBnDbu2j07 0eVL4TO4ad0n/ffatp+MiRMFysqbMeTJAGXQ/cIkQn99iZinfNub6qPBjSQCvuQ7hghk eSrNrOXSKSZfu2K49CvR/viUdI9Bh2mtwJKAmk2xc9g2YQfnLv1LlMmdHR0ZB3qR3XRe ltHttZkYOJVdAsKDGsgnW5q1CG4jEOoBQpDftata+QUZOQWi0RhDdXNnhQbca7rY9Jbv GqwQ== 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; bh=9sSR/G0iajxP79sAMRXtsqqOVlTG6SJFKBgyvVDhRlA=; b=l/HQAVWe1cvj3mzJeUomCJtCrZyFxdLJK656B5vovdxk0SFeNqeuXoosFwmMcS16rj a1e+H7ISFUFSpxYFsCkq4IzapDgYFU3RbhGd7hNy7tINvGJiuYIOyERqx9v9f3d3jRgb nBvGnHYh4W0mGYOoS7AjPvR3JYxd51YMUH+m4jtzvryQ26nbJT0/ez+J4L39Ugbc3qI6 pkVotOuqAUqX+9c9074zLnssQH7ayvDA85dLitZCxA2lqg8HIoIAYEf6D9zaTcZMypQn 5wZuE95Xfj4LXitxSBC5DbNf41klu0NmhyzDlEigdqjpwhGP306qEm4tFuuQ6BcM6WTT qdhQ== X-Gm-Message-State: AOAM533WWek36g2E+65/f8K0iHsM/j8jjhKoRxFj6R238C1OLHOe8qRa aB/3kOqUYKZu1Ezyl/NcT7m3EYrqjsc33g== X-Google-Smtp-Source: ABdhPJxsADdJkiPwe0Gy1hcj7gLbSLG1LhGiy5Oa+UIfzViYvRxyacUzGMGBsmHeM/l+3idH436LOg== X-Received: by 2002:ac8:7192:: with SMTP id w18mr31968213qto.149.1607453957166; Tue, 08 Dec 2020 10:59:17 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id q194sm5807666qka.102.2020.12.08.10.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 10:59:16 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kmiCh-007zxe-Ue; Tue, 08 Dec 2020 14:59:15 -0400 Date: Tue, 8 Dec 2020 14:59:15 -0400 From: Jason Gunthorpe To: "Xiong, Jianxin" Cc: Leon Romanovsky , "linux-rdma@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Doug Ledford , Sumit Semwal , Christian Koenig , "Vetter, Daniel" Subject: Re: [PATCH v13 1/4] RDMA/umem: Support importing dma-buf as user memory region Message-ID: <20201208185915.GO5487@ziepe.ca> References: <1607379353-116215-1-git-send-email-jianxin.xiong@intel.com> <1607379353-116215-2-git-send-email-jianxin.xiong@intel.com> <20201208070532.GE4430@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, Dec 08, 2020 at 06:13:20PM +0000, Xiong, Jianxin wrote: > > > +static inline struct ib_umem *ib_umem_dmabuf_get(struct ib_device *device, > > > + unsigned long offset, > > > + size_t size, int fd, > > > + int access, > > > + struct dma_buf_attach_ops *ops) { > > > + return ERR_PTR(-EINVAL); > > > > Probably, It should be EOPNOTSUPP and not EINVAL. > > EINVAL is used here to be consistent with existing definitions in the same file. They may be wrong, EOPNOTSUPP is right for this situation Jason 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 B57A2C433FE for ; Wed, 9 Dec 2020 08:32:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51D2723B87 for ; Wed, 9 Dec 2020 08:32:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51D2723B87 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB9BC6E131; Wed, 9 Dec 2020 08:32:01 +0000 (UTC) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1C83A6E03C for ; Tue, 8 Dec 2020 18:59:18 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id f14so4155602qto.12 for ; Tue, 08 Dec 2020 10:59:18 -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; bh=9sSR/G0iajxP79sAMRXtsqqOVlTG6SJFKBgyvVDhRlA=; b=d24RgsZ2dY3yg2s9gT27ixnsxarcSd8idMtkqjVGsflu8OKBdmx+R2xZpdEfehi5h1 wsWoyB7TEyVi0tMQrziIh9wqoEV4CHrqwMVa9ZzvVQrI7+S1uhaXDE+wZ6KBnDbu2j07 0eVL4TO4ad0n/ffatp+MiRMFysqbMeTJAGXQ/cIkQn99iZinfNub6qPBjSQCvuQ7hghk eSrNrOXSKSZfu2K49CvR/viUdI9Bh2mtwJKAmk2xc9g2YQfnLv1LlMmdHR0ZB3qR3XRe ltHttZkYOJVdAsKDGsgnW5q1CG4jEOoBQpDftata+QUZOQWi0RhDdXNnhQbca7rY9Jbv GqwQ== 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; bh=9sSR/G0iajxP79sAMRXtsqqOVlTG6SJFKBgyvVDhRlA=; b=C4rlbevJy60Zb0iFsol3xI6WfjQceCCXll3iYmFVTwK/HvGIxd2jn7yD77W7vqWUAg bziSLVBLPhKY0jK6cBILygdUJD8+3McozeL4GkKuGecvF7nKmr6JDuqHXwJWetzDCrxC JssbI2Pbcm6JSdKGWE/BaMt/v143gZnn9u8ywftl/RGlxIgCB9DkrjnSG/vyvAryjy60 +czWa+EVWPYDdaNFj5g/L0al+0Q3CH0Yy1bzvpCykWAP/Z5cJD4j7MHrx/K8+9RgNIBb W0aBWziCJ8dF3yWwtEDb7ZhAmIYcwXH2TpY7HWYL0sz7Z+7Yw3OaVVm1RaaiMZ+Wzt34 FPxQ== X-Gm-Message-State: AOAM530KnjALbSHHyWGNCIe/SlVOJcXNXLxktGBlY5UzW/R02QGDMacV UE01KmUfrV9S+RSco3mw7p327Q== X-Google-Smtp-Source: ABdhPJxsADdJkiPwe0Gy1hcj7gLbSLG1LhGiy5Oa+UIfzViYvRxyacUzGMGBsmHeM/l+3idH436LOg== X-Received: by 2002:ac8:7192:: with SMTP id w18mr31968213qto.149.1607453957166; Tue, 08 Dec 2020 10:59:17 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id q194sm5807666qka.102.2020.12.08.10.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 10:59:16 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kmiCh-007zxe-Ue; Tue, 08 Dec 2020 14:59:15 -0400 Date: Tue, 8 Dec 2020 14:59:15 -0400 From: Jason Gunthorpe To: "Xiong, Jianxin" Subject: Re: [PATCH v13 1/4] RDMA/umem: Support importing dma-buf as user memory region Message-ID: <20201208185915.GO5487@ziepe.ca> References: <1607379353-116215-1-git-send-email-jianxin.xiong@intel.com> <1607379353-116215-2-git-send-email-jianxin.xiong@intel.com> <20201208070532.GE4430@unreal> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 09 Dec 2020 08:32:01 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leon Romanovsky , "linux-rdma@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Doug Ledford , "Vetter, Daniel" , Christian Koenig Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Dec 08, 2020 at 06:13:20PM +0000, Xiong, Jianxin wrote: > > > +static inline struct ib_umem *ib_umem_dmabuf_get(struct ib_device *device, > > > + unsigned long offset, > > > + size_t size, int fd, > > > + int access, > > > + struct dma_buf_attach_ops *ops) { > > > + return ERR_PTR(-EINVAL); > > > > Probably, It should be EOPNOTSUPP and not EINVAL. > > EINVAL is used here to be consistent with existing definitions in the same file. They may be wrong, EOPNOTSUPP is right for this situation Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel