Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4004200pxj; Mon, 21 Jun 2021 11:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTN3bW6OJ0ecpeBz7b+QyXdjB9OEFmDbNLQ7tGTasFNuW7VpXEPtIZxv3PJej6ysJB3fTi X-Received: by 2002:a17:906:914a:: with SMTP id y10mr9933609ejw.235.1624299212932; Mon, 21 Jun 2021 11:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624299212; cv=none; d=google.com; s=arc-20160816; b=zsF8GMlZ/56n2001FURh05uXFDOp6cGMTTOs7TWBUyQt9M+NpMBkrqIOYpH2xsRJIE SiFgIU6RIBsKxNuPddJAVTjZMSOUuO/eKyfhiOCgh5hVW373i+D6pgQB9WVm4ydT/ABn 01JhnlWnLj5AKXq3KMTi27E+8IgKGdZE4343XVusnC2LWL8WrZFf22f8/ZNRwV5x0IFq I2eiyD0zrHhufoZcDOQQ213TnN1Nhie7WVc6PCcR8fAmAtokZqmndapKHWaS3YZC7bPL 1XXKZkZHoj3bHcIGSo/h3BS8hQ9MVGZnjZlU46A+UeYHHcrVICy9PhaS/49onmBhZAZR e86Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nBnKqoan/yrGPxWBtod3It942s1tDX9/KE30/nusiX8=; b=j9pVSp3kGseGvUWn4eDwV3Qqhu48zszd26ITwWMntWnYOhAjoNy4tt54pPeMp4tnR+ CAYxpIguHUi6dA4i16dJbGS5RCXqPLFlG2cZw2EsiPEkYR57G8315WXPYmK6Y1F0Tblg qRek/hE5bogegp5Z99c5dbJHutDHomZ+5vD8/bxhQr+DdBSKCqKkMSVPJ1Rr8tPlcJ+m g5VShZlTwjeU3nMNCpcUjPGbyarTvz8nsY8NMYRlAD3TLgcCg1yWvg6TYU4qGkLdMDUT 1RB5Ru5ObDKZ7FcgteTUjqWpPJvTGn+EbFHrmakaRwRrUPtAKKH4Kul+9o2zt0qgCoEY ZX3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=WI6BslfM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e13si10775724ejy.31.2021.06.21.11.13.05; Mon, 21 Jun 2021 11:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=WI6BslfM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233361AbhFUSNy (ORCPT + 99 others); Mon, 21 Jun 2021 14:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233825AbhFUSLy (ORCPT ); Mon, 21 Jun 2021 14:11:54 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A7BC08EAE7 for ; Mon, 21 Jun 2021 10:55:13 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id 22so11694523qkv.8 for ; Mon, 21 Jun 2021 10:55:13 -0700 (PDT) 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=nBnKqoan/yrGPxWBtod3It942s1tDX9/KE30/nusiX8=; b=WI6BslfMAmPAqlkgxzowSTflY7NQA3y+CUwTBvzVDCcyYTXaN/gVqCKCtZW3jBhDN/ 0UzGYA3yDHe8J6UKE756wt/UmywXplBJNkqd/etU27xo1mO2WcN+0DrSqjZoZ+QPjDhS gtInLkqOGVngBO5q/TzqPGZVWNWqmcspxboYPMyc17oi9+q8RPluz/FOJMrDD5spXkMZ iB3ThgOIG9nqb9dMH7zmbRl6/U4PWyQ3U7jviIiuXx5UY++auipiO/9dA1mjIvhEVDLu +ivFKrO9f2updS9rAE06d5iBXYJjqkZkzVL8gtnViXv9FIeNh163yuySS3rCWa1ZKLjN 1K9A== 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=nBnKqoan/yrGPxWBtod3It942s1tDX9/KE30/nusiX8=; b=LjkU7AUdftP3RyfPcygkLC9AgemB7gm4La060KXhImAzQIUbihaYRO+a//AM9qL+lt nKW38WMCGsG/0SJ3sESqm+KCk6apcivhtmMcPYeW+yMdjswkLYUlRSW6Kj9Zih0bjNAa ruw/W0VfmswoYZ+InHDFQiJbV5H0gzCMF7e5zPRa8Q9XM+oNE2TqqZ0V16iC7fn7R+NS xTkDZtPYEYAux3YZauvNPHzbI7Wz+pevUesq6HjNTxbWwf5kNZBSfp1Pr83Wkv1Baaiw GWXpb09Fi5XOqUj9f71nF6Q3lGM84Eedxd/+sd7IdawkxXV4Nwvs/z9UY/NfF/Rmd3Qg V2Ag== X-Gm-Message-State: AOAM53086LNKrLlJrL3fbcnygYWXPOM0so9sh437BFR6ZOVu5L6n2/i8 B9HHwVnWH4ZHenrU27b5i7s0tA== X-Received: by 2002:a05:620a:440f:: with SMTP id v15mr15727716qkp.199.1624298112852; Mon, 21 Jun 2021 10:55:12 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-47-55-113-94.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.113.94]) by smtp.gmail.com with ESMTPSA id d20sm4960737qtw.92.2021.06.21.10.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 10:55:12 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lvO8d-009kwS-Ip; Mon, 21 Jun 2021 14:55:11 -0300 Date: Mon, 21 Jun 2021 14:55:11 -0300 From: Jason Gunthorpe To: Oded Gabbay Cc: Greg KH , Daniel Vetter , Oded Gabbay , linux-rdma , "open list:DMA BUFFER SHARING FRAMEWORK" , Doug Ledford , "airlied@gmail.com" , Linux Kernel Mailing List , Sumit Semwal , Christian =?utf-8?B?S8O2bmln?= , Gal Pressman , sleybo@amazon.com, dri-devel , Tomer Tayar , "moderated list:DMA BUFFER SHARING FRAMEWORK" , amd-gfx list , Alex Deucher , Leon Romanovsky , Christoph Hellwig Subject: Re: [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF Message-ID: <20210621175511.GI1096940@ziepe.ca> References: <20210618123615.11456-1-ogabbay@kernel.org> <20210621141217.GE1096940@ziepe.ca> 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-kernel@vger.kernel.org On Mon, Jun 21, 2021 at 07:26:14PM +0300, Oded Gabbay wrote: > On Mon, Jun 21, 2021 at 5:12 PM Jason Gunthorpe wrote: > > > > On Mon, Jun 21, 2021 at 03:02:10PM +0200, Greg KH wrote: > > > On Mon, Jun 21, 2021 at 02:28:48PM +0200, Daniel Vetter wrote: > > > > > > Also I'm wondering which is the other driver that we share buffers > > > > with. The gaudi stuff doesn't have real struct pages as backing > > > > storage, it only fills out the dma_addr_t. That tends to blow up with > > > > other drivers, and the only place where this is guaranteed to work is > > > > if you have a dynamic importer which sets the allow_peer2peer flag. > > > > Adding maintainers from other subsystems who might want to chime in > > > > here. So even aside of the big question as-is this is broken. > > > > > > From what I can tell this driver is sending the buffers to other > > > instances of the same hardware, > > > > A dmabuf is consumed by something else in the kernel calling > > dma_buf_map_attachment() on the FD. > > > > What is the other side of this? I don't see any > > dma_buf_map_attachment() calls in drivers/misc, or added in this patch > > set. > > This patch-set is only to enable the support for the exporter side. > The "other side" is any generic RDMA networking device that will want > to perform p2p communication over PCIe with our GAUDI accelerator. > An example is indeed the mlnx5 card which has already integrated > support for being an "importer". It raises the question of how you are testing this if you aren't using it with the only intree driver: mlx5. Jason