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 EADB8C63777 for ; Mon, 30 Nov 2020 15:56:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88B9B205F4 for ; Mon, 30 Nov 2020 15:56:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="XDk9ObBj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727773AbgK3P41 (ORCPT ); Mon, 30 Nov 2020 10:56:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727722AbgK3P41 (ORCPT ); Mon, 30 Nov 2020 10:56:27 -0500 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ADEBC0613CF for ; Mon, 30 Nov 2020 07:55:47 -0800 (PST) Received: by mail-qt1-x841.google.com with SMTP id t5so8477395qtp.2 for ; Mon, 30 Nov 2020 07:55:47 -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=CjVLOOEtBqUtB/09GI5wIXC8/zFmYYrYUeLfPULXHCc=; b=XDk9ObBj653+EScMyll6sJbalbBB5wbOv1Zw6deoHHA575dMosxoGicwjijLY0xijn kIVb3ixHJDRvYuYYMkMueqhqAVGJyQ3OxMdaunwzXkjUjlJNvHmB3eWhfy05oO/Sl5KY kqb25dIKw0YXdHqAuhDJbuCDOMruvl3AV4Br0hb8RJU3klkO6Ymmhj4GnZ7UekUbYOtb AkkBDF34E/wwgltfeKyT2YXSUckHOTV5ngHJ67T8C1lEDNelROFy8PeKxRpQiUtZwuG+ S4KNaGneyHnkbCXuvmf/zkdajT5fLf5hNdAkoLgmwgYKn2LgrV/61qbJEcZABPea7ar3 n0rg== 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=CjVLOOEtBqUtB/09GI5wIXC8/zFmYYrYUeLfPULXHCc=; b=I7dfkIJGmBHgqk7GrOfbvPb3Mh20HIwabIf+cR+SZw8OdDIxKh73f2wbjsppvTWD5s HNBHeTwNFj5fVCsYU7PiG25T5Sk1Sq0Ewp8BdrvN11bNlwRf1ebodEBzXu6b2oMbM8NT j+g4hFIehnj0h99HxdIq5Dkc3LZz/AiaFpj/3A5+bmPOq8CkbcSP5F1OiDKS3mgDATRi MWB7Orxluv9lGwaITS+cEB2buSfECeLH1vMNMJNqRoG/L6lOa7fD5uRwEqsiQ8W/IdNJ fz3rrC7wg+b7BV6BxHDv7eeBr4w+QXsyfEfaMi45mOE73x4DTq98KsMqXENSYy/tIsij +PuQ== X-Gm-Message-State: AOAM530QxZaSI+geZ7jv4THxpRLLjkLn89Q+LD22GenzNz1XI6RbwUJA cpYOt2AsrrZDeD0X3xaAWbUD5A== X-Google-Smtp-Source: ABdhPJyqY+NbTgrfg0rrr34jfN9FWUEJU+D/A6r+m4+LvoHrlHDw9X08cY6TAx+Zy/fxU5+UavX81w== X-Received: by 2002:aed:3025:: with SMTP id 34mr22385936qte.39.1606751746458; Mon, 30 Nov 2020 07:55:46 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id v15sm16156986qti.92.2020.11.30.07.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 07:55:45 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kjlWi-0045D3-GJ; Mon, 30 Nov 2020 11:55:44 -0400 Date: Mon, 30 Nov 2020 11:55:44 -0400 From: Jason Gunthorpe To: Daniel Vetter Cc: Jianxin Xiong , linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org, Leon Romanovsky , Doug Ledford , Daniel Vetter , Christian Koenig Subject: Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support Message-ID: <20201130155544.GA5487@ziepe.ca> References: <1606510543-45567-1-git-send-email-jianxin.xiong@intel.com> <1606510543-45567-5-git-send-email-jianxin.xiong@intel.com> <20201130145741.GP401619@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130145741.GP401619@phenom.ffwll.local> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Mon, Nov 30, 2020 at 03:57:41PM +0100, Daniel Vetter wrote: > > + err = ioctl(dri->fd, DRM_IOCTL_AMDGPU_GEM_CREATE, &gem_create); > > + if (err) > > + return err; > > + > > + *handle = gem_create.out.handle; > > + return 0; > > +} > > + > > +static int radeon_alloc(struct dri *dri, size_t size, uint32_t *handle) > > Tbh radeon chips are old enough I wouldn't care. Also doesn't support p2p > dma-buf, so always going to be in system memory when you share. Plus you > also need some more flags like I suggested above I think. What about nouveau? 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 5730EC64E7A for ; Tue, 1 Dec 2020 08:24:16 +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 D6D1220659 for ; Tue, 1 Dec 2020 08:24:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="XDk9ObBj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6D1220659 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 8E14E6E536; Tue, 1 Dec 2020 08:23:47 +0000 (UTC) Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3AD836E4A5 for ; Mon, 30 Nov 2020 15:55:47 +0000 (UTC) Received: by mail-qt1-x842.google.com with SMTP id e60so8482133qtd.3 for ; Mon, 30 Nov 2020 07:55:47 -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=CjVLOOEtBqUtB/09GI5wIXC8/zFmYYrYUeLfPULXHCc=; b=XDk9ObBj653+EScMyll6sJbalbBB5wbOv1Zw6deoHHA575dMosxoGicwjijLY0xijn kIVb3ixHJDRvYuYYMkMueqhqAVGJyQ3OxMdaunwzXkjUjlJNvHmB3eWhfy05oO/Sl5KY kqb25dIKw0YXdHqAuhDJbuCDOMruvl3AV4Br0hb8RJU3klkO6Ymmhj4GnZ7UekUbYOtb AkkBDF34E/wwgltfeKyT2YXSUckHOTV5ngHJ67T8C1lEDNelROFy8PeKxRpQiUtZwuG+ S4KNaGneyHnkbCXuvmf/zkdajT5fLf5hNdAkoLgmwgYKn2LgrV/61qbJEcZABPea7ar3 n0rg== 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=CjVLOOEtBqUtB/09GI5wIXC8/zFmYYrYUeLfPULXHCc=; b=P/mmLUgM/ZnlrLcHaMIn7q9yvSoKkS93WUj3IYnPwvi1yamLvzFXWYwWZnHbxoCNQ+ Em25prRB4Xey2xq/KNF9xQZcelyPYRVKP01nJlqGcZNYWYiAd3mdLVF10lYgX42eTY2R /iLdoIHe0syKB2EaSANx4DQ4QlOTzU1AdxZQ0HVIm6GeJCCWaUxb9ipPoLiKv9SFnE8W AiR2e/uCP0dHjy1gZEvUY3Iyq/JXeBfBSRniGOXQFe4/+IS78VPpkZ9cWXYbNLfNtQQ/ xhcVLGUaRL9ZKa7EKl4XK0NXytqjcOQ0f9ZjNt+ggWXVV+qK8KcbJg7VdkmrFykk6ERR i4cg== X-Gm-Message-State: AOAM532+yBoKWnV0xjz/TOo9BQ9pBsm1qJbzdGzoQ9VOOTEHGWrabvL3 FnSNgrHQfayeZyQh10a7DRFI0CO30LYlBhNY X-Google-Smtp-Source: ABdhPJyqY+NbTgrfg0rrr34jfN9FWUEJU+D/A6r+m4+LvoHrlHDw9X08cY6TAx+Zy/fxU5+UavX81w== X-Received: by 2002:aed:3025:: with SMTP id 34mr22385936qte.39.1606751746458; Mon, 30 Nov 2020 07:55:46 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id v15sm16156986qti.92.2020.11.30.07.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 07:55:45 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kjlWi-0045D3-GJ; Mon, 30 Nov 2020 11:55:44 -0400 Date: Mon, 30 Nov 2020 11:55:44 -0400 From: Jason Gunthorpe To: Daniel Vetter Subject: Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support Message-ID: <20201130155544.GA5487@ziepe.ca> References: <1606510543-45567-1-git-send-email-jianxin.xiong@intel.com> <1606510543-45567-5-git-send-email-jianxin.xiong@intel.com> <20201130145741.GP401619@phenom.ffwll.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201130145741.GP401619@phenom.ffwll.local> X-Mailman-Approved-At: Tue, 01 Dec 2020 08:23:37 +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 , Daniel Vetter , Christian Koenig , Jianxin Xiong Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Nov 30, 2020 at 03:57:41PM +0100, Daniel Vetter wrote: > > + err = ioctl(dri->fd, DRM_IOCTL_AMDGPU_GEM_CREATE, &gem_create); > > + if (err) > > + return err; > > + > > + *handle = gem_create.out.handle; > > + return 0; > > +} > > + > > +static int radeon_alloc(struct dri *dri, size_t size, uint32_t *handle) > > Tbh radeon chips are old enough I wouldn't care. Also doesn't support p2p > dma-buf, so always going to be in system memory when you share. Plus you > also need some more flags like I suggested above I think. What about nouveau? Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel